ITISFoundation / osparc-simcore

🐼 osparc-simcore simulation framework
https://osparc.io
MIT License
46 stars 27 forks source link

upgrade to sqlalchemy 2.0 #3986

Open sanderegg opened 1 year ago

sanderegg commented 1 year ago

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

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
- [ ] https://github.com/ITISFoundation/osparc-simcore/issues/4348
- [ ] https://github.com/ITISFoundation/osparc-simcore/pull/4384
- [ ] https://github.com/ITISFoundation/osparc-simcore/pull/4330
- [ ] https://github.com/ITISFoundation/osparc-simcore/issues/4528
- [ ] https://github.com/ITISFoundation/osparc-simcore/issues/4529
- [ ] enable the future flag on sqlalchemy
- [ ] upgrade to sqlalchemy 2.0
pcrespov commented 1 year ago
sanderegg commented 1 year ago

@sanderegg add progress list of packages/services

pcrespov commented 1 year ago

Quoting @sanderegg .

So the current idea is to remove ALL the SQLAlchemy2.0 warnings from the tests (I do hope this should remove >90% of the problems since we do not have full coverage maybe some stuff could slip by)

GitHK commented 2 months ago

@sanderegg @pcrespov should we maybe do this upgrade for the next sprint? like we did for mypy?

pcrespov commented 2 months ago

@sanderegg @pcrespov should we maybe do this upgrade for the next sprint? like we did for mypy?

I would do this together with https://github.com/ITISFoundation/osparc-simcore/issues/4529. BTW I started creating the infrastructure e.g. to test with asyncpg in https://github.com/ITISFoundation/osparc-simcore/pull/6281

sanderegg commented 2 months ago

@pcrespov @GitHK @giancarloromeo @matusdrobuliak66 I would first wait for pydantic v2 migration.