oracle / python-oracledb

Python driver for Oracle Database conforming to the Python DB API 2.0 specification. This is the renamed, new major release of cx_Oracle
https://oracle.github.io/python-oracledb
Other
308 stars 61 forks source link

Async support not compatible with alternative event loop implementations like `uvloop` #276

Closed citreae535 closed 5 months ago

citreae535 commented 6 months ago
  1. What versions are you using? python-oracledb 2.0.0 on Python 3.12 and Oracle Database XE 18c. Both run inside docker containers on Windows 11 23H2 with WSL 2 backend. The database container image is gvenzl/oracle-xe:18-faststart.
    1. Cause The thin mode transport implementation detects Async mode by checking if the supplied transport is an instance of asyncio.Transport. To support alternative implementations without depending on them directly, we need to detect Async mode without hard-coded runtime instance checks. Maybe passing in an explicit flag variable? https://github.com/oracle/python-oracledb/blob/9645d4f9b3fb196925ac364e6dec3ab953fca222/src/oracledb/impl/thin/transport.pyx#L287-L301
anthony-tuininga commented 6 months ago

I have pushed a patch that should add this support. If you are able to build from source you can verify that it works for you.

citreae535 commented 6 months ago

I've confirmed that the patch works. Thanks a lot. Can we expect a patch release soon?

anthony-tuininga commented 6 months ago

Definitely! I am hoping to make a patch release sometime in the next week or so.

anthony-tuininga commented 5 months ago

The patch has been included in version 2.0.1 which was just released.