-
Notifications
You must be signed in to change notification settings - Fork 139
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
(t) upgrade psycopg2 within current constrains #2406
Comments
The core problem currently is the compile failure on aarch64 that is not shared by the x86_64 build, holding up our dual architecture release. |
"psycopg2-binary==2.7.7" in setup.py results in the same failure on aarch64. |
An apparently successful source build on aarch64 in Leap 15.3 looks, on initial testing, to be working with this psycopg2 version specification removed entirely. |
The current proposal on this issue is to remove our version definition within setup.py as it has inconsistencies at least with the aarch64 architecture given our master and testing django-hack versions where we have a hard code for the x86_64 version. |
Given in our x86_64 we are defaulting to a binary (pre 2.8 this was the default) but in our aarch64 we fail through to a source build of psycopg2 as the binary is not available for this arch, and then fail due to missing build requirements, namely from the original error message "pg_config" we look to the upstream advise re source/binary: psycopg vs psycopg-binaryfrom: https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary
Which would seem to advise us to resolve our missing dependency and have both architectures build psychopg2 from source, this way at least we can pick exactly our version, given our OS version is now already beyond the recommendation for our current (testing branch) django anyway, but appears to work on arm side. But later we will again want to exactly specify our versions so now moving here to resolve build deps for arm and attempt to force x86_64 to source build via a setup.py option hopefully; from above link we also have:
This path is consistent with our future requirement to run in a venv and build as much as possible. But inconsistent with the un-referenced advise to use the binary version when in a venv! |
Although we already have above more strict limits on our psycopg version, adding for future info here from the following:
|
We appear to have yet-another-dependency issue related to our enabling the source build of psycopg2, against system postgresql/libpq, that of the removal of pg_config, in updates of our postgresql10 i.e.
and the same for our Leap 15.3:
I.e. an attempted install of the legacy named postgresql10-devel, (differing from the future postgresql12-server-devel) resulting in a need to downgrade:
with our currently installed and updated posgresql10-server having been updated from:
but if we downgrade our 10 server, forgoing the updates in the newer, added by default via updates, SLE repo we gain our pg_config:
|
And we are then stuck on this older version of postgresql10-server:
https://documentation.suse.com/sles/15-SP3/html/SLES-all/cha-update-alternative.html rleap15-3:~ # ls -la /usr/bin/pg_config
And removing the older dev package for postgresql10 with unique dependencies via:
and we no longer have a pg_config
But we have unblocked our postgresql10 server updates:
|
Thanks to @FroggyFlox for digging out a prior instance of this when Tumbelweed moved to postgresql11 and dropped pg_config in that release, linking for context. |
Since we pg_config is required for a compile and it has been removed and not replace in postgres10 in the sle update repo we may have not choice but to upgrade out postgresql to what is now current, incidentally from cnf it appears that postresql10-devel in Leap 15.4 has returned pg_config. But we still have 15.3 as our testing base, and currently used due to it's Python2 default inclusion.
defaults to So we need at least postgresql12 to get updates with pg_config in (hopefully) but the above defaults suggest we would be better not going for the lowest common denominator of 12. We have an apparent working aarch64 build using system psycopg2 of 2.8.4 and this, from the above changelog pick, includes only 12 error codes map & 2.8.6 adds postgresql13 errorcodes map. However we are caught between a multiple dependencies here and once we have moved to python 3 we can re-visit all. But the OS will still be our database hosts. |
returns us our needed pg_config:
and updates our alternatives to use 13, as we still have a posgres10-server installed, to the new 13. Old enough for psycopg2 2.8.7 to have error maps but this psycopg2 is already a little too new for our current Django (testing branch) max of 2.7.7 but looks to be OK for our use with OS package of psychopg2 2.8.4 - rock-and-several-hard-place until we complete our Python 2 -> 3 move and re-do our build env to be venv based.
|
Includes related & unrelated previously missing aarch64 path additions to our django environment launcher.
From https://www.psycopg.org/docs/news.html#news we have a 2.8.7 release with Postgresql 13 errorcodes, but PyPi https://pypi.org/project/psycopg2/#history has only 2.8.6 (>= 2.9 requires Python 3).
…hin_current_constrains (t) upgrade psycopg2 within current constrains #2406
Closing as: |
As part of an ongoing effort to identify our update options, this issue is opened to identify the limits of our current psycopg2.
This currently fails compilation on our aarch64 build:
Where-as the same psycopg2 version has a wheel available and default to it in our x86 builds; resulting in a successful build.
From: https://www.psycopg.org/docs/#
Looking to upgrade limits and constrains.
Constrains:
Django 1.11.29 (max psycopg2 version 2.7.7, >= Djanog 2.2.1 needed for >= 2.8 psycopg2)
https://pyup.io/packages/pypi/django/changelog
2.2.1
"* Added compatibility for
psycopg2
2.8 (30331
)."https://code.djangoproject.com/ticket/30331
We may have the option to specify pre-build wheel options, if available, with "psycopg2-binary==2.7.7" which are recommended for venv use which we intent to migrate towards in the mid-term. No canonical reference yet for binary use within venv.
We also have a potential openSSL constraint here regarding psycopg2 version, most notably if using the wheel (binary) version:
Leap 15.3: - 1.1.1d-1.46
Leap 15.4: - 1.1.1l-150400.1.5
from: https://www.psycopg.org/docs/news.html#news
excerpts of note around our upgrade here:
The text was updated successfully, but these errors were encountered: