From 4e730bc80e2ce5e9d7732d06b2c761d0053eea4d Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Sat, 2 May 2026 09:57:53 -0500 Subject: [PATCH 1/3] Bump 3.14 to 3.14.5rc1 --- pythonbuild/downloads.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pythonbuild/downloads.py b/pythonbuild/downloads.py index 5b8431f91..4ecb628c8 100644 --- a/pythonbuild/downloads.py +++ b/pythonbuild/downloads.py @@ -84,10 +84,10 @@ "python_tag": "cp313", }, "cpython-3.14": { - "url": "https://www.python.org/ftp/python/3.14.4/Python-3.14.4.tar.xz", - "size": 23855332, - "sha256": "d923c51303e38e249136fc1bdf3568d56ecb03214efdef48516176d3d7faaef8", - "version": "3.14.4", + "url": "https://www.python.org/ftp/python/3.14.5/Python-3.14.5rc1.tar.xz", + "size": 23895772, + "sha256": "f767b809df4376dd3dffd62a2e3ce90646a84cac04d0235943bc1f0c44c95780", + "version": "3.14.5rc1", "licenses": ["Python-2.0", "CNRI-Python"], "license_file": "LICENSE.cpython.txt", "python_tag": "cp314", From 6421c5edbbacf932b9a586aeeb104b327d5db6aa Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Sat, 2 May 2026 10:10:12 -0500 Subject: [PATCH 2/3] Ignore `test_xml_etree_c` under PGO This looks similar to https://github.com/python/cpython/pull/142226 --- cpython-unix/build-cpython.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 7f7873455..f70b5e05c 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -601,6 +601,12 @@ if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]]; then PROFILE_TASK="${PROFILE_TASK} --ignore test_json" fi +# On 3.14.5rc1+ `test_xml_etree_c.BadElementTest.test_deeply_nested_deepcopy` can fail during +# PGO due to RecursionError not being raised as expected, similar to the `test_json` failure above. +if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]]; then + PROFILE_TASK="${PROFILE_TASK} --ignore test_xml_etree_c" +fi + # PGO optimized / BOLT instrumented binaries segfault in a test_bytes test. Skip it. if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" && "${TARGET_TRIPLE}" == x86_64* ]]; then PROFILE_TASK="${PROFILE_TASK} --ignore test.test_bytes.BytesTest.test_from_format" From 1cd7f4de943656dc2e160686239015a06b6326dc Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Sat, 2 May 2026 10:37:44 -0500 Subject: [PATCH 3/3] Remove stale `test_json` ignore and use patch for `test_xml_etree_c` --- cpython-unix/build-cpython.sh | 17 ++++---------- ...-etree-deepcopy-recursion-depth-3.14.patch | 23 +++++++++++++++++++ 2 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 cpython-unix/patch-test-xml-etree-deepcopy-recursion-depth-3.14.patch diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index f70b5e05c..6eccc09e0 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -595,18 +595,6 @@ if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" && -n "${CROSS_COMPILING}" && "$ PROFILE_TASK="${PROFILE_TASK} --ignore test_strftime_y2k" fi -# On 3.14+ `test_json.test_recursion.TestCRecursion.test_highly_nested_objects_decoding` fails during -# PGO due to RecursionError not being raised as expected. See https://github.com/python/cpython/issues/140125 -if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]]; then - PROFILE_TASK="${PROFILE_TASK} --ignore test_json" -fi - -# On 3.14.5rc1+ `test_xml_etree_c.BadElementTest.test_deeply_nested_deepcopy` can fail during -# PGO due to RecursionError not being raised as expected, similar to the `test_json` failure above. -if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]]; then - PROFILE_TASK="${PROFILE_TASK} --ignore test_xml_etree_c" -fi - # PGO optimized / BOLT instrumented binaries segfault in a test_bytes test. Skip it. if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" && "${TARGET_TRIPLE}" == x86_64* ]]; then PROFILE_TASK="${PROFILE_TASK} --ignore test.test_bytes.BytesTest.test_from_format" @@ -619,6 +607,11 @@ if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]]; then patch -p1 -i "${ROOT}/patch-python-configure-hacl-no-simd.patch" fi +# See https://github.com/python/cpython/issues/149285 +if [[ "${PYTHON_MAJMIN_VERSION}" = "3.14" ]]; then + patch -p1 -i "${ROOT}/patch-test-xml-etree-deepcopy-recursion-depth-3.14.patch" +fi + # We use ndbm on macOS and BerkeleyDB elsewhere. if [[ "${PYBUILD_PLATFORM}" = macos* ]]; then CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-dbmliborder=ndbm" diff --git a/cpython-unix/patch-test-xml-etree-deepcopy-recursion-depth-3.14.patch b/cpython-unix/patch-test-xml-etree-deepcopy-recursion-depth-3.14.patch new file mode 100644 index 000000000..69f0401ae --- /dev/null +++ b/cpython-unix/patch-test-xml-etree-deepcopy-recursion-depth-3.14.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zanie Blue +Date: Sat, 2 May 2026 00:00:00 +0000 +Subject: [PATCH] gh-149285: Increase ElementTree deepcopy recursion test depth + (#149286) + +Backport of https://github.com/python/cpython/pull/149286. +--- + Lib/test/test_xml_etree.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py +--- a/Lib/test/test_xml_etree.py ++++ b/Lib/test/test_xml_etree.py +@@ -3105,7 +3105,7 @@ class BadElementTest(unittest.TestCase): + # This should raise a RecursionError and not crash. + # See https://github.com/python/cpython/issues/148801. + root = cur = ET.Element('s') +- for _ in range(150_000): ++ for _ in range(500_000): + cur = ET.SubElement(cur, 'u') + with support.infinite_recursion(): + with self.assertRaises(RecursionError):