Update to 3.12.0b3

This commit is contained in:
Tomáš Hrnčiar 2023-06-20 18:45:12 +02:00
parent 5b9ff3722c
commit 8522651180
3 changed files with 7 additions and 68 deletions

View File

@ -1,58 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Mon, 29 May 2023 15:51:16 +0200
Subject: [PATCH] 00401: Tests: Use setuptools+wheel from
sysconfig.get_config_var('WHEEL_PKG_DIR') if set
Proposed upstream https://github.com/python/cpython/pull/105056
---
Lib/test/support/__init__.py | 21 +++++++++++++++++++++
Lib/test/test_cppext.py | 4 ++--
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index d555c53fee..adc3f5901d 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -2398,5 +2398,26 @@ def adjust_int_max_str_digits(max_digits):
finally:
sys.set_int_max_str_digits(current)
+
+@functools.cache
+def _findwheel(pkgname):
+ """Try to find a wheel with the package specified as pkgname.
+
+ If set, the wheels are searched for in WHEEL_PKG_DIR (see ensurepip).
+ Otherwise, they are searched for in the test directory.
+ """
+ wheel_dir = sysconfig.get_config_var('WHEEL_PKG_DIR') or TEST_HOME_DIR
+ filenames = os.listdir(wheel_dir)
+ filenames = sorted(filenames) # sort this like ensurepip does it
+ for filename in filenames:
+ # filename is like 'pip-21.2.4-py3-none-any.whl'
+ if not filename.endswith(".whl"):
+ continue
+ prefix = pkgname + '-'
+ if filename.startswith(prefix):
+ return os.path.join(wheel_dir, filename)
+ raise FileNotFoundError(f"No wheel for {pkgname} found in {wheel_dir}")
+
+
#For recursion tests, easily exceeds default recursion limit
EXCEEDS_RECURSION_LIMIT = 5000
diff --git a/Lib/test/test_cppext.py b/Lib/test/test_cppext.py
index 4fb62d87e8..d124220dac 100644
--- a/Lib/test/test_cppext.py
+++ b/Lib/test/test_cppext.py
@@ -83,8 +83,8 @@ def run_cmd(operation, cmd):
cmd = [python, '-X', 'dev',
'-m', 'pip', 'install',
- support.findfile('setuptools-67.6.1-py3-none-any.whl'),
- support.findfile('wheel-0.40.0-py3-none-any.whl')]
+ support._findwheel('setuptools'),
+ support._findwheel('wheel')]
run_cmd('Install build dependencies', cmd)
# Build and install the C++ extension

View File

@ -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 b2
%global prerel b3
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
Release: 3%{?dist}
Release: 1%{?dist}
License: Python-2.0.1
@ -362,12 +362,6 @@ 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
# 00401 # 48310af24b090719553bf0e9c965d80524e0b40e
# Tests: Use setuptools+wheel from sysconfig.get_config_var('WHEEL_PKG_DIR') if set
#
# Proposed upstream https://github.com/python/cpython/pull/105056
Patch401: 00401-tests-use-setuptools-wheel-from-sysconfig-get_config_var-wheel_pkg_dir-if-set.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@ -1657,6 +1651,9 @@ CheckPython optimized
# ======================================================
%changelog
* Tue Jun 20 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.12.0~b3-1
- Update to 3.12.0b3
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.12.0~b2-3
- Rebuilt for Python 3.12

View File

@ -1,2 +1,2 @@
SHA512 (Python-3.12.0b2.tar.xz) = 9bfac70f2ccc1f6798bc63a55d92f0b162e3a9077624a2e37448002ea310cb7b1da64ad2aceda795b45de91f60eb4d95dde85984900e54906d814625b42143b5
SHA512 (Python-3.12.0b2.tar.xz.asc) = 22a1f2c3335bc428cfee0ce2e081aeed24474d3cd877fac1cc4cf92b4a2bee70f85aed0068a71600cddef9c8b46bbde257a92c57bd494ad820c0686ab7c8c0f0
SHA512 (Python-3.12.0b3.tar.xz) = 2d83285ea09445da25204285937366b20793b12223f5a0979276633213773d14de6dbb6a311629b755962804d8521b30cf9fe032f447608b6df7af721a18ba0c
SHA512 (Python-3.12.0b3.tar.xz.asc) = ab0d91f3c2fc001fe924f71182526d543a3c9e65238954bb954c58d03171a6cb3640a15570d2d7b889c6251fd876790121cd36bcc29a901f53d17f5f4f8f6f4e