Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLAlchemy 1.4.0 makes URL object immutable #10

Open
actuchicks opened this issue Mar 17, 2021 · 0 comments
Open

SQLAlchemy 1.4.0 makes URL object immutable #10

actuchicks opened this issue Mar 17, 2021 · 0 comments

Comments

@actuchicks
Copy link

👋 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant