-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
@skip_after_libpq(16) uses compile-time libpq version #1619
Comments
Fwiw, switching that test to use |
Afaict the problem is a5382d7 which rounds |
The runtime version is available in |
it works when I change
Thanks! |
Oh, silly mistake. Thank you, will commit it with your fix. |
While compatibility with PG16 has been fixed in #1582, it's not entirely done yet: In Debian, when testing if upgrading libpq5 from 15 to 16 is safe, the problems fixed in #1582 reappear:
https://ci.debian.net/data/autopkgtest/unstable/amd64/p/psycopg2/37551454/log.gz
This happens when the psycopg2 compiled against libpq5 15 is run with libpq5 16.
@skip_after_libpq(16)
does not trigger because it usespsycopg2.__libpq_version__
which is statically initialized:In short, this constant shouldn't be a constant, but be loaded at run time.
I tried replacing
PG_VERSION_NUM
withPQlibVersion()
, but that does not seem to be enough, there are other places with more version numbers, and setup.py even redefines its own PG_VERSION _NUM at which point I gave up.Could someone with more insight into which version number is supposed to mean what check what needs to be done to fix
@skip_after_libpq(16)
to look at the run-time libpq version? Thanks.The text was updated successfully, but these errors were encountered: