This repository was archived by the owner on Aug 19, 2025. It is now read-only.
How will SQLAlchemy's implementation of an async extension affect this project? #484
brian-farrell
started this conversation in
Potential issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm curious as to how closely this project intends to conform with SQLAlchemy, and whether there is an intention to carry this project forward once SQLAlchemy has fully implemented its async extension.
I'm asking this because I ran into an issue with the Deprecation Warnings in the
backends.postgres.Recordclass. (For thekeys()andvalues()methods. My own code was was instantiating a new class object by unpacking theRecordobject.i.e.:
Class(**record). The deprecation warnings showed up during unit testing, and the cause was not readily apparent, which caused me to dig into this code, as well as into some of the SQLAlchemy code.The Deprecation Warnings indicate that, for instance, "The
Row.keys()method is deprecated to mimic SQLAlchemy behaviour, useRow._mapping.keys()instead." In my case, I refactored my code toClass(**dict(record._mapping.items())). This is acceptable, but less than optimal.In looking through the code, I noticed several significant differences between the Databases
Recordclass and the SQLAlchemyRowclass. I'm happy to submit a Pull Request that would get theRecordclass to behave more like the SQLAlchemyRowclass, but I am not sure if that work is desired or particularly useful, depending on the direction of this project.If there is a desire for help with this work, please let me know, and I will be happy to contribute.
References:
Databases version: 0.5.5SQLAlchemy version: 1.4.35Python version: 3.9.12OS: Debian 10.12SQLAlchemy Row Documentation
SQLAlchemy Asynchronous I/O Documentation
Beta Was this translation helpful? Give feedback.
All reactions