Skip to content

Commit

Permalink
Upgrade CPython 3.12.8 to 3.12.9, 3.13.1 to 3.13.2 (#513)
Browse files Browse the repository at this point in the history
Our BOLT patches that landed for 3.14 have been backported to 3.12 and
3.13, so the remaining BOLT patch now applies to 3.12+.
  • Loading branch information
geofft authored Feb 5, 2025
1 parent 4615f2f commit 183bc64
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 100 deletions.
14 changes: 3 additions & 11 deletions cpython-unix/build-cpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,9 @@ if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_11}" ]; then
fi

if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_12}" ]; then
# On 3.14+, we upstreamed these changes and they are no longer needed
if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_13}" ]; then
# Adjust BOLT flags to yield better behavior. See inline details in patch.
patch -p1 -i ${ROOT}/patch-configure-bolt-flags.patch

# Adjust BOLT application flags to make use of modern LLVM features.
patch -p1 -i ${ROOT}/patch-configure-bolt-apply-flags.patch
else
# We are still upstreaming some additional optimization flags
patch -p1 -i ${ROOT}/patch-configure-bolt-apply-flags-3.14.patch
fi
# Additional BOLT optimizations, being upstreamed in
# https://github.com/python/cpython/issues/128514
patch -p1 -i ${ROOT}/patch-configure-bolt-apply-flags-128514.patch
fi

# The optimization make targets are both phony and non-phony. This leads
Expand Down
23 changes: 0 additions & 23 deletions cpython-unix/patch-configure-bolt-apply-flags.patch

This file was deleted.

50 changes: 0 additions & 50 deletions cpython-unix/patch-configure-bolt-flags.patch

This file was deleted.

8 changes: 0 additions & 8 deletions cpython-unix/patch-test-embed-prevent-segfault.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,3 @@ index 13713cf37b8..40ee4837bfe 100644
def test_global_pathconfig(self):
# Test C API functions getting the path configuration:
#
@@ -1866,6 +1867,7 @@ def test_no_memleak(self):
self.assertEqual(blocks, 0, out)


+@unittest.skipIf(support.check_bolt_optimized, "segfaults on BOLT instrumented binaries")
class StdPrinterTests(EmbeddingTestsMixin, unittest.TestCase):
# Test PyStdPrinter_Type which is used by _PySys_SetPreliminaryStderr():
# "Set up a preliminary stderr printer until we have enough
16 changes: 8 additions & 8 deletions pythonbuild/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@
"python_tag": "cp311",
},
"cpython-3.12": {
"url": "https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tar.xz",
"size": 20489808,
"sha256": "c909157bb25ec114e5869124cc2a9c4a4d4c1e957ca4ff553f1edc692101154e",
"version": "3.12.8",
"url": "https://www.python.org/ftp/python/3.12.9/Python-3.12.9.tar.xz",
"size": 20502440,
"sha256": "7220835d9f90b37c006e9842a8dff4580aaca4318674f947302b8d28f3f81112",
"version": "3.12.9",
"licenses": ["Python-2.0", "CNRI-Python"],
"license_file": "LICENSE.cpython.txt",
"python_tag": "cp312",
},
"cpython-3.13": {
"url": "https://www.python.org/ftp/python/3.13.1/Python-3.13.1.tar.xz",
"size": 22589692,
"sha256": "9cf9427bee9e2242e3877dd0f6b641c1853ca461f39d6503ce260a59c80bf0d9",
"version": "3.13.1",
"url": "https://www.python.org/ftp/python/3.13.2/Python-3.13.2.tar.xz",
"size": 22621108,
"sha256": "d984bcc57cd67caab26f7def42e523b1c015bbc5dc07836cf4f0b63fa159eb56",
"version": "3.13.2",
"licenses": ["Python-2.0", "CNRI-Python"],
"license_file": "LICENSE.cpython.txt",
"python_tag": "cp313",
Expand Down

0 comments on commit 183bc64

Please sign in to comment.