Skip to content

SQLAlchemy 1.4.0 makes URL object immutable #10

@actuchicks

Description

@actuchicks

👋 Looks like this change in SQLAlchemy 1.4.0 is a problem: https://docs.sqlalchemy.org/en/14/changelog/migration_14.html#the-url-object-is-now-immutable

    @contextmanager
    def admin_db_connection(db_url):
        url = copy_url(db_url)
        dbtype = url.get_dialect().name
    
        if dbtype == "postgresql":
>           url.database = ""
E           AttributeError: can't set attribute

.venv/lib/python3.8/site-packages/sqlbag/sqla.py:214: AttributeError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions