Skip to content

Added psycopg3 support #1739

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

Merged
merged 2 commits into from
Feb 28, 2023
Merged

Added psycopg3 support #1739

merged 2 commits into from
Feb 28, 2023

Conversation

nofalx
Copy link
Contributor

@nofalx nofalx commented Feb 9, 2023

Description

Add support for psycopg3 while still keeping support for psycopg2

Fixes #1736

Checklist:

  • I have added the relevant tests for this change.
  • I have added an item to the Pending section of docs/changes.rst.
  • Fix test tests.panels.test_sql.SQLPanelMultiDBTestCase.test_transaction_status

@nofalx
Copy link
Contributor Author

nofalx commented Feb 9, 2023

@tim-schilling please add your changes for test_tuple_param_conversion to this PR instead

@tim-schilling
Copy link
Member

Sorry, I dropped the ball on this.

@tim-schilling
Copy link
Member

This is getting closer. I'm struggling to get tox-gh-actions to work properly. I might end up ripping it out

@tim-schilling
Copy link
Member

It turns out we were never running the postgis test suite. That's been fixed.
If all the tests pass, I'll clean up the PR and get it merged in.

@tim-schilling
Copy link
Member

Phew, that is done.

updated trans_id to rely on transaction status instead of connection status as it works with pyscorg3

Use correct json property based on psycopg version

Skip test_tuple_param_conversion if using psycopg3

Move psycopg3 skip logic into decorator.
@tim-schilling
Copy link
Member

@matthiask can you double check the changes for me?

@YAmikep
Copy link

YAmikep commented Feb 25, 2023

For what it's worth, I just tested it with the following and it works:

  • Python 3.11.2
  • psycopg==3.1.8
  • PostgreSQL 15.2

Thank you 🙌

@tim-schilling tim-schilling merged commit d94bf40 into django-commons:main Feb 28, 2023
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.

Add Support for psycopg3
5 participants