Skip to content
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

✨ add support for psycopg3 #214

Merged
merged 2 commits into from Dec 15, 2023

Conversation

idumancic
Copy link
Contributor

I have not set psycopg3 as a default dbapi driver for PostgreSQL in pydapper.

But we can change that if you decide to do so.

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0b01709) 100.00% compared to head (b4b001b) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #214   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        21    +1     
  Lines          569       582   +13     
  Branches        98       100    +2     
=========================================
+ Hits           569       582   +13     
Flag Coverage Δ
3.10-bigquery 71.30% <76.92%> (+0.12%) ⬆️
3.10-core 87.11% <76.92%> (-0.24%) ⬇️
3.10-mssql 72.16% <76.92%> (+0.10%) ⬆️
3.10-mysql 71.30% <76.92%> (+0.12%) ⬆️
3.10-oracle 72.16% <76.92%> (+0.10%) ⬆️
3.10-postgresql 86.25% <100.00%> (+0.31%) ⬆️
3.10-sqlite 70.96% <76.92%> (+0.13%) ⬆️
3.11-bigquery 71.30% <76.92%> (+0.12%) ⬆️
3.11-core 87.11% <76.92%> (-0.24%) ⬇️
3.11-mssql 72.16% <76.92%> (+0.10%) ⬆️
3.11-mysql 71.30% <76.92%> (+0.12%) ⬆️
3.11-oracle 72.16% <76.92%> (+0.10%) ⬆️
3.11-postgresql 86.25% <100.00%> (+0.31%) ⬆️
3.11-sqlite 70.96% <76.92%> (+0.13%) ⬆️
3.12-bigquery 71.30% <76.92%> (+0.12%) ⬆️
3.12-core 87.28% <76.92%> (-0.24%) ⬇️
3.12-mssql 72.16% <76.92%> (+0.10%) ⬆️
3.12-mysql 71.30% <76.92%> (+0.12%) ⬆️
3.12-oracle 72.16% <76.92%> (+0.10%) ⬆️
3.12-postgresql 86.42% <100.00%> (+0.31%) ⬆️
3.12-sqlite 70.96% <76.92%> (+0.13%) ⬆️
3.8-bigquery 71.37% <76.92%> (+0.12%) ⬆️
3.8-core 87.58% <76.92%> (-0.25%) ⬇️
3.8-mssql 72.24% <76.92%> (+0.10%) ⬆️
3.8-mysql 71.37% <76.92%> (+0.12%) ⬆️
3.8-oracle 72.24% <76.92%> (+0.10%) ⬆️
3.8-postgresql 86.37% <100.00%> (+0.31%) ⬆️
3.8-sqlite 71.03% <76.92%> (+0.13%) ⬆️
3.9-bigquery 71.37% <76.92%> (+0.12%) ⬆️
3.9-core 87.58% <76.92%> (-0.25%) ⬇️
3.9-mssql 72.24% <76.92%> (+0.10%) ⬆️
3.9-mysql 71.37% <76.92%> (+0.12%) ⬆️
3.9-oracle 72.24% <76.92%> (+0.10%) ⬆️
3.9-postgresql 86.37% <100.00%> (+0.31%) ⬆️
3.9-sqlite 71.03% <76.92%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zschumacher
Copy link
Owner

zschumacher commented Dec 15, 2023

This looks great, thank you! One comment - I don’t think we need both psycopg and psycopg-binary as deps. Can we keep just the binary?

@idumancic
Copy link
Contributor Author

This looks great, thank you! One comment - I don’t think we need both psycopg and psycopg-binary as deps. Can we keep just the binary?

From my understanding psycopg-binary is an optional package from this version, when I only include the binary the tests fail because there is no psycopg to import.

https://pypi.org/project/psycopg-binary/ -> You can read here the description

@zschumacher
Copy link
Owner

ah okay - can you remove it and reinstall it like

poetry add 'psycopg[binary]' --optional

should add it to the toml how i would expect. Didn't realize it was just an extra

@zschumacher zschumacher changed the title feat(postgresql): add support for psycopg3 ✨ add support for psycopg3 Dec 15, 2023
@zschumacher zschumacher changed the title ✨ add support for psycopg3 ✨ add support for psycopg3 Dec 15, 2023
@idumancic
Copy link
Contributor Author

poetry add 'psycopg[binary]' --optional

Should be good now.

@zschumacher
Copy link
Owner

Doesn't need to happen in this PR, but I would also like to add the psycopg3 async api as one of the async drivers. If you wanted to PR that that'd be amazing, otherwise I'll look to add it in a couple weeks

@zschumacher zschumacher merged commit 0d58a41 into zschumacher:main Dec 15, 2023
38 checks passed
@idumancic
Copy link
Contributor Author

Doesn't need to happen in this PR, but I would also like to add the psycopg3 async api as one of the async drivers. If you wanted to PR that that'd be amazing, otherwise I'll look to add it in a couple weeks

#218 here it is :)

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.

None yet

2 participants