From 34677179536a7876efadc8510bb8befca4e41da55e563f77632068567b5cf3a7 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 14 Mar 2025 22:57:44 +0000 Subject: [PATCH 1/8] Accepting request 1253127 from devel:LoongArch:Factory - don't require rpm-build-python for base to fix bootstrap issue after primary_python change - replace rpm-build-python alias with python-rpm-packaging package name OBS-URL: https://build.opensuse.org/request/show/1253127 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python313?expand=0&rev=85 --- python313.changes | 7 +++++++ python313.spec | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/python313.changes b/python313.changes index 5678ee5..5c1088b 100644 --- a/python313.changes +++ b/python313.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Mar 14 08:39:01 UTC 2025 - Adrian Schröter + +- don't require rpm-build-python for base to fix bootstrap issue + after primary_python change +- replace rpm-build-python alias with python-rpm-packaging package name + ------------------------------------------------------------------- Mon Mar 10 15:44:31 UTC 2025 - Bernhard Wiedemann diff --git a/python313.spec b/python313.spec index ad9488a..05d6d30 100644 --- a/python313.spec +++ b/python313.spec @@ -238,8 +238,10 @@ BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(zlib) #!BuildIgnore: gdk-pixbuf-loader-rsvg %if 0%{?suse_version} >= 1550 -# The provider for python(abi) is in rpm-build-python -BuildRequires: rpm-build-python +# The provider for python(abi) is in python-rpm-packaging +%if "%{flavor}" != "base" +BuildRequires: python-rpm-packaging +%endif %endif %if 0%{?suse_version} >= 1500 && 0%{?suse_version} < 1599 BuildRequires: pkgconfig(libnsl) From 415df5f3cd200411cb7440b553ffeb635443c3b70b4f1e158134f5473836f521 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 11 Apr 2025 06:10:15 +0000 Subject: [PATCH 2/8] Accepting request 1268534 from devel:languages:python:Factory revert OBS-URL: https://build.opensuse.org/request/show/1268534 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python313?expand=0&rev=86 --- python313.changes | 7 ------- python313.spec | 6 ++---- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/python313.changes b/python313.changes index 5c1088b..5678ee5 100644 --- a/python313.changes +++ b/python313.changes @@ -1,10 +1,3 @@ -------------------------------------------------------------------- -Fri Mar 14 08:39:01 UTC 2025 - Adrian Schröter - -- don't require rpm-build-python for base to fix bootstrap issue - after primary_python change -- replace rpm-build-python alias with python-rpm-packaging package name - ------------------------------------------------------------------- Mon Mar 10 15:44:31 UTC 2025 - Bernhard Wiedemann diff --git a/python313.spec b/python313.spec index 05d6d30..ad9488a 100644 --- a/python313.spec +++ b/python313.spec @@ -238,10 +238,8 @@ BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(zlib) #!BuildIgnore: gdk-pixbuf-loader-rsvg %if 0%{?suse_version} >= 1550 -# The provider for python(abi) is in python-rpm-packaging -%if "%{flavor}" != "base" -BuildRequires: python-rpm-packaging -%endif +# The provider for python(abi) is in rpm-build-python +BuildRequires: rpm-build-python %endif %if 0%{?suse_version} >= 1500 && 0%{?suse_version} < 1599 BuildRequires: pkgconfig(libnsl) From 9624a1ae7e99787c5b933b540497572e7b1bdd27c121136ae3fe2e22b39dd154 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 11 Apr 2025 19:56:43 +0000 Subject: [PATCH 3/8] - Update to 3.13.3: - Tools/Demos - gh-131852: msgfmt no longer adds the POT-Creation-Date to generated .mo files for consistency with GNU msgfmt. - gh-85012: Correctly reset msgctxt when compiling messages in msgfmt. - gh-130025: The iOS testbed now correctly handles symlinks used as Python framework references. - Tests - gh-131050: test_ssl.test_dh_params is skipped if the underlying TLS library does not support finite-field ephemeral Diffie-Hellman. - gh-129200: Multiple iOS testbed runners can now be started at the same time without introducing an ambiguity over simulator ownership. - gh-130292: The iOS testbed will now run successfully on a machine that has not previously run Xcode tests (such as CI configurations). - gh-130293: The tests of terminal colorization are no longer sensitive to the value of the TERM variable in the testing environment. - gh-126332: Add unit tests for pyrepl. - Security - gh-131809: Update bundled libexpat to 2.7.1 - gh-131261: Upgrade to libexpat 2.7.0 - gh-127371: Avoid unbounded buffering for tempfile.SpooledTemporaryFile.writelines(). Previously, disk spillover was only checked after the lines iterator had been exhausted. This is now done after each line is written. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python313?expand=0&rev=87 --- F00251-change-user-install-location.patch | 26 +- Python-3.13.2.tar.xz | 3 - Python-3.13.2.tar.xz.sigstore | 1 - Python-3.13.3.tar.xz | 3 + Python-3.13.3.tar.xz.sigstore | 1 + bpo-31046_ensurepip_honours_prefix.patch | 66 +++--- doc-py38-to-py36.patch | 106 +++++---- python313.changes | 274 ++++++++++++++++++++++ python313.spec | 2 +- subprocess-raise-timeout.patch | 31 ++- 10 files changed, 411 insertions(+), 102 deletions(-) delete mode 100644 Python-3.13.2.tar.xz delete mode 100644 Python-3.13.2.tar.xz.sigstore create mode 100644 Python-3.13.3.tar.xz create mode 100644 Python-3.13.3.tar.xz.sigstore diff --git a/F00251-change-user-install-location.patch b/F00251-change-user-install-location.patch index a08004d..0e67e07 100644 --- a/F00251-change-user-install-location.patch +++ b/F00251-change-user-install-location.patch @@ -28,9 +28,11 @@ Co-authored-by: Lumír Balhar Lib/test/test_sysconfig.py | 17 +++++++++++-- 2 files changed, 67 insertions(+), 7 deletions(-) ---- a/Lib/sysconfig/__init__.py -+++ b/Lib/sysconfig/__init__.py -@@ -106,6 +106,11 @@ if os.name == 'nt': +Index: Python-3.13.3/Lib/sysconfig/__init__.py +=================================================================== +--- Python-3.13.3.orig/Lib/sysconfig/__init__.py 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Lib/sysconfig/__init__.py 2025-04-11 21:52:31.769387873 +0200 +@@ -106,6 +106,11 @@ else: _INSTALL_SCHEMES['venv'] = _INSTALL_SCHEMES['posix_venv'] @@ -42,7 +44,7 @@ Co-authored-by: Lumír Balhar def _get_implementation(): return 'Python' -@@ -167,13 +172,28 @@ if _HAS_USER_BASE: +@@ -167,13 +172,28 @@ }, } @@ -71,7 +73,7 @@ Co-authored-by: Lumír Balhar _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) # Mutex guarding initialization of _CONFIG_VARS. _CONFIG_VARS_LOCK = threading.RLock() -@@ -259,11 +279,40 @@ def _extend_dict(target_dict, other_dict +@@ -266,11 +286,40 @@ target_dict[key] = value @@ -113,7 +115,7 @@ Co-authored-by: Lumír Balhar if os.name == 'nt': # On Windows we want to substitute 'lib' for schemes rather # than the native value (without modifying vars, in case it -@@ -464,10 +513,8 @@ def _init_config_vars(): +@@ -471,10 +520,8 @@ # Normalized versions of prefix and exec_prefix are handy to have; # in fact, these are the standard versions used most places in the # Distutils. @@ -126,9 +128,11 @@ Co-authored-by: Lumír Balhar _CONFIG_VARS['py_version'] = _PY_VERSION _CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT _CONFIG_VARS['py_version_nodot'] = _PY_VERSION_SHORT_NO_DOT ---- a/Lib/test/test_sysconfig.py -+++ b/Lib/test/test_sysconfig.py -@@ -130,8 +130,19 @@ class TestSysConfig(unittest.TestCase): +Index: Python-3.13.3/Lib/test/test_sysconfig.py +=================================================================== +--- Python-3.13.3.orig/Lib/test/test_sysconfig.py 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Lib/test/test_sysconfig.py 2025-04-11 21:52:31.769841915 +0200 +@@ -130,8 +130,19 @@ for scheme in _INSTALL_SCHEMES: for name in _INSTALL_SCHEMES[scheme]: expected = _INSTALL_SCHEMES[scheme][name].format(**config_vars) @@ -149,7 +153,7 @@ Co-authored-by: Lumír Balhar os.path.normpath(expected), ) -@@ -386,7 +397,7 @@ class TestSysConfig(unittest.TestCase): +@@ -386,7 +397,7 @@ self.assertTrue(os.path.isfile(config_h), config_h) def test_get_scheme_names(self): @@ -158,7 +162,7 @@ Co-authored-by: Lumír Balhar if HAS_USER_BASE: wanted.extend(['nt_user', 'osx_framework_user', 'posix_user']) self.assertEqual(get_scheme_names(), tuple(sorted(wanted))) -@@ -398,6 +409,8 @@ class TestSysConfig(unittest.TestCase): +@@ -398,6 +409,8 @@ cmd = "-c", "import sysconfig; print(sysconfig.get_platform())" self.assertEqual(py.call_real(*cmd), py.call_link(*cmd)) diff --git a/Python-3.13.2.tar.xz b/Python-3.13.2.tar.xz deleted file mode 100644 index a64a7f0..0000000 --- a/Python-3.13.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d984bcc57cd67caab26f7def42e523b1c015bbc5dc07836cf4f0b63fa159eb56 -size 22621108 diff --git a/Python-3.13.2.tar.xz.sigstore b/Python-3.13.2.tar.xz.sigstore deleted file mode 100644 index 8b40472..0000000 --- a/Python-3.13.2.tar.xz.sigstore +++ /dev/null @@ -1 +0,0 @@ -{"mediaType": "application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial": {"certificate": {"rawBytes": "MIICyjCCAk+gAwIBAgIUD4NQdNCt1/K/JvAVyjbYigv67kIwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjUwMjA0MTg0NTIwWhcNMjUwMjA0MTg1NTIwWjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEbqber3xDbIeHx40nXMQZcd3gsTxtq8e1TFD0eK7Im8V+dqVIRPey2E6BcnbwGMvL1q1qmTwGdUn5RPbFaehz7qOCAW4wggFqMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAdBgNVHQ4EFgQUSuhJIwDMV36A3eaykAuKcN4RnOEwHwYDVR0jBBgwFoAU39Ppz1YkEZb5qNjpKFWixi4YZD8wHwYDVR0RAQH/BBUwE4ERdGhvbWFzQHB5dGhvbi5vcmcwKQYKKwYBBAGDvzABAQQbaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29tMCsGCisGAQQBg78wAQgEHQwbaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29tMIGJBgorBgEEAdZ5AgQCBHsEeQB3AHUA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGU0kf7wwAABAMARjBEAiAfqmC3I+sDSrXCjgOsO6Ur44c7jeAGRRwc7KdbXRBMzgIgAgcS4SWPdkxXIHicW4DulEn3ulaL3FVHBRLoNQW0JTcwCgYIKoZIzj0EAwMDaQAwZgIxAJ2T2M+pFCUERzOgZct1jxZpk9pgSQyuBU57U4/Hj3xKC12+PDgGcikx1FrC1wwr5wIxAJ156hL8usRvVGskEtmpiuTbaT9+zPgDjWfkvhx6b3Pdrn08XaQJ9EN9jiLrbeBM9g=="}, "tlogEntries": [{"logIndex": "168670065", "logId": {"keyId": "wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion": {"kind": "hashedrekord", "version": "0.0.1"}, "integratedTime": "1738694720", "inclusionPromise": {"signedEntryTimestamp": "MEUCIAekV+blODko91xI2vm15TtdYBXhj8UF28Yt+cMx33rrAiEA0A6bc18P1q3drg9y9nR53/m8DXoKwsTEZm5yZ5+JFa4="}, "inclusionProof": {"logIndex": "46765803", "rootHash": "33ULyWL9ydLeQexNIooy3SJNY9i3ryqihkcOKvsQFF4=", "treeSize": "46765804", "hashes": ["3v2kqP/86p78AkWzBhXN+cNw9IypWJVk1oLovoNewtw=", "hymqDI9hjW2a2SKx04PIeTgJIL2IITHnQP5iCfIzoKM=", "om9oCy1VrcALPEQhPkoPogYSHHCAjFbWSLZJuHEfapo=", "opVQSZr0TT+f4kq/+ypm8ifo78VX/rg2sMxpk3Q6ZYQ=", "u+Mk6XwpHu128vzvk1pAczTT6FfryNB+dIhXYEj/H8c=", "625NsawEzZEukjE6mmJJ6hFySLGojGI4BGm8cRxwv68=", "5S8IyLnwlAhLZBEUNH1SaLO2dckc8NKwnGVgAO+3QQI=", "3onlfMyeVMDSIvH0BhkTTMYIWUuOZa+vitTl74eA7yo=", "TgYmpZ2JTTWko4kWZxTIAYkJpJpeOjVCg6ICKYnUS+8=", "PAMmlBIG22MGowjyiChYp5iB6NiTRa0xKI2vnvpExek=", "NS61TOUCaTiUJotPDnr7bTP/1ogKsWSnbgDlk1uvGzM=", "MvEBWaRrd43Pq04mjOFzGW9RiqBSzMBfuFXKBIVtQnc=", "Zse3BPkR/cJv62LvVuiDH+EpgIE5v3V3qXdG8HQFf1A=", "jU9+tgjTIKUYGeU7T7RjqyL+F+gFV9tCdwX2GZ1UtQs=", "vemyaMj0Na1LMjbB/9Dmkq8T+jAb3o+yCESgAayUABU="], "checkpoint": {"envelope": "rekor.sigstore.dev - 1193050959916656506\n46765804\n33ULyWL9ydLeQexNIooy3SJNY9i3ryqihkcOKvsQFF4=\n\n\u2014 rekor.sigstore.dev wNI9ajBGAiEA+12Y0eYDOViIlr8UQrapNyarHE/PGGfC7iXrAHr0R2cCIQC0FJWVaUHoTxuMaM3KvZaY1toGa6U5sj9BcrhnwcEQ8A==\n"}}, "canonicalizedBody": "eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiJkOTg0YmNjNTdjZDY3Y2FhYjI2ZjdkZWY0MmU1MjNiMWMwMTViYmM1ZGMwNzgzNmNmNGYwYjYzZmExNTllYjU2In19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FVUNJUUNMQXBvUGEvQ0FZbVAxS0FSQ3Vmb1J6L1V2RVJhbDRKcnNkNXl4NmtleHpnSWdicEFIaUFTSjBDY2FKZm5LczFzL0VtZW0ybDNyT2svODdITVZaR0gwUUlJPSIsInB1YmxpY0tleSI6eyJjb250ZW50IjoiTFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVTjVha05EUVdzclowRjNTVUpCWjBsVlJEUk9VV1JPUTNReEwwc3ZTblpCVm5scVlsbHBaM1kyTjJ0SmQwTm5XVWxMYjFwSmVtb3dSVUYzVFhjS1RucEZWazFDVFVkQk1WVkZRMmhOVFdNeWJHNWpNMUoyWTIxVmRWcEhWakpOVWpSM1NFRlpSRlpSVVVSRmVGWjZZVmRrZW1SSE9YbGFVekZ3WW01U2JBcGpiVEZzV2tkc2FHUkhWWGRJYUdOT1RXcFZkMDFxUVRCTlZHY3dUbFJKZDFkb1kwNU5hbFYzVFdwQk1FMVVaekZPVkVsM1YycEJRVTFHYTNkRmQxbElDa3R2V2tsNmFqQkRRVkZaU1V0dldrbDZhakJFUVZGalJGRm5RVVZpY1dKbGNqTjRSR0pKWlVoNE5EQnVXRTFSV21Oa00yZHpWSGgwY1RobE1WUkdSREFLWlVzM1NXMDRWaXRrY1ZaSlVsQmxlVEpGTmtKamJtSjNSMDEyVERGeE1YRnRWSGRIWkZWdU5WSlFZa1poWldoNk4zRlBRMEZYTkhkblowWnhUVUUwUndwQk1WVmtSSGRGUWk5M1VVVkJkMGxJWjBSQlZFSm5UbFpJVTFWRlJFUkJTMEpuWjNKQ1owVkdRbEZqUkVGNlFXUkNaMDVXU0ZFMFJVWm5VVlZUZFdoS0NrbDNSRTFXTXpaQk0yVmhlV3RCZFV0alRqUlNiazlGZDBoM1dVUldVakJxUWtKbmQwWnZRVlV6T1ZCd2VqRlphMFZhWWpWeFRtcHdTMFpYYVhocE5Ga0tXa1E0ZDBoM1dVUldVakJTUVZGSUwwSkNWWGRGTkVWU1pFZG9kbUpYUm5wUlNFSTFaRWRvZG1KcE5YWmpiV04zUzFGWlMwdDNXVUpDUVVkRWRucEJRZ3BCVVZGaVlVaFNNR05JVFRaTWVUbG9XVEpPZG1SWE5UQmplVFZ1WWpJNWJtSkhWWFZaTWpsMFRVTnpSME5wYzBkQlVWRkNaemM0ZDBGUlowVklVWGRpQ21GSVVqQmpTRTAyVEhrNWFGa3lUblprVnpVd1kzazFibUl5T1c1aVIxVjFXVEk1ZEUxSlIwcENaMjl5UW1kRlJVRmtXalZCWjFGRFFraHpSV1ZSUWpNS1FVaFZRVE5VTUhkaGMySklSVlJLYWtkU05HTnRWMk16UVhGS1MxaHlhbVZRU3pNdmFEUndlV2RET0hBM2J6UkJRVUZIVlRCclpqZDNkMEZCUWtGTlFRcFNha0pGUVdsQlpuRnRRek5KSzNORVUzSllRMnBuVDNOUE5sVnlORFJqTjJwbFFVZFNVbmRqTjB0a1lsaFNRazE2WjBsblFXZGpVelJUVjFCa2EzaFlDa2xJYVdOWE5FUjFiRVZ1TTNWc1lVd3pSbFpJUWxKTWIwNVJWekJLVkdOM1EyZFpTVXR2V2tsNmFqQkZRWGROUkdGUlFYZGFaMGw0UVVveVZESk5LM0FLUmtOVlJWSjZUMmRhWTNReGFuaGFjR3M1Y0dkVFVYbDFRbFUxTjFVMEwwaHFNM2hMUXpFeUsxQkVaMGRqYVd0NE1VWnlRekYzZDNJMWQwbDRRVW94TlFvMmFFdzRkWE5TZGxaSGMydEZkRzF3YVhWVVltRlVPU3Q2VUdkRWFsZG1hM1pvZURaaU0xQmtjbTR3T0ZoaFVVbzVSVTQ1YW1sTWNtSmxRazA1WnowOUNpMHRMUzB0UlU1RUlFTkZVbFJKUmtsRFFWUkZMUzB0TFMwSyJ9fX19"}], "timestampVerificationData": {}}, "messageSignature": {"messageDigest": {"algorithm": "SHA2_256", "digest": "2YS8xXzWfKqyb33vQuUjscAVu8XcB4Ns9PC2P6FZ61Y="}, "signature": "MEUCIQCLApoPa/CAYmP1KARCufoRz/UvERal4Jrsd5yx6kexzgIgbpAHiASJ0CcaJfnKs1s/Emem2l3rOk/87HMVZGH0QII="}} diff --git a/Python-3.13.3.tar.xz b/Python-3.13.3.tar.xz new file mode 100644 index 0000000..124c035 --- /dev/null +++ b/Python-3.13.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40f868bcbdeb8149a3149580bb9bfd407b3321cd48f0be631af955ac92c0e041 +size 22654240 diff --git a/Python-3.13.3.tar.xz.sigstore b/Python-3.13.3.tar.xz.sigstore new file mode 100644 index 0000000..220fba8 --- /dev/null +++ b/Python-3.13.3.tar.xz.sigstore @@ -0,0 +1 @@ +{"mediaType": "application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial": {"certificate": {"rawBytes": "MIICyjCCAlCgAwIBAgIUW58MW2P+CwyzYzHaIuAK12gGJqIwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjUwNDA4MTcwOTUwWhcNMjUwNDA4MTcxOTUwWjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEf+cTSQIElx0bw4BYf2qpKSxfUtm3PhehuBcTW3uoM+EnAUOv1pvCmnTteblYdA5s80cFMzvztRCKUCnvBTi+cKOCAW8wggFrMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAdBgNVHQ4EFgQU/72Qdhdl1+U/9MdaCnja9KhnRBgwHwYDVR0jBBgwFoAU39Ppz1YkEZb5qNjpKFWixi4YZD8wHwYDVR0RAQH/BBUwE4ERdGhvbWFzQHB5dGhvbi5vcmcwKQYKKwYBBAGDvzABAQQbaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29tMCsGCisGAQQBg78wAQgEHQwbaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29tMIGKBgorBgEEAdZ5AgQCBHwEegB4AHYA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGWFmEv3gAABAMARzBFAiBJV9Vq6+FQfjXs74fcGUOsuBsMdCS1SzabcwCeFgO4UgIhAI1uOTXNb3iARGgglGWmTHeplKpGCHj+9yCPticrd2TrMAoGCCqGSM49BAMDA2gAMGUCMBRlMgfY9hXwAO7OtJpDIecgS9xyghjq/ECzfX12I1rDnF1i9DDr/1AY2SsOpAEW/AIxANwA+iMGDPdrvrp6iQtONa/37WhvKJQ+pglUHcrMcsZobpRHyD7shomq0SkxYA+icg=="}, "tlogEntries": [{"logIndex": "194024100", "logId": {"keyId": "wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion": {"kind": "hashedrekord", "version": "0.0.1"}, "integratedTime": "1744132190", "inclusionPromise": {"signedEntryTimestamp": "MEQCIGlOwO+ANhog+/QCGrUQpJZ6axA6UaE86sNaN8vNj+QiAiA/7d5r4Em9+T6ZnAoc+BLv2ExsJcG8OCgqJvvF5ZJuxw=="}, "inclusionProof": {"logIndex": "72119838", "rootHash": "WvXJaELSoRtosW8xi2EfnsHoXkmpACSbqywq8TfHR1s=", "treeSize": "72119843", "hashes": ["jgENOnZn6TEf8ylEIYa0JR6FDNY+6ehLszSGwnEMpQU=", "n4F70M6fgFOoXeQXsHA3dWN3ASf9JTc8Z1qQuECW75M=", "RgczeejL0XzzT46BcDe3Z4s9D2QcpqnLv4M8+1//nUY=", "sfHyJ5ybNWBxYHNTEvBl90AOfY+44p++5XzDCBTB5RQ=", "JqDONCapxnE2xLLKg9gRz2xF/70qW/AT/GEk0BrOTw4=", "Kzx15aA9iYz3QmqQyoe03wPppaDYPNVmJeN2J8wCAR4=", "V5ZRP+iiphMoS6raAUPBERnIOeTUs8417+6gSEKM/n4=", "759Ej7PWC5mfI+qe2WSvB/3yyxTCPVUcjobBVnw5UkY=", "thdh10t3YSAkcLudlXJR1SELWGQbnzOa8SAkNLF/CYo=", "BmjRaZPKQ5bVHiwShpJ9cZKgX1rQ4iJrYo2rcEntw0o=", "Wr475nJfgYQLV7M6HuAo4zRJeK0nVZeV5zBNbie9m9U=", "cBeUncMhaAbVvOdQXg7Ev8AuOxlXrF0R/+5x1+5nmIo=", "K26LG80DXyb+bC58c4Nw00WigG52v0PCsZGY3ExGsts=", "WEm5OgPzJpYROv+4CcrieexCYyQKrLUH3hbxmcQQ+DM=", "7v8qPHNDLerpduaMx06eb/MwgoQwczTn/cYGKX/9wZ4="], "checkpoint": {"envelope": "rekor.sigstore.dev - 1193050959916656506\n72119843\nWvXJaELSoRtosW8xi2EfnsHoXkmpACSbqywq8TfHR1s=\n\n\u2014 rekor.sigstore.dev wNI9ajBEAiAr3CtxLPjTl8zeJINGRTEhV2fchhMWTABj0kKfwmDvMwIgQYxaVBOI8NhmcU1YpPa7KD6770ZIC5invnZfRa/OpiU=\n"}}, "canonicalizedBody": "eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiI0MGY4NjhiY2JkZWI4MTQ5YTMxNDk1ODBiYjliZmQ0MDdiMzMyMWNkNDhmMGJlNjMxYWY5NTVhYzkyYzBlMDQxIn19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FWUNJUURHbFBQYytoNS9QVm9qaHRnUkdOc3A4NW9iT3d1YkVVVXN6REZWSmE2ZVVRSWhBSnlYVTlWeGNSNHR6WmJyVmtOeDBPMnJvc01xV1lVYXNtMGMxZmlndDFkZSIsInB1YmxpY0tleSI6eyJjb250ZW50IjoiTFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVTjVha05EUVd4RFowRjNTVUpCWjBsVlZ6VTRUVmN5VUN0RGQzbDZXWHBJWVVsMVFVc3hNbWRIU25GSmQwTm5XVWxMYjFwSmVtb3dSVUYzVFhjS1RucEZWazFDVFVkQk1WVkZRMmhOVFdNeWJHNWpNMUoyWTIxVmRWcEhWakpOVWpSM1NFRlpSRlpSVVVSRmVGWjZZVmRrZW1SSE9YbGFVekZ3WW01U2JBcGpiVEZzV2tkc2FHUkhWWGRJYUdOT1RXcFZkMDVFUVRSTlZHTjNUMVJWZDFkb1kwNU5hbFYzVGtSQk5FMVVZM2hQVkZWM1YycEJRVTFHYTNkRmQxbElDa3R2V2tsNmFqQkRRVkZaU1V0dldrbDZhakJFUVZGalJGRm5RVVZtSzJOVVUxRkpSV3g0TUdKM05FSlpaakp4Y0V0VGVHWlZkRzB6VUdobGFIVkNZMVFLVnpOMWIwMHJSVzVCVlU5Mk1YQjJRMjF1VkhSbFlteFpaRUUxY3pnd1kwWk5lblo2ZEZKRFMxVkRiblpDVkdrclkwdFBRMEZYT0hkblowWnlUVUUwUndwQk1WVmtSSGRGUWk5M1VVVkJkMGxJWjBSQlZFSm5UbFpJVTFWRlJFUkJTMEpuWjNKQ1owVkdRbEZqUkVGNlFXUkNaMDVXU0ZFMFJVWm5VVlV2TnpKUkNtUm9aR3d4SzFVdk9VMWtZVU51YW1FNVMyaHVVa0puZDBoM1dVUldVakJxUWtKbmQwWnZRVlV6T1ZCd2VqRlphMFZhWWpWeFRtcHdTMFpYYVhocE5Ga0tXa1E0ZDBoM1dVUldVakJTUVZGSUwwSkNWWGRGTkVWU1pFZG9kbUpYUm5wUlNFSTFaRWRvZG1KcE5YWmpiV04zUzFGWlMwdDNXVUpDUVVkRWRucEJRZ3BCVVZGaVlVaFNNR05JVFRaTWVUbG9XVEpPZG1SWE5UQmplVFZ1WWpJNWJtSkhWWFZaTWpsMFRVTnpSME5wYzBkQlVWRkNaemM0ZDBGUlowVklVWGRpQ21GSVVqQmpTRTAyVEhrNWFGa3lUblprVnpVd1kzazFibUl5T1c1aVIxVjFXVEk1ZEUxSlIwdENaMjl5UW1kRlJVRmtXalZCWjFGRFFraDNSV1ZuUWpRS1FVaFpRVE5VTUhkaGMySklSVlJLYWtkU05HTnRWMk16UVhGS1MxaHlhbVZRU3pNdmFEUndlV2RET0hBM2J6UkJRVUZIVjBadFJYWXpaMEZCUWtGTlFRcFNla0pHUVdsQ1NsWTVWbkUySzBaUlptcFljemMwWm1OSFZVOXpkVUp6VFdSRFV6RlRlbUZpWTNkRFpVWm5UelJWWjBsb1FVa3hkVTlVV0U1aU0ybEJDbEpIWjJkc1IxZHRWRWhsY0d4TGNFZERTR29yT1hsRFVIUnBZM0prTWxSeVRVRnZSME5EY1VkVFRUUTVRa0ZOUkVFeVowRk5SMVZEVFVKU2JFMW5abGtLT1doWWQwRlBOMDkwU25CRVNXVmpaMU01ZUhsbmFHcHhMMFZEZW1aWU1USkpNWEpFYmtZeGFUbEVSSEl2TVVGWk1sTnpUM0JCUlZjdlFVbDRRVTUzUVFvcmFVMUhSRkJrY25aeWNEWnBVWFJQVG1Fdk16ZFhhSFpMU2xFcmNHZHNWVWhqY2sxamMxcHZZbkJTU0hsRU4zTm9iMjF4TUZOcmVGbEJLMmxqWnowOUNpMHRMUzB0UlU1RUlFTkZVbFJKUmtsRFFWUkZMUzB0TFMwSyJ9fX19"}], "timestampVerificationData": {}}, "messageSignature": {"messageDigest": {"algorithm": "SHA2_256", "digest": "QPhovL3rgUmjFJWAu5v9QHszIc1I8L5jGvlVrJLA4EE="}, "signature": "MEYCIQDGlPPc+h5/PVojhtgRGNsp85obOwubEUUszDFVJa6eUQIhAJyXU9VxcR4tzZbrVkNx0O2rosMqWYUasm0c1figt1de"}} diff --git a/bpo-31046_ensurepip_honours_prefix.patch b/bpo-31046_ensurepip_honours_prefix.patch index 98c61a0..b62eacf 100644 --- a/bpo-31046_ensurepip_honours_prefix.patch +++ b/bpo-31046_ensurepip_honours_prefix.patch @@ -5,28 +5,32 @@ Subject: [PATCH] bpo-31046: ensurepip does not honour the value of $(prefix) Co-Authored-By: Xavier de Gaye --- - Doc/library/ensurepip.rst | 9 +++-- + Doc/library/ensurepip.rst | 12 +++++- Lib/ensurepip/__init__.py | 18 +++++++--- Lib/test/test_ensurepip.py | 11 ++++++ Makefile.pre.in | 4 +- Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst | 1 - 5 files changed, 34 insertions(+), 9 deletions(-) + 5 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst ---- a/Doc/library/ensurepip.rst -+++ b/Doc/library/ensurepip.rst -@@ -59,8 +59,9 @@ is at least as recent as the one availab +Index: Python-3.13.3/Doc/library/ensurepip.rst +=================================================================== +--- Python-3.13.3.orig/Doc/library/ensurepip.rst 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Doc/library/ensurepip.rst 2025-04-11 21:54:47.449458319 +0200 +@@ -61,7 +61,11 @@ By default, ``pip`` is installed into the current virtual environment (if one is active) or into the system site packages (if there is no active virtual environment). The installation location can be controlled -through two additional command line options: +through some additional command line options: ++ ++.. option:: --prefix ++ ++ Installs ``pip`` using the given directory prefix. -+* ``--prefix ``: Installs ``pip`` using the given directory prefix. - * :samp:`--root {dir}`: Installs ``pip`` relative to the given root directory - rather than the root of the currently active virtual environment (if any) - or the default root for the current Python installation. -@@ -92,7 +93,7 @@ Module API + .. option:: --root + +@@ -102,7 +106,7 @@ Returns a string specifying the available version of pip that will be installed when bootstrapping an environment. @@ -35,7 +39,7 @@ Co-Authored-By: Xavier de Gaye altinstall=False, default_pip=False, \ verbosity=0) -@@ -102,6 +103,8 @@ Module API +@@ -112,6 +116,8 @@ If *root* is ``None``, then installation uses the default install location for the current environment. @@ -44,7 +48,7 @@ Co-Authored-By: Xavier de Gaye *upgrade* indicates whether or not to upgrade an existing installation of an earlier version of ``pip`` to the available version. -@@ -122,6 +125,8 @@ Module API +@@ -132,6 +138,8 @@ *verbosity* controls the level of output to :data:`sys.stdout` from the bootstrapping operation. @@ -53,9 +57,11 @@ Co-Authored-By: Xavier de Gaye .. audit-event:: ensurepip.bootstrap root ensurepip.bootstrap .. note:: ---- a/Lib/ensurepip/__init__.py -+++ b/Lib/ensurepip/__init__.py -@@ -106,27 +106,27 @@ def _disable_pip_configuration_settings( +Index: Python-3.13.3/Lib/ensurepip/__init__.py +=================================================================== +--- Python-3.13.3.orig/Lib/ensurepip/__init__.py 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Lib/ensurepip/__init__.py 2025-04-11 21:53:49.548370352 +0200 +@@ -106,27 +106,27 @@ os.environ['PIP_CONFIG_FILE'] = os.devnull @@ -88,7 +94,7 @@ Co-Authored-By: Xavier de Gaye Note that calling this function will alter both sys.path and os.environ. """ -@@ -162,6 +162,8 @@ def _bootstrap(*, root=None, upgrade=Fal +@@ -162,6 +162,8 @@ args = ["install", "--no-cache-dir", "--no-index", "--find-links", tmpdir] if root: args += ["--root", root] @@ -97,7 +103,7 @@ Co-Authored-By: Xavier de Gaye if upgrade: args += ["--upgrade"] if user: -@@ -238,6 +240,11 @@ def _main(argv=None): +@@ -238,6 +240,11 @@ help="Install everything relative to this alternate root directory.", ) parser.add_argument( @@ -109,7 +115,7 @@ Co-Authored-By: Xavier de Gaye "--altinstall", action="store_true", default=False, -@@ -256,6 +263,7 @@ def _main(argv=None): +@@ -256,6 +263,7 @@ return _bootstrap( root=args.root, @@ -117,9 +123,11 @@ Co-Authored-By: Xavier de Gaye upgrade=args.upgrade, user=args.user, verbosity=args.verbosity, ---- a/Lib/test/test_ensurepip.py -+++ b/Lib/test/test_ensurepip.py -@@ -101,6 +101,17 @@ class TestBootstrap(EnsurepipMixin, unit +Index: Python-3.13.3/Lib/test/test_ensurepip.py +=================================================================== +--- Python-3.13.3.orig/Lib/test/test_ensurepip.py 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Lib/test/test_ensurepip.py 2025-04-11 21:53:49.548691764 +0200 +@@ -101,6 +101,17 @@ unittest.mock.ANY, ) @@ -137,9 +145,11 @@ Co-Authored-By: Xavier de Gaye def test_bootstrapping_with_user(self): ensurepip.bootstrap(user=True) ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -2139,7 +2139,7 @@ install: @FRAMEWORKINSTALLFIRST@ @INSTAL +Index: Python-3.13.3/Makefile.pre.in +=================================================================== +--- Python-3.13.3.orig/Makefile.pre.in 2025-04-11 21:52:35.635495820 +0200 ++++ Python-3.13.3/Makefile.pre.in 2025-04-11 21:53:49.549094822 +0200 +@@ -2139,7 +2139,7 @@ install|*) ensurepip="" ;; \ esac; \ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ @@ -148,7 +158,7 @@ Co-Authored-By: Xavier de Gaye fi .PHONY: altinstall -@@ -2150,7 +2150,7 @@ altinstall: commoninstall +@@ -2150,7 +2150,7 @@ install|*) ensurepip="--altinstall" ;; \ esac; \ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ @@ -157,7 +167,9 @@ Co-Authored-By: Xavier de Gaye fi .PHONY: commoninstall ---- /dev/null -+++ b/Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst +Index: Python-3.13.3/Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ Python-3.13.3/Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst 2025-04-11 21:53:49.549612071 +0200 @@ -0,0 +1 @@ +A directory prefix can now be specified when using :mod:`ensurepip`. diff --git a/doc-py38-to-py36.patch b/doc-py38-to-py36.patch index baf1d0a..28a725d 100644 --- a/doc-py38-to-py36.patch +++ b/doc-py38-to-py36.patch @@ -8,9 +8,11 @@ Doc/tools/extensions/patchlevel.py | 9 ++--- 7 files changed, 87 insertions(+), 66 deletions(-) ---- a/Doc/conf.py -+++ b/Doc/conf.py -@@ -17,6 +17,9 @@ sys.path.append(os.path.abspath('include +Index: Python-3.13.3/Doc/conf.py +=================================================================== +--- Python-3.13.3.orig/Doc/conf.py 2025-04-11 21:52:28.845065297 +0200 ++++ Python-3.13.3/Doc/conf.py 2025-04-11 21:55:28.065280454 +0200 +@@ -18,6 +18,9 @@ # Python specific content from Doc/Tools/extensions/pyspecific.py from pyspecific import SOURCE_URI @@ -20,16 +22,16 @@ # General configuration # --------------------- -@@ -90,7 +93,7 @@ highlight_language = 'python3' +@@ -92,7 +95,7 @@ # Minimum version of sphinx required # Keep this version in sync with ``Doc/requirements.txt``. --needs_sphinx = '8.1.3' +-needs_sphinx = '8.2.0' +needs_sphinx = '4.2.0' # Create table of contents entries for domain objects (e.g. functions, classes, # attributes, etc.). Default is True. -@@ -359,7 +362,7 @@ html_short_title = f'{release} Documenta +@@ -361,7 +364,7 @@ # (See .readthedocs.yml and https://docs.readthedocs.io/en/stable/reference/environment-variables.html) is_deployment_preview = os.getenv("READTHEDOCS_VERSION_TYPE") == "external" repository_url = os.getenv("READTHEDOCS_GIT_CLONE_URL", "") @@ -38,7 +40,7 @@ html_context = { "is_deployment_preview": is_deployment_preview, "repository_url": repository_url or None, -@@ -604,6 +607,16 @@ extlinks = { +@@ -606,6 +609,16 @@ } extlinks_detect_hardcoded_links = True @@ -55,9 +57,11 @@ # Options for c_annotations extension # ----------------------------------- ---- a/Doc/tools/check-warnings.py -+++ b/Doc/tools/check-warnings.py -@@ -228,7 +228,8 @@ def fail_if_regression( +Index: Python-3.13.3/Doc/tools/check-warnings.py +=================================================================== +--- Python-3.13.3.orig/Doc/tools/check-warnings.py 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Doc/tools/check-warnings.py 2025-04-11 21:55:11.212002463 +0200 +@@ -228,7 +228,8 @@ print(filename) for warning in warnings: if filename in warning: @@ -67,8 +71,10 @@ print(" {line}: {msg}".format_map(match)) return -1 return 0 ---- a/Doc/tools/extensions/audit_events.py -+++ b/Doc/tools/extensions/audit_events.py +Index: Python-3.13.3/Doc/tools/extensions/audit_events.py +=================================================================== +--- Python-3.13.3.orig/Doc/tools/extensions/audit_events.py 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Doc/tools/extensions/audit_events.py 2025-04-11 21:55:11.212275615 +0200 @@ -1,9 +1,6 @@ """Support for documenting audit events.""" @@ -79,7 +85,7 @@ from docutils import nodes from sphinx.errors import NoUri -@@ -12,12 +9,11 @@ from sphinx.transforms.post_transforms i +@@ -12,12 +9,11 @@ from sphinx.util import logging from sphinx.util.docutils import SphinxDirective @@ -96,7 +102,7 @@ logger = logging.getLogger(__name__) -@@ -32,16 +28,16 @@ _SYNONYMS = [ +@@ -32,16 +28,16 @@ class AuditEvents: def __init__(self) -> None: @@ -117,7 +123,7 @@ ) -> None: if name in self.events: self._check_args_match(name, args) -@@ -49,7 +45,7 @@ class AuditEvents: +@@ -49,7 +45,7 @@ self.events[name] = args self.sources.setdefault(name, []).append(source) @@ -126,7 +132,7 @@ current_args = self.events[name] msg = ( f"Mismatched arguments for audit-event {name}: " -@@ -60,7 +56,7 @@ class AuditEvents: +@@ -60,7 +56,7 @@ if len(current_args) != len(args): logger.warning(msg) return @@ -135,7 +141,7 @@ if a1 == a2: continue if any(a1 in s and a2 in s for s in _SYNONYMS): -@@ -73,7 +69,7 @@ class AuditEvents: +@@ -73,7 +69,7 @@ name_clean = re.sub(r"\W", "_", name) return f"audit_event_{name_clean}_{source_count}" @@ -144,7 +150,7 @@ for name in sorted(self.events.keys()): yield name, self.events[name], self.sources[name] -@@ -97,7 +93,7 @@ def audit_events_purge( +@@ -97,7 +93,7 @@ def audit_events_merge( app: Sphinx, env: BuildEnvironment, @@ -153,7 +159,7 @@ other: BuildEnvironment, ) -> None: """In Sphinx parallel builds, this merges audit_events from subprocesses.""" -@@ -126,14 +122,16 @@ class AuditEvent(SphinxDirective): +@@ -126,14 +122,16 @@ ), ] @@ -176,7 +182,7 @@ else: args = [] ids = [] -@@ -169,7 +167,7 @@ class audit_event_list(nodes.General, no +@@ -169,7 +167,7 @@ class AuditEventListDirective(SphinxDirective): @@ -185,7 +191,7 @@ return [audit_event_list()] -@@ -181,7 +179,11 @@ class AuditEventListTransform(SphinxPost +@@ -181,7 +179,11 @@ return table = self._make_table(self.app.builder, self.env.docname) @@ -198,7 +204,7 @@ node.replace_self(table) def _make_table(self, builder: Builder, docname: str) -> nodes.table: -@@ -217,8 +219,8 @@ class AuditEventListTransform(SphinxPost +@@ -217,8 +219,8 @@ builder: Builder, docname: str, name: str, @@ -209,8 +215,10 @@ ) -> nodes.row: row = nodes.row() name_node = nodes.paragraph("", nodes.Text(name)) ---- a/Doc/tools/extensions/availability.py -+++ b/Doc/tools/extensions/availability.py +Index: Python-3.13.3/Doc/tools/extensions/availability.py +=================================================================== +--- Python-3.13.3.orig/Doc/tools/extensions/availability.py 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Doc/tools/extensions/availability.py 2025-04-11 21:55:11.212578519 +0200 @@ -1,8 +1,6 @@ """Support for documenting platform availability""" @@ -221,7 +229,7 @@ from docutils import nodes from sphinx import addnodes -@@ -55,7 +53,7 @@ class Availability(SphinxDirective): +@@ -55,7 +53,7 @@ optional_arguments = 0 final_argument_whitespace = True @@ -230,7 +238,7 @@ title = sphinx_gettext("Availability") refnode = addnodes.pending_xref( title, -@@ -79,7 +77,7 @@ class Availability(SphinxDirective): +@@ -79,7 +77,7 @@ return [cnode] @@ -239,7 +247,7 @@ """Parse platform information from arguments Arguments is a comma-separated string of platforms. A platform may -@@ -98,12 +96,13 @@ class Availability(SphinxDirective): +@@ -98,12 +96,13 @@ platform, _, version = arg.partition(" >= ") if platform.startswith("not "): version = False @@ -255,7 +263,7 @@ logger.warning( "Unknown platform%s or syntax '%s' in '.. availability:: %s', " "see %s:KNOWN_PLATFORMS for a set of known platforms.", -@@ -116,7 +115,7 @@ class Availability(SphinxDirective): +@@ -116,7 +115,7 @@ return platforms @@ -264,9 +272,11 @@ app.add_directive("availability", Availability) return { ---- a/Doc/tools/extensions/c_annotations.py -+++ b/Doc/tools/extensions/c_annotations.py -@@ -9,22 +9,18 @@ Configuration: +Index: Python-3.13.3/Doc/tools/extensions/c_annotations.py +=================================================================== +--- Python-3.13.3.orig/Doc/tools/extensions/c_annotations.py 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Doc/tools/extensions/c_annotations.py 2025-04-11 21:55:11.212780990 +0200 +@@ -9,22 +9,18 @@ * Set ``stable_abi_file`` to the path to stable ABI list. """ @@ -292,7 +302,7 @@ ROLE_TO_OBJECT_TYPE = { "func": "function", -@@ -35,20 +31,20 @@ ROLE_TO_OBJECT_TYPE = { +@@ -35,20 +31,20 @@ } @@ -317,7 +327,7 @@ class StableABIEntry: # Role of the object. # Source: Each [item_kind] in stable_abi.toml is mapped to a C Domain role. -@@ -67,7 +63,7 @@ class StableABIEntry: +@@ -67,7 +63,7 @@ struct_abi_kind: str @@ -326,7 +336,7 @@ refcount_data = {} refcounts = refcount_filename.read_text(encoding="utf8") for line in refcounts.splitlines(): -@@ -103,7 +99,7 @@ def read_refcount_data(refcount_filename +@@ -103,7 +99,7 @@ return refcount_data @@ -335,7 +345,7 @@ stable_abi_data = {} with open(stable_abi_file, encoding="utf8") as fp: for record in csv.DictReader(fp): -@@ -123,11 +119,14 @@ def add_annotations(app: Sphinx, doctree +@@ -123,11 +119,14 @@ continue if not par[0].get("ids", None): continue @@ -352,7 +362,7 @@ if ROLE_TO_OBJECT_TYPE[record.role] != objtype: msg = ( f"Object type mismatch in limited API annotation for {name}: " -@@ -234,7 +233,7 @@ def _unstable_api_annotation() -> nodes. +@@ -234,7 +233,7 @@ ) @@ -361,7 +371,7 @@ classes = ["refcount"] if result_refs is None: rc = sphinx_gettext("Return value: Always NULL.") -@@ -254,7 +253,7 @@ class LimitedAPIList(SphinxDirective): +@@ -254,7 +253,7 @@ optional_arguments = 0 final_argument_whitespace = True @@ -370,7 +380,7 @@ state = self.env.domaindata["c_annotations"] content = [ f"* :c:{record.role}:`{record.name}`" -@@ -277,13 +276,23 @@ def init_annotations(app: Sphinx) -> Non +@@ -277,13 +276,23 @@ ) @@ -395,8 +405,10 @@ return { "version": "1.0", "parallel_read_safe": True, ---- a/Doc/tools/extensions/glossary_search.py -+++ b/Doc/tools/extensions/glossary_search.py +Index: Python-3.13.3/Doc/tools/extensions/glossary_search.py +=================================================================== +--- Python-3.13.3.orig/Doc/tools/extensions/glossary_search.py 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Doc/tools/extensions/glossary_search.py 2025-04-11 21:55:11.212983043 +0200 @@ -1,18 +1,14 @@ """Feature search results for glossary items prominently.""" @@ -418,7 +430,7 @@ logger = logging.getLogger(__name__) -@@ -52,7 +48,7 @@ def write_glossary_json(app: Sphinx, _ex +@@ -52,7 +48,7 @@ dest.write_text(json.dumps(app.env.glossary_terms), encoding='utf-8') @@ -427,8 +439,10 @@ app.connect('doctree-resolved', process_glossary_nodes) app.connect('build-finished', write_glossary_json) ---- a/Doc/tools/extensions/patchlevel.py -+++ b/Doc/tools/extensions/patchlevel.py +Index: Python-3.13.3/Doc/tools/extensions/patchlevel.py +=================================================================== +--- Python-3.13.3.orig/Doc/tools/extensions/patchlevel.py 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Doc/tools/extensions/patchlevel.py 2025-04-11 21:55:11.213150035 +0200 @@ -3,7 +3,7 @@ import re import sys @@ -438,7 +452,7 @@ CPYTHON_ROOT = Path( __file__, # cpython/Doc/tools/extensions/patchlevel.py -@@ -26,7 +26,7 @@ class version_info(NamedTuple): # noqa: +@@ -26,7 +26,7 @@ major: int #: Major release number minor: int #: Minor release number micro: int #: Patch release number @@ -447,7 +461,7 @@ serial: int #: Serial release number -@@ -37,7 +37,8 @@ def get_header_version_info() -> version +@@ -37,7 +37,8 @@ defines = {} patchlevel_h = PATCHLEVEL_H.read_text(encoding="utf-8") for line in patchlevel_h.splitlines(): @@ -457,7 +471,7 @@ name, value = m.groups() defines[name] = value -@@ -50,7 +51,7 @@ def get_header_version_info() -> version +@@ -50,7 +51,7 @@ ) diff --git a/python313.changes b/python313.changes index 5678ee5..34cf35d 100644 --- a/python313.changes +++ b/python313.changes @@ -1,3 +1,277 @@ +------------------------------------------------------------------- +Fri Apr 11 19:47:34 UTC 2025 - Matej Cepl + +- Update to 3.13.3: + - Tools/Demos + - gh-131852: msgfmt no longer adds the POT-Creation-Date to + generated .mo files for consistency with GNU msgfmt. + - gh-85012: Correctly reset msgctxt when compiling messages + in msgfmt. + - gh-130025: The iOS testbed now correctly handles symlinks + used as Python framework references. + - Tests + - gh-131050: test_ssl.test_dh_params is skipped if the + underlying TLS library does not support finite-field + ephemeral Diffie-Hellman. + - gh-129200: Multiple iOS testbed runners can now be started + at the same time without introducing an ambiguity over + simulator ownership. + - gh-130292: The iOS testbed will now run successfully on a + machine that has not previously run Xcode tests (such as CI + configurations). + - gh-130293: The tests of terminal colorization are no longer + sensitive to the value of the TERM variable in the testing + environment. + - gh-126332: Add unit tests for pyrepl. + - Security + - gh-131809: Update bundled libexpat to 2.7.1 + - gh-131261: Upgrade to libexpat 2.7.0 + - gh-127371: Avoid unbounded buffering for + tempfile.SpooledTemporaryFile.writelines(). Previously, + disk spillover was only checked after the lines iterator + had been exhausted. This is now done after each line is + written. + - gh-121284: Fix bug in the folding of rfc2047 encoded-words + when flattening an email message using a modern email + policy. Previously when an encoded-word was too long for + a line, it would be decoded, split across lines, and + re-encoded. But commas and other special characters in the + original text could be left unencoded and unquoted. This + could theoretically be used to spoof header lines using + a carefully constructed encoded-word if the resulting + rendered email was transmitted or re-parsed. + - Library + - gh-132174: Fix function name in error message of + _interpreters.run_string. + - gh-132171: Fix crash of _interpreters.run_string on string + subclasses. + - gh-129204: Introduce new _PYTHON_SUBPROCESS_USE_POSIX_SPAWN + environment variable knob in subprocess to control the use + of os.posix_spawn(). + - gh-132159: Do not shadow user arguments in generated + __new__() by decorator warnings.deprecated. Patch by Xuehai + Pan. + - gh-132075: Fix possible use of socket address structures + with uninitialized members. Now all structure members are + initialized with zeroes by default. + - gh-132002: Fix crash when deallocating + contextvars.ContextVar with weird unahashable string names. + - gh-131668: socket: Fix code parsing AF_BLUETOOTH socket + addresses. + - gh-131492: Fix a resource leak when constructing a + gzip.GzipFile with a filename fails, for example when + passing an invalid compresslevel. + - gh-131325: Fix sendfile fallback implementation to drain + data after writing to transport in asyncio. + - gh-129843: Fix incorrect argument passing in + warnings.warn_explicit(). + - gh-131204: Use monospace font from System Font Stack for + cross-platform support in difflib.HtmlDiff. + - gh-130940: The PyConfig.use_system_logger attribute, + introduced in Python 3.13.2, has been removed. The + introduction of this attribute inadvertently introduced an + ABI breakage on macOS and iOS. The use of the system logger + is now enabled by default on iOS, and disabled by default + on macOS. + - gh-131045: Fix issue with __contains__, values, and + pseudo-members for enum.Flag. + - gh-130959: Fix pure-Python implementation of + datetime.time.fromisoformat() to reject times with spaces + in fractional part (for example, 12:34:56.400 +02:00), + matching the C implementation. Patch by Michał Gorny. + - gh-130637: Add validation for numeric response data in + poplib.POP3.stat() method + - gh-130461: Remove .. index:: directives from the uuid + module documentation. These directives previously created + entries in the general index for getnode() as well as + the uuid1(), uuid3(), uuid4(), and uuid5() constructor + functions. + - gh-130379: The zipapp module now calculates the list of + files to be added to the archive before creating the + archive. This avoids accidentally including the target when + it is being created in the source directory. + - gh-130285: Fix corner case for random.sample() allowing the + counts parameter to specify an empty population. So now, + sample([], 0, counts=[]) and sample('abc', k=0, counts=[0, + 0, 0]) both give the same result as sample([], 0). + - gh-130250: Fix regression in traceback.print_last(). + - gh-130230: Fix crash in pow() with only Decimal third + argument. + - gh-118761: Reverts a change in the previous release + attempting to make some stdlib imports used within the + subprocess module lazy as this was causing errors during + __del__ finalizers calling methods such as terminate, or + kill, or send_signal. + - gh-130164: Fixed failure to raise TypeError in + inspect.Signature.bind() for positional-only arguments + provided by keyword when a variadic keyword argument (e.g. + --kwargs) is present. + - gh-130151: Fix reference leaks in _hashlib.hmac_new() and + _hashlib.hmac_digest(). Patch by Bénédikt Tran. + - gh-130145: Fix asyncio.AbstractEventloop.run_forever() when + another loop is already running. + - gh-129726: Fix gzip.GzipFile raising an unraisable + exception during garbage collection when referring to + a temporary object by breaking the reference loop with + weakref. + - gh-127750: Remove broken functools.singledispatchmethod() + caching introduced in gh-85160. + - gh-129583: Update bundled pip to 25.0.1 + - gh-97850: Update the deprecation warning of + importlib.abc.Loader.load_module(). + - gh-129646: Update the locale alias mapping in the locale + module to match the latest X Org locale alias mapping and + support new locales in Glibc 2.41. + - gh-129603: Fix bugs where sqlite3.Row objects could + segfault if their inherited description was set to + None. Patch by Erlend Aasland. + - gh-128231: Execution of multiple statements in the new + REPL now stops immediately upon the first exception + encountered. Patch by Bartosz Sławecki. + - gh-117779: Fix reading duplicated entries in zipfile by + name. Reading duplicated entries (except the last one) + by ZipInfo now emits a warning instead of raising an + exception. + - gh-128772: Fix pydoc for methods with the __module__ + attribute equal to None. + - gh-92897: Scheduled the deprecation of the check_home + argument of sysconfig.is_python_build() to Python 3.15. + - gh-128657: Fix possible extra reference when using objects + returned by hashlib.sha256() under free threading. + - gh-128703: Fix mimetypes.guess_type() to use default + mapping for empty Content-Type in registry. + - gh-128308: Support the name keyword argument + for eager tasks in asyncio.loop.create_task(), + asyncio.create_task() and asyncio.TaskGroup.create_task(), + by passing on all kwargs to the task factory set by + asyncio.loop.set_task_factory(). + - gh-128388: Fix PyREPL on Windows to support more + keybindings, like the Control-← and Control-→ word-skipping + keybindings and those with meta (i.e. Alt), e.g. Alt-d to + kill-word or Alt-Backspace backward-kill-word. + - gh-126037: xml.etree.ElementTree: Fix a crash in + Element.find, Element.findtext and Element.findall when + the tag to find implements an __eq__() method mutating the + element being queried. Patch by Bénédikt Tran. + - gh-127712: Fix handling of the secure argument of + logging.handlers.SMTPHandler. + - gh-126033: xml.etree.ElementTree: Fix a crash in + Element.remove when the element is concurrently + mutated. Patch by Bénédikt Tran. + - gh-118201: Fixed intermittent failures of os.confstr, + os.pathconf and os.sysconf on iOS and Android. + - gh-124927: Non-printing characters are now properly handled + in the new REPL. + - IDLE + - gh-129873: Simplify displaying the IDLE doc by only copying + the text section of idle.html to idlelib/help.html. Patch + by Stan Ulbrych. + - Documentation + - gh-131417: Mention asyncio.Future and asyncio.Task in + generic classes list. + - gh-125722: Require Sphinx 8.2.0 or later to build the + Python documentation. Patch by Adam Turner. + - gh-129712: The wheel tags supported by each macOS universal + SDK option are now documented. + - gh-46236: C API: Document PyUnicode_RSplit(), + PyUnicode_Partition() and PyUnicode_RPartition(). + - Core and Builtins + - gh-132011: Fix crash when calling list.append() as an + unbound method. + - gh-131998: Fix a crash when using an unbound method + descriptor object in a function where a bound method + descriptor was used. + - gh-131988: Fix a performance regression that caused scaling + bottlenecks in the free threaded build in 3.13.1 and + 3.13.2. + - gh-131719: Fix missing NULL check in _PyMem_FreeDelayed in + free-threaded build. + - gh-131670: Fix anext() failing on sync __anext__() raising + an exception. + - gh-131141: Fix data race in sys.monitoring instrumentation + while registering callback. + - gh-130932: Fix incorrect exception handling in + _PyModule_IsPossiblyShadowing + - gh-130851: Fix a crash in the free threading build when + constructing a code object with co_consts that contains + instances of types that are not otherwise generated by the + bytecode compiler. + - gh-130794: Fix memory leak in the free threaded build + when resizing a shared list or dictionary from multiple + short-lived threads. + - gh-130775: Do not crash on negative column and end_column + in ast locations. + - gh-130382: Fix PyRefTracer_DESTROY not being sent from + Python/ceval.c Py_DECREF(). + - gh-130618: Fix a bug that was causing UnicodeDecodeError or + SystemError to be raised when using f-strings with lambda + expressions with non-ASCII characters. Patch by Pablo + Galindo + - gh-130163: Fix possible crashes related to concurrent + change and use of the sys module attributes. + - gh-88887: Fixing multiprocessing Resource Tracker process + leaking, usually observed when running Python as PID 1. + - gh-130115: Fix an issue with thread identifiers being + sign-extended on some platforms. + - gh-128396: Fix a crash that occurs when calling locals() + inside an inline comprehension that uses the same local + variable as the outer frame scope where the variable is a + free or cell var. + - gh-116042: Fix location for SyntaxErrors of invalid escapes + in the tokenizer. Patch by Pablo Galindo + - gh-129983: Fix data race in compile_template in sre.c. + - gh-129967: Fix a race condition in the free threading build + when repr(set) is called concurrently with set.clear(). + - gh-129900: Fix return codes inside SystemExit not getting + returned by the REPL. + - gh-129732: Fixed a race in _Py_qsbr_reserve in the free + threading build. + - gh-129643: Fix thread safety of PyList_Insert() in + free-threading builds. + - gh-129668: Fix race condition when raising MemoryError in + the free threaded build. + - gh-129643: Fix thread safety of PyList_SetItem() in + free-threading builds. Patch by Kumar Aditya. + - gh-128714: Fix the potential races in get/set dunder + methods __annotations__, __annotate__ and __type_params__ + for function object, and add related tests. + - gh-128632: Disallow __classdict__ as the name of a type + parameter. Using this name would previously crash the + interpreter in some circumstances. + - gh-127953: The time to handle a LINE event in + sys.monitoring (and sys.settrace) is now independent of the + number of lines in the code object. + - gh-125331: from __future__ import barry_as_FLUFL now works + in more contexts, including when it is used in files, + with the -c flag, and in the REPL when there are multiple + statements on the same line. Previously, it worked only + on subsequent lines in the REPL, and when the appropriate + flags were passed directly to compile(). Patch by Pablo + Galindo. + - C API + - gh-131740: Update PyUnstable_GC_VisitObjects to traverse + perm gen. + - gh-129533: Update PyGC_Enable(), PyGC_Disable(), + PyGC_IsEnabled() to use atomic operation for thread-safety + at free-threading build. Patch by Donghee Na. + - Build + - gh-131865: The DTrace build now properly passes the CC + and CFLAGS variables to the dtrace command when utilizing + SystemTap on Linux. + - gh-131675: Fix mimalloc library builds for 32-bit ARM + targets. + - gh-130673: Fix potential KeyError when handling object + sections during JIT building process. + - gh-130740: Ensure that Python.h is included before + stdbool.h unless pyconfig.h is included before or in some + platform-specific contexts. + - gh-129838: Don’t redefine _Py_NO_SANITIZE_UNDEFINED when + compiling with a recent GCC version and undefined sanitizer + enabled. + - gh-129660: Drop test_embed from PGO training, whose + contribution in recent versions is considered to be + ignorable. + ------------------------------------------------------------------- Mon Mar 10 15:44:31 UTC 2025 - Bernhard Wiedemann diff --git a/python313.spec b/python313.spec index ad9488a..71fb5d6 100644 --- a/python313.spec +++ b/python313.spec @@ -162,7 +162,7 @@ # _md5.cpython-38m-x86_64-linux-gnu.so %define dynlib() %{sitedir}/lib-dynload/%{1}.cpython-%{abi_tag}-%{archname}-%{_os}%{?_gnu}%{?armsuffix}.so Name: %{python_pkg_name}%{psuffix} -Version: 3.13.2 +Version: 3.13.3 %define tarversion %{version} %define tarname Python-%{tarversion} Release: 0 diff --git a/subprocess-raise-timeout.patch b/subprocess-raise-timeout.patch index b984fc4..aba113c 100644 --- a/subprocess-raise-timeout.patch +++ b/subprocess-raise-timeout.patch @@ -1,16 +1,21 @@ --- - Lib/test/test_subprocess.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + Lib/test/test_subprocess.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) ---- a/Lib/test/test_subprocess.py -+++ b/Lib/test/test_subprocess.py -@@ -280,7 +280,8 @@ class ProcessTestCase(BaseTestCase): - "time.sleep(3600)"], - # Some heavily loaded buildbots (sparc Debian 3.x) require - # this much time to start and print. -- timeout=3) -+ # OBS might require even more -+ timeout=10) - self.fail("Expected TimeoutExpired.") - self.assertEqual(c.exception.output, b'BDFL') +Index: Python-3.13.3/Lib/test/test_subprocess.py +=================================================================== +--- Python-3.13.3.orig/Lib/test/test_subprocess.py 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Lib/test/test_subprocess.py 2025-04-11 21:53:36.198770341 +0200 +@@ -274,7 +274,11 @@ + output = subprocess.check_output( + [sys.executable, "-c", + "import time; time.sleep(3600)"], +- timeout=0.1) ++ # Some heavily loaded buildbots (sparc Debian 3.x) require ++ # this much time to start and print. ++ # timeout=3) ++ # OBS might require even more ++ timeout=10) + def test_call_kwargs(self): + # call() function with keyword args From 9e2287fa694c1d639d1bb342ea4d7ba4072b01c411f265dc502e20c7011e0655 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 15 Apr 2025 14:09:42 +0000 Subject: [PATCH 4/8] - Add gh126985-mv-pyvenv.cfg2getpath.patch to remove failing tests in test_sysconfig. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python313?expand=0&rev=88 --- gh126985-mv-pyvenv.cfg2getpath.patch | 95 ++++++++++++++++++++++++++++ python313.changes | 2 + python313.spec | 12 ++-- 3 files changed, 103 insertions(+), 6 deletions(-) create mode 100644 gh126985-mv-pyvenv.cfg2getpath.patch diff --git a/gh126985-mv-pyvenv.cfg2getpath.patch b/gh126985-mv-pyvenv.cfg2getpath.patch new file mode 100644 index 0000000..4105098 --- /dev/null +++ b/gh126985-mv-pyvenv.cfg2getpath.patch @@ -0,0 +1,95 @@ +commit 2b0e2b2893a821ca36cd65a204bed932741ac189 +Author: Filipe Laíns 🇵🇸 +Date: Tue Nov 26 13:46:33 2024 +0000 + + GH-126985: move pyvenv.cfg detection from site to getpath (#126987) + +--- + Lib/test/test_sysconfig.py | 67 --------------------------------------------- + 1 file changed, 1 insertion(+), 66 deletions(-) + +Index: Python-3.13.3/Lib/test/test_sysconfig.py +=================================================================== +--- Python-3.13.3.orig/Lib/test/test_sysconfig.py 2025-04-15 14:13:08.581364697 +0200 ++++ Python-3.13.3/Lib/test/test_sysconfig.py 2025-04-15 14:13:54.955529034 +0200 +@@ -110,6 +110,7 @@ + **venv_create_args, + ) + ++ + def test_get_path_names(self): + self.assertEqual(get_path_names(), sysconfig._SCHEME_KEYS) + +@@ -604,72 +605,6 @@ + suffix = sysconfig.get_config_var('EXT_SUFFIX') + self.assertTrue(suffix.endswith('-darwin.so'), suffix) + +- @requires_subprocess() +- def test_config_vars_depend_on_site_initialization(self): +- script = textwrap.dedent(""" +- import sysconfig +- +- config_vars = sysconfig.get_config_vars() +- +- import json +- print(json.dumps(config_vars, indent=2)) +- """) +- +- with self.venv() as venv: +- site_config_vars = json.loads(venv.run('-c', script).stdout) +- no_site_config_vars = json.loads(venv.run('-S', '-c', script).stdout) +- +- self.assertNotEqual(site_config_vars, no_site_config_vars) +- # With the site initialization, the virtual environment should be enabled. +- self.assertEqual(site_config_vars['base'], venv.prefix) +- self.assertEqual(site_config_vars['platbase'], venv.prefix) +- #self.assertEqual(site_config_vars['prefix'], venv.prefix) # # FIXME: prefix gets overwriten by _init_posix +- # Without the site initialization, the virtual environment should be disabled. +- self.assertEqual(no_site_config_vars['base'], site_config_vars['installed_base']) +- self.assertEqual(no_site_config_vars['platbase'], site_config_vars['installed_platbase']) +- +- @requires_subprocess() +- def test_config_vars_recalculation_after_site_initialization(self): +- script = textwrap.dedent(""" +- import sysconfig +- +- before = sysconfig.get_config_vars() +- +- import site +- site.main() +- +- after = sysconfig.get_config_vars() +- +- import json +- print(json.dumps({'before': before, 'after': after}, indent=2)) +- """) +- +- with self.venv() as venv: +- config_vars = json.loads(venv.run('-S', '-c', script).stdout) +- +- self.assertNotEqual(config_vars['before'], config_vars['after']) +- self.assertEqual(config_vars['after']['base'], venv.prefix) +- #self.assertEqual(config_vars['after']['prefix'], venv.prefix) # FIXME: prefix gets overwriten by _init_posix +- #self.assertEqual(config_vars['after']['exec_prefix'], venv.prefix) # FIXME: exec_prefix gets overwriten by _init_posix +- +- @requires_subprocess() +- def test_paths_depend_on_site_initialization(self): +- script = textwrap.dedent(""" +- import sysconfig +- +- paths = sysconfig.get_paths() +- +- import json +- print(json.dumps(paths, indent=2)) +- """) +- +- with self.venv() as venv: +- site_paths = json.loads(venv.run('-c', script).stdout) +- no_site_paths = json.loads(venv.run('-S', '-c', script).stdout) +- +- self.assertNotEqual(site_paths, no_site_paths) +- +- + class MakefileTests(unittest.TestCase): + + @unittest.skipIf(sys.platform.startswith('win'), diff --git a/python313.changes b/python313.changes index 34cf35d..59874cb 100644 --- a/python313.changes +++ b/python313.changes @@ -271,6 +271,8 @@ Fri Apr 11 19:47:34 UTC 2025 - Matej Cepl - gh-129660: Drop test_embed from PGO training, whose contribution in recent versions is considered to be ignorable. +- Add gh126985-mv-pyvenv.cfg2getpath.patch to remove failing + tests in test_sysconfig. ------------------------------------------------------------------- Mon Mar 10 15:44:31 UTC 2025 - Bernhard Wiedemann diff --git a/python313.spec b/python313.spec index 71fb5d6..8fed4f3 100644 --- a/python313.spec +++ b/python313.spec @@ -222,6 +222,9 @@ Patch40: fix-test-recursion-limit-15.6.patch # PATCH-FIX-SLE doc-py38-to-py36.patch mcepl@suse.com # Make documentation extensions working with Python 3.6 Patch41: doc-py38-to-py36.patch +# PATCH-FIX-UPSTREAM gh126985-mv-pyvenv.cfg2getpath.patch mcepl@suse.com +# Remove tests failing in test_sysconfig +Patch42: gh126985-mv-pyvenv.cfg2getpath.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes @@ -651,17 +654,14 @@ EXCLUDE="$EXCLUDE test_faulthandler" EXCLUDE="$EXCLUDE test_external_inspection test_faulthandler test_os test_posix test_signal test_socket test_subprocess" %endif +# gh#python/cpython#132535 +EXCLUDE="$EXCLUDE test_timeout" + # This test (part of test_uuid) requires real network interfaces # so that ifconfig output has "HWaddr ". Some kvm instances # done have any such interface breaking the uuid module. EXCLUDE="$EXCLUDE test_uuid" -# bsc#1195140 and bpo#37169 - test_capi is failing on openSUSE, and not sure why -EXCLUDE="$EXCLUDE test_capi" - -# Failing tests on python 3.13 -EXCLUDE="$EXCLUDE test_regrtest test_sysconfig" - # Limit virtual memory to avoid spurious failures if test $(ulimit -v) = unlimited || test $(ulimit -v) -gt 10000000; then ulimit -v 11000000 || : From 384d0f4194f535e23cdc86b3df517d55d98445c56fe2427cd7faba5803e39e12 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 15 Apr 2025 22:19:57 +0000 Subject: [PATCH 5/8] - Add gh-132535-rsrc-warn-test_timeout.patch to fix failing tests in the build system without network access (gh#python/cpython#132535). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python313?expand=0&rev=89 --- gh-132535-rsrc-warn-test_timeout.patch | 94 ++++++++++++++++++++++++++ python313.changes | 3 + python313.spec | 6 +- 3 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 gh-132535-rsrc-warn-test_timeout.patch diff --git a/gh-132535-rsrc-warn-test_timeout.patch b/gh-132535-rsrc-warn-test_timeout.patch new file mode 100644 index 0000000..1dc73a4 --- /dev/null +++ b/gh-132535-rsrc-warn-test_timeout.patch @@ -0,0 +1,94 @@ +From 0e461dd411e9ec3dbdf376435154ca2834bcab51 Mon Sep 17 00:00:00 2001 +From: Serhiy Storchaka +Date: Wed, 16 Apr 2025 00:24:56 +0300 +Subject: [PATCH] gh-132535: Fix resource warnings in test_timeout + +They were emitted if internet connection was not available. +--- + Lib/test/test_timeout.py | 43 ++++++++++++++++--------------------------- + 1 file changed, 16 insertions(+), 27 deletions(-) + +Index: Python-3.13.3/Lib/test/test_timeout.py +=================================================================== +--- Python-3.13.3.orig/Lib/test/test_timeout.py 2025-04-08 15:54:08.000000000 +0200 ++++ Python-3.13.3/Lib/test/test_timeout.py 2025-04-15 23:45:55.028517897 +0200 +@@ -26,10 +26,8 @@ + """Test case for socket.gettimeout() and socket.settimeout()""" + + def setUp(self): +- self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +- +- def tearDown(self): +- self.sock.close() ++ self.sock = self.enterContext( ++ socket.socket(socket.AF_INET, socket.SOCK_STREAM)) + + def testObjectCreation(self): + # Test Socket creation +@@ -113,8 +111,6 @@ + def setUp(self): + raise NotImplementedError() + +- tearDown = setUp +- + def _sock_operation(self, count, timeout, method, *args): + """ + Test the specified socket method. +@@ -142,12 +138,10 @@ + """TCP test case for socket.socket() timeout functions""" + + def setUp(self): +- self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ++ self.sock = self.enterContext( ++ socket.socket(socket.AF_INET, socket.SOCK_STREAM)) + self.addr_remote = resolve_address('www.python.org.', 80) + +- def tearDown(self): +- self.sock.close() +- + def testConnectTimeout(self): + # Testing connect timeout is tricky: we need to have IP connectivity + # to a host that silently drops our packets. We can't simulate this +@@ -190,19 +184,16 @@ + # for the current configuration. + + skip = True +- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +- timeout = support.LOOPBACK_TIMEOUT +- sock.settimeout(timeout) +- try: +- sock.connect((whitehole)) +- except TimeoutError: +- pass +- except OSError as err: +- if err.errno == errno.ECONNREFUSED: +- skip = False +- finally: +- sock.close() +- del sock ++ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: ++ try: ++ timeout = support.LOOPBACK_TIMEOUT ++ sock.settimeout(timeout) ++ sock.connect((whitehole)) ++ except TimeoutError: ++ pass ++ except OSError as err: ++ if err.errno == errno.ECONNREFUSED: ++ skip = False + + if skip: + self.skipTest( +@@ -269,10 +260,8 @@ + """UDP test case for socket.socket() timeout functions""" + + def setUp(self): +- self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) +- +- def tearDown(self): +- self.sock.close() ++ self.sock = self.enterContext( ++ socket.socket(socket.AF_INET, socket.SOCK_DGRAM)) + + def testRecvfromTimeout(self): + # Test recvfrom() timeout diff --git a/python313.changes b/python313.changes index 59874cb..095a92f 100644 --- a/python313.changes +++ b/python313.changes @@ -273,6 +273,9 @@ Fri Apr 11 19:47:34 UTC 2025 - Matej Cepl ignorable. - Add gh126985-mv-pyvenv.cfg2getpath.patch to remove failing tests in test_sysconfig. +- Add gh-132535-rsrc-warn-test_timeout.patch to fix + failing tests in the build system without network access + (gh#python/cpython#132535). ------------------------------------------------------------------- Mon Mar 10 15:44:31 UTC 2025 - Bernhard Wiedemann diff --git a/python313.spec b/python313.spec index 8fed4f3..408383d 100644 --- a/python313.spec +++ b/python313.spec @@ -225,6 +225,9 @@ Patch41: doc-py38-to-py36.patch # PATCH-FIX-UPSTREAM gh126985-mv-pyvenv.cfg2getpath.patch mcepl@suse.com # Remove tests failing in test_sysconfig Patch42: gh126985-mv-pyvenv.cfg2getpath.patch +# PATCH-FIX-UPSTREAM gh-132535-rsrc-warn-test_timeout.patch gh#python/cpython#132535 mcepl@suse.com +# allows test_timeout tests to pass +Patch43: gh-132535-rsrc-warn-test_timeout.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes @@ -654,9 +657,6 @@ EXCLUDE="$EXCLUDE test_faulthandler" EXCLUDE="$EXCLUDE test_external_inspection test_faulthandler test_os test_posix test_signal test_socket test_subprocess" %endif -# gh#python/cpython#132535 -EXCLUDE="$EXCLUDE test_timeout" - # This test (part of test_uuid) requires real network interfaces # so that ifconfig output has "HWaddr ". Some kvm instances # done have any such interface breaking the uuid module. From b91bbdde1bac60ebc52c2b79504e0ae181684c5046a44b84aec4e6bc41283524 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 16 Apr 2025 07:15:35 +0000 Subject: [PATCH 6/8] - Add gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch and gh-127257-ssl-OSError-ERR_LIB_SYS.patch to make the interpreter compatible with OpenSSL 3.5 (bsc#1241067). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python313?expand=0&rev=90 --- ...l-no-stop-ThreadedEchoServer-OSError.patch | 82 +++++++++++++++++++ gh-127257-ssl-OSError-ERR_LIB_SYS.patch | 67 +++++++++++++++ python313.changes | 3 + python313.spec | 4 + 4 files changed, 156 insertions(+) create mode 100644 gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch create mode 100644 gh-127257-ssl-OSError-ERR_LIB_SYS.patch diff --git a/gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch b/gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch new file mode 100644 index 0000000..bea4eed --- /dev/null +++ b/gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch @@ -0,0 +1,82 @@ +From 3d390148c05a7ea2d401c4633e7d4db75ebf97d9 Mon Sep 17 00:00:00 2001 +From: Petr Viktorin +Date: Thu, 7 Nov 2024 11:07:02 +0100 +Subject: [PATCH] gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError + in ConnectionHandler; rely on __exit__ (GH-126503) + +If `read()` in the ConnectionHandler thread raises `OSError` (except `ConnectionError`), +the ConnectionHandler shuts down the entire ThreadedEchoServer, +preventing further connections. +It also does that for `EPROTOTYPE` in `wrap_conn`. + +As far as I can see, this is done to avoid the server thread getting stuck, +forgotten, in its accept loop. However, since 2011 (5b95eb90a7167285b6544b50865227c584943c9a) +the server is used as a context manager, and its `__exit__` does `stop()` and `join()`. +(I'm not sure if we *always* used `with` since that commit, but currently we do.) + +Make sure that the context manager *is* used, and remove the `server.stop()` +calls from ConnectionHandler. +(cherry picked from commit c9cda1608edf7664c10f4f467e24591062c2fe62) + +Co-authored-by: Petr Viktorin +--- + Lib/test/test_ssl.py | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py +index 9b59ddd887aa0b..b6421c7a3c827b 100644 +--- a/Lib/test/test_ssl.py ++++ b/Lib/test/test_ssl.py +@@ -2300,7 +2300,6 @@ def wrap_conn(self): + # See also http://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ + if e.errno != errno.EPROTOTYPE and sys.platform != "darwin": + self.running = False +- self.server.stop() + self.close() + return False + else: +@@ -2435,10 +2434,6 @@ def run(self): + self.close() + self.running = False + +- # normally, we'd just stop here, but for the test +- # harness, we want to stop the server +- self.server.stop() +- + def __init__(self, certificate=None, ssl_version=None, + certreqs=None, cacerts=None, + chatty=True, connectionchatty=False, starttls_server=False, +@@ -2472,21 +2467,33 @@ def __init__(self, certificate=None, ssl_version=None, + self.conn_errors = [] + threading.Thread.__init__(self) + self.daemon = True ++ self._in_context = False + + def __enter__(self): ++ if self._in_context: ++ raise ValueError('Re-entering ThreadedEchoServer context') ++ self._in_context = True + self.start(threading.Event()) + self.flag.wait() + return self + + def __exit__(self, *args): ++ assert self._in_context ++ self._in_context = False + self.stop() + self.join() + + def start(self, flag=None): ++ if not self._in_context: ++ raise ValueError( ++ 'ThreadedEchoServer must be used as a context manager') + self.flag = flag + threading.Thread.start(self) + + def run(self): ++ if not self._in_context: ++ raise ValueError( ++ 'ThreadedEchoServer must be used as a context manager') + self.sock.settimeout(1.0) + self.sock.listen(5) + self.active = True diff --git a/gh-127257-ssl-OSError-ERR_LIB_SYS.patch b/gh-127257-ssl-OSError-ERR_LIB_SYS.patch new file mode 100644 index 0000000..092d012 --- /dev/null +++ b/gh-127257-ssl-OSError-ERR_LIB_SYS.patch @@ -0,0 +1,67 @@ +From c7908750cbfcfb54688ffff654909ef021095026 Mon Sep 17 00:00:00 2001 +From: "Miss Islington (bot)" + <31488909+miss-islington@users.noreply.github.com> +Date: Mon, 16 Dec 2024 15:43:57 +0100 +Subject: [PATCH] [3.12] gh-127257: ssl: Raise OSError for ERR_LIB_SYS + (GH-127361) (GH-127905) + +gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361) + +From the ERR_raise manpage: + + ERR_LIB_SYS + + This "library code" indicates that a system error is + being reported. In this case, the reason code given + to `ERR_raise()` and `ERR_raise_data()` *must* be + `errno(3)`. + +This PR only handles ERR_LIB_SYS for the high-lever error types +SSL_ERROR_SYSCALL and SSL_ERROR_SSL, i.e., not the ones where +OpenSSL indicates it has some more information about the issue. +(cherry picked from commit f4b31edf2d9d72878dab1f66a36913b5bcc848ec) + +Co-authored-by: Petr Viktorin +(cherry picked from commit 7f707fa6c67d0bfa9bbc1a9f344b932789659397) +--- + .../2024-11-28-14-14-46.gh-issue-127257.n6-jU9.rst | 2 ++ + Modules/_ssl.c | 10 ++++++++++ + 2 files changed, 12 insertions(+) + create mode 100644 Misc/NEWS.d/next/Library/2024-11-28-14-14-46.gh-issue-127257.n6-jU9.rst + +diff --git a/Misc/NEWS.d/next/Library/2024-11-28-14-14-46.gh-issue-127257.n6-jU9.rst b/Misc/NEWS.d/next/Library/2024-11-28-14-14-46.gh-issue-127257.n6-jU9.rst +new file mode 100644 +index 00000000000000..fb0380cba0b607 +--- /dev/null ++++ b/Misc/NEWS.d/next/Library/2024-11-28-14-14-46.gh-issue-127257.n6-jU9.rst +@@ -0,0 +1,2 @@ ++In :mod:`ssl`, system call failures that OpenSSL reports using ++``ERR_LIB_SYS`` are now raised as :exc:`OSError`. +diff --git a/Modules/_ssl.c b/Modules/_ssl.c +index 120c739e196732..09207abde14545 100644 +--- a/Modules/_ssl.c ++++ b/Modules/_ssl.c +@@ -654,6 +654,11 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) + ERR_GET_REASON(e) == SSL_R_CERTIFICATE_VERIFY_FAILED) { + type = state->PySSLCertVerificationErrorObject; + } ++ 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; +@@ -679,6 +684,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/python313.changes b/python313.changes index 095a92f..18c4aec 100644 --- a/python313.changes +++ b/python313.changes @@ -276,6 +276,9 @@ Fri Apr 11 19:47:34 UTC 2025 - Matej Cepl - Add gh-132535-rsrc-warn-test_timeout.patch to fix failing tests in the build system without network access (gh#python/cpython#132535). +- Add gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch + and gh-127257-ssl-OSError-ERR_LIB_SYS.patch to make the + interpreter compatible with OpenSSL 3.5 (bsc#1241067). ------------------------------------------------------------------- Mon Mar 10 15:44:31 UTC 2025 - Bernhard Wiedemann diff --git a/python313.spec b/python313.spec index 408383d..2aa63d0 100644 --- a/python313.spec +++ b/python313.spec @@ -228,6 +228,10 @@ Patch42: gh126985-mv-pyvenv.cfg2getpath.patch # PATCH-FIX-UPSTREAM gh-132535-rsrc-warn-test_timeout.patch gh#python/cpython#132535 mcepl@suse.com # allows test_timeout tests to pass Patch43: gh-132535-rsrc-warn-test_timeout.patch +# PATCH-FIX-UPSTREAM bsc#1241067 mcepl@suse.com +# Make the interpreter compatible with OpenSSL 3.5 +Patch44: gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch +Patch44: gh-127257-ssl-OSError-ERR_LIB_SYS.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes From 55167f91bde76fc1220d86ea7e4cae24bca4e74e6ddd52fdf771c4d53be10d8d Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 16 Apr 2025 07:17:38 +0000 Subject: [PATCH 7/8] Fix patches OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python313?expand=0&rev=91 --- python313.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python313.spec b/python313.spec index 2aa63d0..e5b5a93 100644 --- a/python313.spec +++ b/python313.spec @@ -231,7 +231,7 @@ Patch43: gh-132535-rsrc-warn-test_timeout.patch # PATCH-FIX-UPSTREAM bsc#1241067 mcepl@suse.com # Make the interpreter compatible with OpenSSL 3.5 Patch44: gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch -Patch44: gh-127257-ssl-OSError-ERR_LIB_SYS.patch +Patch45: gh-127257-ssl-OSError-ERR_LIB_SYS.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes From bb17c93a2ab001cb9fe4c081fa7b94921c3fb356231ab09d0d86ec862c4eced4 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 16 Apr 2025 07:52:47 +0000 Subject: [PATCH 8/8] This OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python313?expand=0&rev=92 --- ...l-no-stop-ThreadedEchoServer-OSError.patch | 82 ------------------- gh-127257-ssl-OSError-ERR_LIB_SYS.patch | 67 --------------- python313.changes | 3 - python313.spec | 4 - 4 files changed, 156 deletions(-) delete mode 100644 gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch delete mode 100644 gh-127257-ssl-OSError-ERR_LIB_SYS.patch diff --git a/gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch b/gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch deleted file mode 100644 index bea4eed..0000000 --- a/gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 3d390148c05a7ea2d401c4633e7d4db75ebf97d9 Mon Sep 17 00:00:00 2001 -From: Petr Viktorin -Date: Thu, 7 Nov 2024 11:07:02 +0100 -Subject: [PATCH] gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError - in ConnectionHandler; rely on __exit__ (GH-126503) - -If `read()` in the ConnectionHandler thread raises `OSError` (except `ConnectionError`), -the ConnectionHandler shuts down the entire ThreadedEchoServer, -preventing further connections. -It also does that for `EPROTOTYPE` in `wrap_conn`. - -As far as I can see, this is done to avoid the server thread getting stuck, -forgotten, in its accept loop. However, since 2011 (5b95eb90a7167285b6544b50865227c584943c9a) -the server is used as a context manager, and its `__exit__` does `stop()` and `join()`. -(I'm not sure if we *always* used `with` since that commit, but currently we do.) - -Make sure that the context manager *is* used, and remove the `server.stop()` -calls from ConnectionHandler. -(cherry picked from commit c9cda1608edf7664c10f4f467e24591062c2fe62) - -Co-authored-by: Petr Viktorin ---- - Lib/test/test_ssl.py | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 9b59ddd887aa0b..b6421c7a3c827b 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -2300,7 +2300,6 @@ def wrap_conn(self): - # See also http://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ - if e.errno != errno.EPROTOTYPE and sys.platform != "darwin": - self.running = False -- self.server.stop() - self.close() - return False - else: -@@ -2435,10 +2434,6 @@ def run(self): - self.close() - self.running = False - -- # normally, we'd just stop here, but for the test -- # harness, we want to stop the server -- self.server.stop() -- - def __init__(self, certificate=None, ssl_version=None, - certreqs=None, cacerts=None, - chatty=True, connectionchatty=False, starttls_server=False, -@@ -2472,21 +2467,33 @@ def __init__(self, certificate=None, ssl_version=None, - self.conn_errors = [] - threading.Thread.__init__(self) - self.daemon = True -+ self._in_context = False - - def __enter__(self): -+ if self._in_context: -+ raise ValueError('Re-entering ThreadedEchoServer context') -+ self._in_context = True - self.start(threading.Event()) - self.flag.wait() - return self - - def __exit__(self, *args): -+ assert self._in_context -+ self._in_context = False - self.stop() - self.join() - - def start(self, flag=None): -+ if not self._in_context: -+ raise ValueError( -+ 'ThreadedEchoServer must be used as a context manager') - self.flag = flag - threading.Thread.start(self) - - def run(self): -+ if not self._in_context: -+ raise ValueError( -+ 'ThreadedEchoServer must be used as a context manager') - self.sock.settimeout(1.0) - self.sock.listen(5) - self.active = True diff --git a/gh-127257-ssl-OSError-ERR_LIB_SYS.patch b/gh-127257-ssl-OSError-ERR_LIB_SYS.patch deleted file mode 100644 index 092d012..0000000 --- a/gh-127257-ssl-OSError-ERR_LIB_SYS.patch +++ /dev/null @@ -1,67 +0,0 @@ -From c7908750cbfcfb54688ffff654909ef021095026 Mon Sep 17 00:00:00 2001 -From: "Miss Islington (bot)" - <31488909+miss-islington@users.noreply.github.com> -Date: Mon, 16 Dec 2024 15:43:57 +0100 -Subject: [PATCH] [3.12] gh-127257: ssl: Raise OSError for ERR_LIB_SYS - (GH-127361) (GH-127905) - -gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361) - -From the ERR_raise manpage: - - ERR_LIB_SYS - - This "library code" indicates that a system error is - being reported. In this case, the reason code given - to `ERR_raise()` and `ERR_raise_data()` *must* be - `errno(3)`. - -This PR only handles ERR_LIB_SYS for the high-lever error types -SSL_ERROR_SYSCALL and SSL_ERROR_SSL, i.e., not the ones where -OpenSSL indicates it has some more information about the issue. -(cherry picked from commit f4b31edf2d9d72878dab1f66a36913b5bcc848ec) - -Co-authored-by: Petr Viktorin -(cherry picked from commit 7f707fa6c67d0bfa9bbc1a9f344b932789659397) ---- - .../2024-11-28-14-14-46.gh-issue-127257.n6-jU9.rst | 2 ++ - Modules/_ssl.c | 10 ++++++++++ - 2 files changed, 12 insertions(+) - create mode 100644 Misc/NEWS.d/next/Library/2024-11-28-14-14-46.gh-issue-127257.n6-jU9.rst - -diff --git a/Misc/NEWS.d/next/Library/2024-11-28-14-14-46.gh-issue-127257.n6-jU9.rst b/Misc/NEWS.d/next/Library/2024-11-28-14-14-46.gh-issue-127257.n6-jU9.rst -new file mode 100644 -index 00000000000000..fb0380cba0b607 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2024-11-28-14-14-46.gh-issue-127257.n6-jU9.rst -@@ -0,0 +1,2 @@ -+In :mod:`ssl`, system call failures that OpenSSL reports using -+``ERR_LIB_SYS`` are now raised as :exc:`OSError`. -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index 120c739e196732..09207abde14545 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -654,6 +654,11 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) - ERR_GET_REASON(e) == SSL_R_CERTIFICATE_VERIFY_FAILED) { - type = state->PySSLCertVerificationErrorObject; - } -+ 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; -@@ -679,6 +684,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/python313.changes b/python313.changes index 18c4aec..095a92f 100644 --- a/python313.changes +++ b/python313.changes @@ -276,9 +276,6 @@ Fri Apr 11 19:47:34 UTC 2025 - Matej Cepl - Add gh-132535-rsrc-warn-test_timeout.patch to fix failing tests in the build system without network access (gh#python/cpython#132535). -- Add gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch - and gh-127257-ssl-OSError-ERR_LIB_SYS.patch to make the - interpreter compatible with OpenSSL 3.5 (bsc#1241067). ------------------------------------------------------------------- Mon Mar 10 15:44:31 UTC 2025 - Bernhard Wiedemann diff --git a/python313.spec b/python313.spec index e5b5a93..408383d 100644 --- a/python313.spec +++ b/python313.spec @@ -228,10 +228,6 @@ Patch42: gh126985-mv-pyvenv.cfg2getpath.patch # PATCH-FIX-UPSTREAM gh-132535-rsrc-warn-test_timeout.patch gh#python/cpython#132535 mcepl@suse.com # allows test_timeout tests to pass Patch43: gh-132535-rsrc-warn-test_timeout.patch -# PATCH-FIX-UPSTREAM bsc#1241067 mcepl@suse.com -# Make the interpreter compatible with OpenSSL 3.5 -Patch44: gh-126500-test_ssl-no-stop-ThreadedEchoServer-OSError.patch -Patch45: gh-127257-ssl-OSError-ERR_LIB_SYS.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes