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

Look at updating SQLAlchemy to 1.4.x #894

Open
shaycrk opened this issue May 19, 2022 · 1 comment
Open

Look at updating SQLAlchemy to 1.4.x #894

shaycrk opened this issue May 19, 2022 · 1 comment
Labels
dependencies Pull requests that update a dependency file

Comments

@shaycrk
Copy link
Contributor

shaycrk commented May 19, 2022

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 a text() wrapper around the sql or switch to exec_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 😬
@ecsalomon
Copy link
Contributor

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

@ecsalomon ecsalomon added the dependencies Pull requests that update a dependency file label May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants