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

SA20: Resolve all deprecation warnings using SQLALCHEMY_WARN_20=1 #111

Closed
amotl opened this issue Dec 9, 2022 · 2 comments
Closed

SA20: Resolve all deprecation warnings using SQLALCHEMY_WARN_20=1 #111

amotl opened this issue Dec 9, 2022 · 2 comments

Comments

@amotl
Copy link
Member

amotl commented Dec 9, 2022

About

When running the test suite, it triggers a few deprecation warnings:

<stdin>:1: MovedIn20Warning: The ``declarative_base()`` function is now available as sqlalchemy.orm.declarative_base(). (deprecated since: 1.4) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
<stdin>:1: RemovedIn20Warning: The ``bind`` argument to declarative_base is deprecated and will be removed in SQLAlchemy 2.0. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)

I was following the steps described here, but on the following connection.execute I get a crate.client.exceptions.ProgrammingError: RelationUnknown[Relation 'locations' unknown]. Is there a step missing to run the table creation? And how does it later return a row count of 13, where are these rows coming from?

References

Originally posted by @hammerhead in crate/crate-python#464 (comment)

@amotl amotl changed the title Mitigate deprecation warnings on the test harness SQLAlchemy: Resolve deprecation warnings Dec 10, 2022
@amotl
Copy link
Member Author

amotl commented Dec 19, 2022

I think I had already made a start on this at a single spot when looking at SA20 compatibility. See db3831a05480. However, let's dedicate a patch to getting rid of deprecation warnings only, without making further changes.

@amotl amotl changed the title SQLAlchemy: Resolve deprecation warnings SA20: Resolve all deprecation warnings using SQLALCHEMY_WARN_20=1 Dec 21, 2022
@amotl
Copy link
Member Author

amotl commented Jan 3, 2023

Resolved with crate/crate-python#485.

@amotl amotl closed this as completed Jan 3, 2023
@amotl amotl transferred this issue from crate/crate-python Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant