Update to 3.12.0b1

This update enables budled pip, because in Fedora we don't have the
latest version yet.
See: https://src.fedoraproject.org/rpms/python-pip/pull-request/123#comment-142984
This commit is contained in:
Tomáš Hrnčiar 2023-05-23 11:04:35 +02:00
parent dd482b1c20
commit 8bed4bf373
4 changed files with 64 additions and 22 deletions

View File

@ -16,7 +16,7 @@ https://github.com/GrahamDumpleton/mod_wsgi/issues/730
2 files changed, 8 insertions(+), 50 deletions(-)
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index a39a267b40..1b9c85c826 100644
index 97165264b3..7667ed37e8 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -1015,39 +1015,6 @@ def noop(): pass

View File

@ -0,0 +1,43 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Carl Meyer <carl@oddbird.net>
Date: Tue, 23 May 2023 16:04:31 -0600
Subject: [PATCH] 00398: fix stack overwrite on 32-bit in perf map test harness
(#104811)
---
Modules/_testinternalcapi.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c
index b91f7b620f..8267dbf677 100644
--- a/Modules/_testinternalcapi.c
+++ b/Modules/_testinternalcapi.c
@@ -762,19 +762,24 @@ clear_extension(PyObject *self, PyObject *args)
static PyObject *
write_perf_map_entry(PyObject *self, PyObject *args)
{
+ PyObject *code_addr_v;
const void *code_addr;
unsigned int code_size;
const char *entry_name;
- if (!PyArg_ParseTuple(args, "KIs", &code_addr, &code_size, &entry_name))
+ if (!PyArg_ParseTuple(args, "OIs", &code_addr_v, &code_size, &entry_name))
return NULL;
+ code_addr = PyLong_AsVoidPtr(code_addr_v);
+ if (code_addr == NULL) {
+ return NULL;
+ }
int ret = PyUnstable_WritePerfMapEntry(code_addr, code_size, entry_name);
- if (ret == -1) {
- PyErr_SetString(PyExc_OSError, "Failed to write performance map entry");
+ if (ret < 0) {
+ PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
- return Py_BuildValue("i", ret);
+ return PyLong_FromLong(ret);
}
static PyObject *

View File

@ -14,7 +14,7 @@ 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 a7
%global prerel b1
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
Release: 1%{?dist}
@ -55,19 +55,18 @@ License: Python-2.0.1
#
# Procedure: https://fedoraproject.org/wiki/SIGs/Python/UpgradingPython
#
# IMPORTANT: When bootstrapping, it's very likely the wheels for pip and
# setuptools are not available. Turn off the rpmwheels bcond until
# the two packages are built with wheels to get around the issue.
# IMPORTANT: When bootstrapping, it's very likely python-pip-wheel is
# not available. Turn off the rpmwheels bcond until
# python-pip is built with a wheel to get around the issue.
%bcond_with bootstrap
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
# Whether to use RPM build wheels from the python-pip-wheel package
# Uses upstream bundled prebuilt wheels otherwise
%bcond_without rpmwheels
%bcond_with rpmwheels
# If the rpmwheels condition is disabled, we use the bundled wheel packages
# from Python with the versions below.
# This needs to be manually updated when we update Python.
%global pip_version 23.0.1
%global setuptools_version 65.5.0
%global pip_version 23.1.2
# Expensive optimizations (mainly, profile-guided optimizations)
%bcond_without optimizations
@ -236,10 +235,9 @@ BuildRequires: /usr/bin/dtrace
BuildRequires: /usr/sbin/ifconfig
%if %{with rpmwheels}
# Newer versions in Fedora 37 support Python 3.12
# Versions in Fedora 36 were patched to add the support, in the versions listed bellow
BuildRequires: %{python_wheel_pkg_prefix}-setuptools-wheel >= 59.6.0-3
BuildRequires: %{python_wheel_pkg_prefix}-pip-wheel >= 21.3.1-4
# Python 3.12 removed the deprecated imp module,
# the first compatible version of pip is 23.1.2.
BuildRequires: %{python_wheel_pkg_prefix}-pip-wheel >= 23.1.2
%endif
%if %{without bootstrap}
@ -302,6 +300,10 @@ Patch251: 00251-change-user-install-location.patch
# https://github.com/GrahamDumpleton/mod_wsgi/issues/730
Patch371: 00371-revert-bpo-1596321-fix-threading-_shutdown-for-the-main-thread-gh-28549-gh-28589.patch
# 00398 # 3a2e73c1542a7204628783cef2186e4b8a385f79
# fix stack overwrite on 32-bit in perf map test harness (#104811)
Patch398: 00398-fix-stack-overwrite-on-32-bit-in-perf-map-test-harness-gh-104811-104823.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@ -423,11 +425,9 @@ This package contains /usr/bin/python - the "python" command that runs Python 3.
Summary: Python runtime libraries
%if %{with rpmwheels}
Requires: %{python_wheel_pkg_prefix}-setuptools-wheel >= 59.6.0-3
Requires: %{python_wheel_pkg_prefix}-pip-wheel >= 21.3.1-4
Requires: %{python_wheel_pkg_prefix}-pip-wheel >= 23.1.2
%else
Provides: bundled(python3dist(pip)) = %{pip_version}
Provides: bundled(python3dist(setuptools)) = %{setuptools_version}
%endif
%unversioned_obsoletes_of_python3_X_if_main libs
@ -600,7 +600,6 @@ The debug runtime additionally supports debug builds of C-API extensions
%if %{with rpmwheels}
rm Lib/ensurepip/_bundled/pip-%{pip_version}-py3-none-any.whl
rm Lib/ensurepip/_bundled/setuptools-%{setuptools_version}-py3-none-any.whl
%endif
# Remove all exe files to ensure we are not shipping prebuilt binaries
@ -1140,7 +1139,6 @@ CheckPython optimized
%else
%dir %{pylibdir}/ensurepip/_bundled
%{pylibdir}/ensurepip/_bundled/pip-%{pip_version}-py3-none-any.whl
%{pylibdir}/ensurepip/_bundled/setuptools-%{setuptools_version}-py3-none-any.whl
%endif
%dir %{pylibdir}/concurrent/
@ -1199,7 +1197,6 @@ CheckPython optimized
%{dynload_dir}/_ssl.%{SOABI_optimized}.so
%{dynload_dir}/_statistics.%{SOABI_optimized}.so
%{dynload_dir}/_struct.%{SOABI_optimized}.so
%{dynload_dir}/_typing.%{SOABI_optimized}.so
%{dynload_dir}/array.%{SOABI_optimized}.so
%{dynload_dir}/audioop.%{SOABI_optimized}.so
%{dynload_dir}/binascii.%{SOABI_optimized}.so
@ -1482,7 +1479,6 @@ CheckPython optimized
%{dynload_dir}/_ssl.%{SOABI_debug}.so
%{dynload_dir}/_statistics.%{SOABI_debug}.so
%{dynload_dir}/_struct.%{SOABI_debug}.so
%{dynload_dir}/_typing.%{SOABI_debug}.so
%{dynload_dir}/array.%{SOABI_debug}.so
%{dynload_dir}/audioop.%{SOABI_debug}.so
%{dynload_dir}/binascii.%{SOABI_debug}.so
@ -1572,6 +1568,9 @@ CheckPython optimized
# ======================================================
%changelog
* Tue May 23 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~b1-1
- Update to 3.12.0b1
* Wed Apr 05 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~a7-1
- Update to 3.12.0a7

View File

@ -1,2 +1,2 @@
SHA512 (Python-3.12.0a7.tar.xz) = 181e73215666a7deb4286a70f506d788adb0d13e3b688f3c4e061819bc59cbcedaf8aca0251d4e58791be8488f43ca0075176335bd1b3ff496b4ea2f14967d8b
SHA512 (Python-3.12.0a7.tar.xz.asc) = 07c27bfb649755cfe505a902ff677e146ed1e8e19e7d5801d41c5926359b7d3f2ef73961c26f6cce6dd948355324330d4e9bae79e3661f87079b1adb5bf62355
SHA512 (Python-3.12.0b1.tar.xz) = 7d6d009f765ba48ef48e6b25cb1f043ba66979d66cb9141452862e84ae954611361d24178cce628d1892b75d306370a56fcb30a7c1715b0eedcfef5610f3e1ae
SHA512 (Python-3.12.0b1.tar.xz.asc) = cea449f05ae66c28aeb4ffd99b5748ba4c09bfb2a6889a771744ea81ca2afc2420648d4ca92592d32ddb26660804e73912e6fb8d906674e9e1895ba613904b26