From 139e55ac214d2a64d2c3f1982f85acf72f12b32a Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Wed, 20 Nov 2024 10:06:03 +0100 Subject: [PATCH] Update to Python 3.14.0a2 --- 00251-change-user-install-location.patch | 16 ++++---- ...sions-of-blake2-available-on-x86-too.patch | 24 ------------ ...2-handlertests-test_ftp_error-125586.patch | 22 ----------- python3.14.spec | 37 ++++++++----------- sources | 2 +- 5 files changed, 24 insertions(+), 77 deletions(-) delete mode 100644 00441-make-vectorized-versions-of-blake2-available-on-x86-too.patch delete mode 100644 00442-gh-125584-require-network-resource-in-test_urllib2-handlertests-test_ftp_error-125586.patch diff --git a/00251-change-user-install-location.patch b/00251-change-user-install-location.patch index df3baea..c5e4b20 100644 --- a/00251-change-user-install-location.patch +++ b/00251-change-user-install-location.patch @@ -30,7 +30,7 @@ Co-authored-by: Lumír Balhar 3 files changed, 72 insertions(+), 4 deletions(-) diff --git a/Lib/site.py b/Lib/site.py -index 0a0dc47b17..bb42e1cf5a 100644 +index 54f07ab5b4..69ceaa443e 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -414,8 +414,15 @@ def getsitepackages(prefixes=None): @@ -51,7 +51,7 @@ index 0a0dc47b17..bb42e1cf5a 100644 if os.path.isdir(sitedir): addsitedir(sitedir, known_paths) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 80aef34471..4e4ea6aeea 100644 +index 67a071963d..371e6844b8 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py @@ -106,6 +106,12 @@ @@ -87,7 +87,7 @@ index 80aef34471..4e4ea6aeea 100644 _SCHEME_KEYS = ('stdlib', 'platstdlib', 'purelib', 'platlib', 'include', 'scripts', 'data') -@@ -261,11 +280,40 @@ def _extend_dict(target_dict, other_dict): +@@ -259,11 +278,40 @@ def _extend_dict(target_dict, other_dict): target_dict[key] = value @@ -120,7 +120,7 @@ index 80aef34471..4e4ea6aeea 100644 + # we only change the defaults here, so explicit --prefix will take precedence + # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe + if (scheme == 'posix_prefix' and -+ _PREFIX == '/usr' and ++ get_config_vars('prefix')[0] == '/usr' and + 'RPM_BUILD_ROOT' not in os.environ): + _extend_dict(vars, _config_vars_local()) + else: @@ -130,10 +130,10 @@ index 80aef34471..4e4ea6aeea 100644 # On Windows we want to substitute 'lib' for schemes rather # than the native value (without modifying vars, in case it diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py -index 1ade49281b..e21ca34733 100644 +index 9bbf8d0c6c..609bf5c373 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py -@@ -121,8 +121,19 @@ def test_get_path(self): +@@ -130,8 +130,19 @@ def test_get_path(self): for scheme in _INSTALL_SCHEMES: for name in _INSTALL_SCHEMES[scheme]: expected = _INSTALL_SCHEMES[scheme][name].format(**config_vars) @@ -154,7 +154,7 @@ index 1ade49281b..e21ca34733 100644 os.path.normpath(expected), ) -@@ -377,7 +388,7 @@ def test_get_config_h_filename(self): +@@ -386,7 +397,7 @@ def test_get_config_h_filename(self): self.assertTrue(os.path.isfile(config_h), config_h) def test_get_scheme_names(self): @@ -163,7 +163,7 @@ index 1ade49281b..e21ca34733 100644 if HAS_USER_BASE: wanted.extend(['nt_user', 'osx_framework_user', 'posix_user']) self.assertEqual(get_scheme_names(), tuple(sorted(wanted))) -@@ -389,6 +400,8 @@ def test_symlink(self): # Issue 7880 +@@ -398,6 +409,8 @@ def test_symlink(self): # Issue 7880 cmd = "-c", "import sysconfig; print(sysconfig.get_platform())" self.assertEqual(py.call_real(*cmd), py.call_link(*cmd)) diff --git a/00441-make-vectorized-versions-of-blake2-available-on-x86-too.patch b/00441-make-vectorized-versions-of-blake2-available-on-x86-too.patch deleted file mode 100644 index 4a138cf..0000000 --- a/00441-make-vectorized-versions-of-blake2-available-on-x86-too.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jonathan Protzenko -Date: Thu, 10 Oct 2024 11:59:06 +0200 -Subject: [PATCH] 00441: Make vectorized versions of Blake2 available on x86, - too - -Source: https://github.com/python/cpython/pull/125244 ---- - Modules/_hacl/libintvector.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Modules/_hacl/libintvector.h b/Modules/_hacl/libintvector.h -index 99d1133694..11e914f7e1 100644 ---- a/Modules/_hacl/libintvector.h -+++ b/Modules/_hacl/libintvector.h -@@ -19,7 +19,7 @@ - - #define Lib_IntVector_Intrinsics_bit_mask64(x) -((x) & 1) - --#if defined(__x86_64__) || defined(_M_X64) -+#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86) - - #if defined(HACL_CAN_COMPILE_VEC128) - diff --git a/00442-gh-125584-require-network-resource-in-test_urllib2-handlertests-test_ftp_error-125586.patch b/00442-gh-125584-require-network-resource-in-test_urllib2-handlertests-test_ftp_error-125586.patch deleted file mode 100644 index 94c402e..0000000 --- a/00442-gh-125584-require-network-resource-in-test_urllib2-handlertests-test_ftp_error-125586.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Wed, 16 Oct 2024 15:24:41 +0200 -Subject: [PATCH] 00442: gh-125584: Require network resource in - ``test_urllib2.HandlerTests.test_ftp_error`` (#125586) - ---- - Lib/test/test_urllib2.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py -index 19179fdc95..b90ccc2f12 100644 ---- a/Lib/test/test_urllib2.py -+++ b/Lib/test/test_urllib2.py -@@ -794,6 +794,7 @@ def connect_ftp(self, user, passwd, host, port, dirs, - self.assertEqual(headers.get("Content-type"), mimetype) - self.assertEqual(int(headers["Content-length"]), len(data)) - -+ @support.requires_resource("network") - def test_ftp_error(self): - class ErrorFTPHandler(urllib.request.FTPHandler): - def __init__(self, exception): diff --git a/python3.14.spec b/python3.14.spec index c21d301..c374f74 100644 --- a/python3.14.spec +++ b/python3.14.spec @@ -14,10 +14,10 @@ URL: https://www.python.org/ # WARNING When rebasing to a new Python version, # remember to update the python3-docs package as well %global general_version %{pybasever}.0 -%global prerel a1 +%global prerel a2 %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 1%{?dist} License: Python-2.0.1 @@ -57,7 +57,7 @@ License: Python-2.0.1 # This needs to be manually updated when we update Python. # Explore the sources tarball (you need the version before %%prep is executed): # $ tar -tf Python-%%{upstream_version}.tar.xz | grep whl -%global pip_version 24.2 +%global pip_version 24.3.1 %global setuptools_version 67.6.1 %global wheel_version 0.43.0 # All of those also include a list of indirect bundled libs: @@ -65,8 +65,8 @@ License: Python-2.0.1 # $ %%{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/ensurepip/_bundled/pip-*.whl pip/_vendor/vendor.txt) %global pip_bundled_provides %{expand: Provides: bundled(python3dist(cachecontrol)) = 0.14 -Provides: bundled(python3dist(certifi)) = 2024.7.4 -Provides: bundled(python3dist(distlib)) = 0.3.8 +Provides: bundled(python3dist(certifi)) = 2024.8.30 +Provides: bundled(python3dist(distlib)) = 0.3.9 Provides: bundled(python3dist(distro)) = 1.9 Provides: bundled(python3dist(idna)) = 3.7 Provides: bundled(python3dist(msgpack)) = 1.0.8 @@ -79,9 +79,9 @@ Provides: bundled(python3dist(resolvelib)) = 1.0.1 Provides: bundled(python3dist(rich)) = 13.7.1 Provides: bundled(python3dist(setuptools)) = 70.3 Provides: bundled(python3dist(tomli)) = 2.0.1 -Provides: bundled(python3dist(truststore)) = 0.9.1 +Provides: bundled(python3dist(truststore)) = 0.10 Provides: bundled(python3dist(typing-extensions)) = 4.12.2 -Provides: bundled(python3dist(urllib3)) = 1.26.18 +Provides: bundled(python3dist(urllib3)) = 1.26.20 } # setuptools # vendor.txt files not in .whl @@ -123,10 +123,10 @@ Provides: bundled(python3dist(packaging)) = 24 # PEP 744: JIT Compilation # Whether to build with the experimental JIT compiler -# We can only have this on Fedora 40+, where clang 18+ is available +# We can only have this on Fedora 41+, where clang 19+ is available # And only on certain architectures: https://peps.python.org/pep-0744/#support # The freethreading build (when enabled) does not support JIT yet -%bcond jit %[(0%{?fedora} >= 40 || 0%{?rhel} >= 10) && ("%{_arch}" == "x86_64" || "%{_arch}" == "aarch64")] +%bcond jit %[(0%{?fedora} >= 41 || 0%{?rhel} >= 10) && ("%{_arch}" == "x86_64" || "%{_arch}" == "aarch64")] %if %{with jit} # When built with JIT, it still needs to be enabled on runtime via PYTHON_JIT=1 %global jit_flag --enable-experimental-jit=yes-off @@ -279,8 +279,8 @@ BuildRequires: tzdata %endif %if %{with jit} -BuildRequires: clang(major) = 18 -BuildRequires: llvm(major) = 18 +BuildRequires: clang(major) = 19 +BuildRequires: llvm(major) = 19 %endif %ifarch %{valgrind_arches} @@ -334,7 +334,7 @@ Source11: idle3.appdata.xml # (Patches taken from github.com/fedora-python/cpython) -# 00251 # 60dd97be7bf3662ff65edd8471e948924b4175b2 +# 00251 # f5b56b9d4a79df04e9d90ceff7388554c5f818b6 # Change user install location # # Set values of base and platbase in sysconfig from /usr @@ -351,16 +351,6 @@ Source11: idle3.appdata.xml # pypa/distutils integration: https://github.com/pypa/distutils/pull/70 Patch251: 00251-change-user-install-location.patch -# 00441 # 482bf31a8339a4df224d13e7e3f69b9cf306a09a -# Make vectorized versions of Blake2 available on x86, too -# -# Source: https://github.com/python/cpython/pull/125244 -Patch441: 00441-make-vectorized-versions-of-blake2-available-on-x86-too.patch - -# 00442 # 86fff8cce3d6259e0f7efb75c8153f2d8eec4564 -# gh-125584: Require network resource in ``test_urllib2.HandlerTests.test_ftp_error`` (#125586) -Patch442: 00442-gh-125584-require-network-resource-in-test_urllib2-handlertests-test_ftp_error-125586.patch - # (New patches go here ^^^) # # When adding new patches to "python" and "python3" in Fedora, EL, etc., @@ -1698,6 +1688,9 @@ CheckPython freethreading # ====================================================== %changelog +* Wed Nov 20 2024 Karolina Surma - 3.14.0~a2-1 +- Update to Python 3.14.0a2 + * Fri Oct 18 2024 Karolina Surma - 3.14.0~a1-2 - Build Python 3.14 using Python 3.14 diff --git a/sources b/sources index 60bf1b0..e127abd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Python-3.14.0a1.tar.xz) = f96e8923662c1ba5ffb99673e59f5ce2366b13ea853e21e5a5c74efcf0a36f20d00612a9b882caf6482d2179b7315ae0331dcb45be19b7b9676f0ed4bf2256b8 +SHA512 (Python-3.14.0a2.tar.xz) = face78a7ef5d1a14b7e8c478125c660fe9745e793a5443932684c8426f0023324236c67ad73198e4286ba8793628452ae4d4d6332f007c009b285ba83ca1fc48