Skip to content

sqlalchemy package becomes a dependency in v3.5.2 #194

@drienkop

Description

@drienkop

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions