connect & connect_async typing · Issue #438 · oracle/python-oracledb (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@cepedus

Description

@cepedus

Hello, when using the methods connect or connect_async, the return types are lost because of the untyped decorators _async_connection_factory and _connection_factory.

The fix includes the adding of a TypeVar and a ParamSpec to make them coherent with the wrapped callables. This will be usable for all platforms and Python versions >=3.8, using typing_extensions for python < 3.10.

I can tackle the issue if needed :)