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 compatibility with Psycopg 3 #202

Merged
merged 8 commits into from
Aug 8, 2023
Merged

Conversation

hartungstenio
Copy link
Contributor

@hartungstenio hartungstenio commented May 30, 2023

This fixes the issue #190

@hartungstenio
Copy link
Contributor Author

hartungstenio commented May 30, 2023

I'm just having to work around this test: https://github.com/Hipo/drf-extra-fields/blob/master/tests/test_fields.py#L835

Basically, psycopg 3 will adjust the bounds to () to include infinites, while psycopg 2 will keep [)

Any ideas on how to approach this.

Copy link

@james-certn james-certn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good!

drf_extra_fields/compat.py Show resolved Hide resolved
.github/workflows/tests.yml Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2023

Codecov Report

Merging #202 (044cc82) into master (da86adf) will decrease coverage by 0.15%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master     #202      +/-   ##
==========================================
- Coverage   93.98%   93.84%   -0.15%     
==========================================
  Files           4        4              
  Lines         482      471      -11     
==========================================
- Hits          453      442      -11     
  Misses         29       29              
Impacted Files Coverage Δ
tests/test_fields.py 96.30% <100.00%> (-0.12%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@hartungstenio hartungstenio marked this pull request as ready for review June 23, 2023 11:16
Copy link
Contributor

@KaratasFurkan KaratasFurkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your contribution @hartungstenio, we are really sorry for the late reply & review. Extra thanks for organizing imports and some styling.

It looks good overall but we prefer to not create a breaking change. I made comments regarding it. It would be nice if you update the PR according to these comments. Thanks again!

requirements_dev.txt Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
drf_extra_fields/compat.py Outdated Show resolved Hide resolved
drf_extra_fields/compat.py Show resolved Hide resolved
drf_extra_fields/fields.py Outdated Show resolved Hide resolved
drf_extra_fields/fields.py Outdated Show resolved Hide resolved
tests/test_fields.py Outdated Show resolved Hide resolved
Copy link
Contributor

@KaratasFurkan KaratasFurkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks again for this important patch.

@KaratasFurkan KaratasFurkan merged commit bc9ca85 into Hipo:master Aug 8, 2023
0 of 5 checks passed
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.

5 participants