Skip to content

Conversation

@ArjunNarendra
Copy link
Contributor

@ArjunNarendra ArjunNarendra commented Oct 3, 2025

Previously, I was returning the connection to the user for both sync and async connection with psycopg2. Now, when connecting synchronously, I have found a way to define a custom connection class called SyncEntraConnection. This allows the user to initiate the connection themselves and pass in the SyncEntraConnection via the connection_factory argument. However, I am unable to mimic this for asynchronous connections (see commented out code for AsyncEntraConnection) and I suspect it is because I am defining the __init__ method as async.

@ArjunNarendra ArjunNarendra deleted the user/an/psycopg2-use-connection-factory branch October 5, 2025 21:25
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

Successfully merging this pull request may close these issues.

2 participants