Hey there,
as a side effect of fc5f2df in v3.5.2, sqlalchemy becomes a requirement even if you are just using a MongoDbContainer. This is due to adding from sqlalchemy.exc import OperationalError to the generic DbContainer.
This means if you just install testcontainers, code will fail as below:
Traceback (most recent call last):
File "script.py", line 1, in <module>
from testcontainers.mongodb import MongoDbContainer
File "/home/user/.local/share/virtualenvs/boo-_OEHHOF1/lib/python3.8/site-packages/testcontainers/mongodb.py", line 15, in <module>
from testcontainers.core.generic import DbContainer
File "/home/user/.local/share/virtualenvs/boo-_OEHHOF1/lib/python3.8/site-packages/testcontainers/core/generic.py", line 17, in <module>
from sqlalchemy.exc import OperationalError
ModuleNotFoundError: No module named 'sqlalchemy'
Is it intentional? Should sqlalchemy be added to install_requires?
Hey there,
as a side effect of fc5f2df in v3.5.2,
sqlalchemybecomes a requirement even if you are just using aMongoDbContainer. This is due to addingfrom sqlalchemy.exc import OperationalErrorto the genericDbContainer.This means if you just install
testcontainers, code will fail as below:Is it intentional? Should sqlalchemy be added to
install_requires?