diff --git a/pkgs/development/interpreters/python/cpython/3.10/raise-OSError-for-ERR_LIB_SYS.patch b/pkgs/development/interpreters/python/cpython/3.10/raise-OSError-for-ERR_LIB_SYS.patch deleted file mode 100644 index dd1fe891bf25..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.10/raise-OSError-for-ERR_LIB_SYS.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index e637830..80728d2 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -656,6 +656,11 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) - errstr = "Some I/O error occurred"; - } - } else { -+ if (ERR_GET_LIB(e) == ERR_LIB_SYS) { -+ // A system error is being reported; reason is set to errno -+ errno = ERR_GET_REASON(e); -+ return PyErr_SetFromErrno(PyExc_OSError); -+ } - p = PY_SSL_ERROR_SYSCALL; - } - break; -@@ -681,6 +686,11 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) - errstr = "EOF occurred in violation of protocol"; - } - #endif -+ if (ERR_GET_LIB(e) == ERR_LIB_SYS) { -+ // A system error is being reported; reason is set to errno -+ errno = ERR_GET_REASON(e); -+ return PyErr_SetFromErrno(PyExc_OSError); -+ } - break; - } - default: diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index cdcfb03bca77..5c5fd1ba8711 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -327,7 +327,7 @@ stdenv.mkDerivation (finalAttrs: { # libuuid, slowing down program startup a lot). noldconfigPatch ] - ++ optionals (pythonAtLeast "3.10" && pythonOlder "3.12") [ + ++ optionals (pythonAtLeast "3.11" && pythonOlder "3.12") [ # https://www.cve.org/CVERecord?id=CVE-2025-0938 ./CVE-2025-0938.patch ] @@ -383,9 +383,6 @@ stdenv.mkDerivation (finalAttrs: { # fix failing tests with openssl >= 3.4 # https://github.com/python/cpython/pull/127361 ] - ++ optionals (pythonAtLeast "3.10" && pythonOlder "3.11") [ - ./3.10/raise-OSError-for-ERR_LIB_SYS.patch - ] ++ optionals (pythonAtLeast "3.11" && pythonOlder "3.12") [ (fetchpatch { url = "https://github.com/python/cpython/commit/f4b31edf2d9d72878dab1f66a36913b5bcc848ec.patch"; diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 6a906240c53a..e9a124d481a4 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -61,10 +61,10 @@ sourceVersion = { major = "3"; minor = "10"; - patch = "16"; + patch = "17"; suffix = ""; }; - hash = "sha256-v7JJYJmQIgSRobkoUKBxNe0IMeQXOM9oHWPPAbKo+9E="; + hash = "sha256-TGgFDwSdG0rFqt0N9fJ5QcA1DSqeerCQfuXrUiXZ1rA="; inherit passthruFun; };