Unverified Commit 57e7f759 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

python313Packages.psycopg: 3.2.6 -> 3.2.7 (#403386)

parents eca33dd9 53c642b6
Loading
Loading
Loading
Loading
+9 −11
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
  fetchFromGitHub,
  pythonOlder,
  pytestCheckHook,
  pytest-rerunfailures,
  setuptools,
  psutil,
  netcat,
@@ -14,8 +15,8 @@

buildPythonPackage rec {
  pname = "mirakuru";
  version = "2.5.3";
  format = "pyproject";
  version = "2.6.0";
  pyproject = true;

  disabled = pythonOlder "3.9";

@@ -23,24 +24,21 @@ buildPythonPackage rec {
    owner = "ClearcodeHQ";
    repo = "mirakuru";
    tag = "v${version}";
    hash = "sha256-blk4Oclb3+Cj3RH7BhzacfoPFDBIP/zgv4Ct7fawGnQ=";
    hash = "sha256-R5prLIub2kVhsKRGWbZMf/v0U7oOBieoLiHwMRDEs0I=";
  };

  patches = [
    # https://github.com/ClearcodeHQ/mirakuru/pull/810
    ./tmpdir.patch
  ];

  nativeBuildInputs = [ setuptools ];
  build-system = [ setuptools ];

  propagatedBuildInputs = [ psutil ];
  dependencies = [ psutil ];

  nativeCheckInputs = [
    netcat.nc
    ps
    python-daemon
    pytest-rerunfailures
    pytestCheckHook
  ];

  pythonImportsCheck = [ "mirakuru" ];

  # Necessary for the tests to pass on Darwin with sandbox enabled.
@@ -61,7 +59,7 @@ buildPythonPackage rec {
    ];

  meta = with lib; {
    homepage = "https://pypi.org/project/mirakuru";
    homepage = "https://github.com/dbfixtures/mirakuru";
    description = "Process orchestration tool designed for functional and integration tests";
    changelog = "https://github.com/ClearcodeHQ/mirakuru/blob/v${version}/CHANGES.rst";
    license = licenses.lgpl3Plus;
+0 −19
Original line number Diff line number Diff line
--- a/tests/executors/test_unixsocket_executor.py
+++ b/tests/executors/test_unixsocket_executor.py
@@ -4,6 +4,7 @@ Some of these tests run ``nc``: when running Debian, make sure the
 ``netcat-openbsd`` package is used, not ``netcat-traditional``.
 """
 
+import os
 import sys
 
 import pytest
@@ -12,7 +13,7 @@ from mirakuru import TimeoutExpired
 from mirakuru.unixsocket import UnixSocketExecutor
 from tests import TEST_SOCKET_SERVER_PATH
 
-SOCKET_PATH = "/tmp/mirakuru.sock"
+SOCKET_PATH = os.path.join(os.getenv("TMPDIR", "/tmp"), "mirakuru.sock")
 
 SOCKET_SERVER_CMD = f"{sys.executable} {TEST_SOCKET_SERVER_PATH} {SOCKET_PATH}"
 
+5 −0
Original line number Diff line number Diff line
@@ -48,6 +48,11 @@ buildPythonPackage rec {
    pytest-asyncio
  ];

  disabledTests = [
    # Unsupported type: LiteralAlias
    "test_type_alias"
  ];

  pythonImporeCheck = [ "polyfactory" ];

  meta = {
+9 −11
Original line number Diff line number Diff line
diff --git a/psycopg/psycopg/pq/_pq_ctypes.py b/psycopg/psycopg/pq/_pq_ctypes.py
index f3a7b143..1bf935fb 100644
index 99e49357..3827d6dd 100644
--- a/psycopg/psycopg/pq/_pq_ctypes.py
+++ b/psycopg/psycopg/pq/_pq_ctypes.py
@@ -13,14 +13,11 @@ from ctypes import Structure, CFUNCTYPE, POINTER
 from ctypes import c_char, c_char_p, c_int, c_size_t, c_ubyte, c_uint, c_void_p
@@ -13,13 +13,10 @@ from ctypes import CFUNCTYPE, POINTER, Structure, c_char, c_char_p, c_int, c_siz
 from ctypes import c_ubyte, c_uint, c_void_p
 from typing import Any, NoReturn
 
-from .misc import find_libpq_full_path, version_pretty
+from .misc import version_pretty
 from ..errors import NotSupportedError
 
-libname = find_libpq_full_path()
-if not libname:
-if not (libname := find_libpq_full_path()):
-    raise ImportError("libpq library not found")
 
-
-pq = ctypes.cdll.LoadLibrary(libname)
+pq = ctypes.cdll.LoadLibrary("@libpq@")
 
 
 class FILE(Structure):
@@ -30,12 +27,7 @@ class FILE(Structure):
@@ -29,11 +26,7 @@ class FILE(Structure):
 FILE_ptr = POINTER(FILE)
 
 if sys.platform == "linux":
-    libcname = ctypes.util.find_library("c")
-    if not libcname:
-    if not (libcname := ctypes.util.find_library("c")):
-        # Likely this is a system using musl libc, see the following bug:
-        # https://github.com/python/cpython/issues/65821
-        libcname = "libc.so"
@@ -34,10 +32,10 @@ index f3a7b143..1bf935fb 100644
     fdopen = libc.fdopen
     fdopen.argtypes = (c_int, c_char_p)
diff --git a/tests/fix_pq.py b/tests/fix_pq.py
index 1cff7e18..218d90a0 100644
index 8d7e9ae6..074be456 100644
--- a/tests/fix_pq.py
+++ b/tests/fix_pq.py
@@ -49,18 +49,7 @@ def pytest_runtest_setup(item):
@@ -50,18 +50,7 @@ def pytest_runtest_setup(item):
 @pytest.fixture
 def libpq():
     """Return a ctypes wrapper to access the libpq."""
+2 −2
Original line number Diff line number Diff line
@@ -35,13 +35,13 @@

let
  pname = "psycopg";
  version = "3.2.6";
  version = "3.2.7";

  src = fetchFromGitHub {
    owner = "psycopg";
    repo = "psycopg";
    tag = version;
    hash = "sha256-fCiTu6lKFqY7Yl9KfmhRZQIDg5sEkXkQ95kPfIDSGn8=";
    hash = "sha256-v4R+5jgC4dTrL+i6O+UCCr7+g673hKi9YmrSeROLpZs=";
  };

  patches = [