python311Packages.psycopg: 3.1.13 -> 3.1.14

https://github.com/psycopg/psycopg/blob/3.1.14/docs/news.rst#current-release
This commit is contained in:
Martin Weinelt
2023-12-03 22:15:51 +01:00
parent ab59f0dacc
commit 89590d2a02
2 changed files with 22 additions and 22 deletions
@@ -1,5 +1,5 @@
diff --git a/psycopg/psycopg/pq/_pq_ctypes.py b/psycopg/psycopg/pq/_pq_ctypes.py
index 4f9d00fb..24b90ef6 100644
index 9ca1d129..02929ab6 100644
--- a/psycopg/psycopg/pq/_pq_ctypes.py
+++ b/psycopg/psycopg/pq/_pq_ctypes.py
@@ -11,14 +11,10 @@ from ctypes import Structure, CFUNCTYPE, POINTER
@@ -30,17 +30,26 @@ index 4f9d00fb..24b90ef6 100644
fdopen = libc.fdopen
fdopen.argtypes = (c_int, c_char_p)
diff --git a/tests/fix_pq.py b/tests/fix_pq.py
index 6811a26c..c1829c82 100644
index 917dfc91..505f2d65 100644
--- a/tests/fix_pq.py
+++ b/tests/fix_pq.py
@@ -51,9 +51,7 @@ def libpq():
from psycopg.pq.misc import find_libpq_full_path
# Not available when testing the binary package
@@ -47,18 +47,7 @@ def pytest_runtest_setup(item):
@pytest.fixture
def libpq():
"""Return a ctypes wrapper to access the libpq."""
- try:
- from psycopg.pq.misc import find_libpq_full_path
-
- # Not available when testing the binary package
- libname = find_libpq_full_path()
- assert libname, "libpq libname not found"
- return ctypes.pydll.LoadLibrary(libname)
+ return ctypes.pydll.LoadLibrary("@libpq@")
except Exception as e:
if pq.__impl__ == "binary":
pytest.skip(f"can't load libpq for testing: {e}")
- return ctypes.cdll.LoadLibrary(libname)
- except Exception as e:
- if pq.__impl__ == "binary":
- pytest.skip(f"can't load libpq for testing: {e}")
- else:
- raise
+ return ctypes.cdll.LoadLibrary("@libpq@")
@pytest.fixture
@@ -2,7 +2,6 @@
, stdenv
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, fetchurl
, pythonOlder
, substituteAll
@@ -35,13 +34,13 @@
let
pname = "psycopg";
version = "3.1.13";
version = "3.1.14";
src = fetchFromGitHub {
owner = "psycopg";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-N+x8RErlId1uBgXZjBBjtPxqJXGuXZEl78DKVKjhy9w=";
hash = "sha256-zocRBnrQoJDWI4qhxDnxxIeiLdaWolvsujqfHBYQc/A=";
};
patches = [
@@ -50,14 +49,6 @@ let
libpq = "${postgresql.lib}/lib/libpq${stdenv.hostPlatform.extensions.sharedLibrary}";
libc = "${stdenv.cc.libc}/lib/libc.so.6";
})
(fetchpatch {
# fix environment variables leaking into test environment
# https://github.com/psycopg/psycopg/pull/683
# https://github.com/psycopg/psycopg/issues/681
url = "https://github.com/psycopg/psycopg/commit/f060855aa6126e811de243c7213d2caff9c88123.patch";
hash = "sha256-QsFxK8Qasw9kbNCUUCqbOHaf53kT5NONlr28vGoPda0=";
})
];
baseMeta = {