triage
triage copied to clipboard
Look at updating SQLAlchemy to 1.4.x
This may involve some considerable refactoring, especially of unit tests, but by way of documentation, here are a couple of notes to consider from discussion with @jtwalsh0 and @ecsalomon on slack:
- 1.4 strongly encourages/demands transaction blocks. If you use ohio's pg_copy_to, it will create the table but not insert any data unless you add an extra context manager. e.g.
with engine.connect() as conn:
with conn.begin():
df.pg_copy_to(...)
-
connect().execute('sql here')
either requires atext()
wrapper around the sql or switch toexec_driver_sql
to bind to parameters - The major changes we need to make for 1.4 are rewriting the test suite, which has several patterns for mocking the database contents, and sqlalchemy 1.4 did not like most of them, and the errors were state based -- which tests fail depend on which tests ran before 😬
This also prevents triage from upgrading pandas
beyond 1.3.5. 1.5.0 will be out soon, so we will continue to face challenges with dependency upgrades and adoption if we do not upgrade sqlalchemy