Skip to content

upgrade to sqlalchemy 2.0 #3986

@sanderegg

Description

@sanderegg

and install sqlalchemy like so:
_base.in
sqlalchemy[postgresql_asyncpg]
_test.in
sqlalchemy[postgresql_asyncpg, mypy]

Includes async features through asyncpg engine.

Here the sqlaclhemy 2.0 migration guide: https://docs.sqlalchemy.org/en/20/changelog/migration_20.html

  • SQLALCHEMY_WARN_20 enabled in all [unit/int] tests
  • add the following in all the setup.cfg files as soon as the warnings are all gone to prevent going back to pre-2.0 style
    [tool:pytest]
    addopts = -W error::sqlalchemy.exc.SAWarning

TIPs:

sa.select([clusters.c.id, clusters.c.name]) # old style with array
sa.select(clusters.c.id, clusters.c.name) # new style with args

Tasks

Sub-issues

Metadata

Metadata

Labels

a:databaseassociated to postgres service and postgres-database packaget:maintenanceSome planned maintenance work

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions