-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Use the binary version of psycopg for development #2212
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
+7
−13
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| -r common.txt | ||
| django-debug-toolbar==6.0.0 | ||
| pre-commit~=4.3.0 | ||
| psycopg[binary]==3.2.10 | ||
| watchdog==6.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| -r common.txt | ||
| gunicorn==23.0.0 | ||
| psycopg[c]==3.2.10 | ||
| redis==6.4.0 | ||
| sentry-sdk==2.38.0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If finally we're going to use psycopg[binary] check if this depenencies are not needed to the compilation of other dependencies (eg: pillow).
If not, and we don't need any more of these system dependencies to compile python packages, I'll invite you to get rid of the whole section of installing debian packages (also compilers), and removing an leaving only the pip install line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gcc and g++ are required for libsass. I looked for an alternative that doesn't require compiling but couldn't find one yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is libsass requiring both gcc and g++ ?
Since you studied it, can we open a PR for the libsass repo to ask a wheel for recent python versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we can find an alternate package to replace it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check this again.
https://github.com/sass/libsass-python says
but our build fails with
when those dependencies are not installed.
This feels more a like bug, rather than a missing feature in the libsass package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dvarrazzo, thank you for joining this conversation and for the in-depth discussion on psycopg/psycopg#1156!
To clarify one point, with this PR, we segmented the requirements so we can use
psycopg[binary]for local development (to simplify the local setup process) andpsycopg[c]in production, as this is how I interpreted the recommendation in the local installation instructions:Could you clarify if
psycopg[binary]is also intended for use in production environments? We control the environment (currentlypython:3.12-slim-trixie, plus pgdg for the correctpostgresql-clientversion if that matters), but that will of course change as we upgrade Python & Debian releases over time.Thanks so much for your feedback!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the problem with libsass, I created an issue on their repo, and it got closed as "completed" but without a fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libsass follow up: #2248 (comment)
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, sorry for the radio silence, I'm crushed by my backlog...
The reason for declaring
[c]preferred is mostly related to release upgrades: updating the system libpq or openssl[c]will use the updated libraries,[binary]will not and a new release of Psycopg would be required.Performance and stability-wise I don't expect differences.
If your service is controlled by a grumpy, customarily bearded, sysadmin who wants to have control on every system library, using
[c]you will use the system ones; using[binary]you will get whatever packaged in thepsycopg-binarybuild.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@django/django-website My understanding is unless we need to manage libpq and openssl versions, [c] doesn't seem necessary. Do we still want to keep the current config or would we like to proceed with simplifaction / cleaning?