themotte / rDrama

This code runs https://www.themotte.org. Forked from https://github.com/Aevann1/rDrama
GNU Affero General Public License v3.0
25 stars 30 forks source link

Upgrade to SQLAlchemy 2.0 #677

Open justcool393 opened 1 year ago

justcool393 commented 1 year ago

This has exposed an interesting amount of bugs and stopped throwing type errors every 5 seconds (from SQLA's side).

It's worth noting that not all models are fully typed, that is, we have Mapped[Any] in some places where a narrower type would be nice.

Upgrading to SQLA2 we don't need this, but it is helpful and makes error checking reliable. Full coverage is for a different day.

Fixes #487