Update to Python 3.9.0a3

Added patches 340 and 341 (backports from master)
This commit is contained in:
Victor Stinner 2020-01-27 16:18:32 +01:00 committed by Miro Hrončok
parent 78bc51a18d
commit 0ae3172083
11 changed files with 105 additions and 20 deletions

View File

@ -1,4 +1,4 @@
From 5dd33e789d3b70d5021cbceed61494110bbe1540 Mon Sep 17 00:00:00 2001
From d3b41a40387088ab6e32744b71405449361aa035 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Wed, 13 Jan 2010 21:25:18 +0000
Subject: [PATCH] 00001: Fixup distutils/unixccompiler.py to remove standard

View File

@ -1,4 +1,4 @@
From 19b5b3386f16f53e34b9d37e400b655dbfe912e8 Mon Sep 17 00:00:00 2001
From bc29c675016279f6f6a6b4ed140a45710d9840d9 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Wed, 13 Jan 2010 21:25:18 +0000
Subject: [PATCH] 00102: Change the various install paths to use /usr/lib64/
@ -154,7 +154,7 @@ index 41c4229919..543c88432a 100644
'site-packages')
self.assertEqual(dirs[0], wanted)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index d08c78df39..4d2f68447d 100644
index cfe42b4f21..d8766ec09d 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -143,7 +143,7 @@ LIBDIR= @libdir@
@ -198,10 +198,10 @@ index 8632d1fe6d..09a818609e 100644
return DECODE_LOCALE_ERR("EXEC_PREFIX macro", len);
}
diff --git a/configure b/configure
index a2c7ddf595..966a6cae2e 100755
index 85120e498d..a472d7fac3 100755
--- a/configure
+++ b/configure
@@ -15205,9 +15205,9 @@ fi
@@ -15216,9 +15216,9 @@ fi
if test x$PLATFORM_TRIPLET = x; then
@ -214,10 +214,10 @@ index a2c7ddf595..966a6cae2e 100755
diff --git a/configure.ac b/configure.ac
index 57dca35723..7ba091ebf2 100644
index ab8e1b7d27..56e8f3e11e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4689,9 +4689,9 @@ fi
@@ -4706,9 +4706,9 @@ fi
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST(PY_ENABLE_SHARED)
if test x$PLATFORM_TRIPLET = x; then

View File

@ -1,4 +1,4 @@
From f7580af0bf9870c81366613213d4268ef00bff5a Mon Sep 17 00:00:00 2001
From 736a0814aef8ec3883dc9dec394001c7c66b4cc0 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Mon, 18 Jan 2010 17:59:07 +0000
Subject: [PATCH] 00111: Don't try to build a libpythonMAJOR.MINOR.a
@ -21,7 +21,7 @@ Co-authored-by: Miro Hrončok <miro@hroncok.cz>
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 4d2f68447d..3cd2f25571 100644
index d8766ec09d..af24a2fe2a 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -562,7 +562,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c

View File

@ -1,4 +1,4 @@
From f85b612b86a1e688685fc2f908b50e13d75114bc Mon Sep 17 00:00:00 2001
From e338b6e71b31fdebc0961e4ac1ad63c6e6fdfb36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Wed, 15 Aug 2018 15:36:29 +0200
Subject: [PATCH] 00189: Instead of bundled wheels, use our RPM packaged wheels

View File

@ -1,4 +1,4 @@
From d2eb8a55c088caf1bf48e9d998fbc514b820ad6c Mon Sep 17 00:00:00 2001
From 87ea0dc2466a5496946d90c2531ca38f9acb3ac7 Mon Sep 17 00:00:00 2001
From: Michal Cyprian <m.cyprian@gmail.com>
Date: Mon, 26 Jun 2017 16:32:56 +0200
Subject: [PATCH] 00251: Change user install location

View File

@ -1,4 +1,4 @@
From 29524bf73ef1d39e21dff0c60f8ff76bd36549cb Mon Sep 17 00:00:00 2001
From 5201fc9ca191439c337c238542efb85b1f91ed57 Mon Sep 17 00:00:00 2001
From: Petr Viktorin <pviktori@redhat.com>
Date: Mon, 28 Aug 2017 17:16:46 +0200
Subject: [PATCH] 00274: Upstream uses Debian-style architecture naming, change
@ -29,10 +29,10 @@ index ba37cf99e2..52a9ec6662 100755
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
diff --git a/configure.ac b/configure.ac
index 7ba091ebf2..05a2568f56 100644
index 56e8f3e11e..a66d6ebcda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -741,9 +741,9 @@ cat >> conftest.c <<EOF
@@ -753,9 +753,9 @@ cat >> conftest.c <<EOF
alpha-linux-gnu
# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
# if defined(__ARMEL__)
@ -44,7 +44,7 @@ index 7ba091ebf2..05a2568f56 100644
# endif
# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
# if defined(__ARMEL__)
@@ -783,7 +783,7 @@ cat >> conftest.c <<EOF
@@ -795,7 +795,7 @@ cat >> conftest.c <<EOF
# elif _MIPS_SIM == _ABIN32
mips64el-linux-gnuabin32
# elif _MIPS_SIM == _ABI64
@ -53,7 +53,7 @@ index 7ba091ebf2..05a2568f56 100644
# else
# error unknown platform triplet
# endif
@@ -793,22 +793,22 @@ cat >> conftest.c <<EOF
@@ -805,22 +805,22 @@ cat >> conftest.c <<EOF
# elif _MIPS_SIM == _ABIN32
mips64-linux-gnuabin32
# elif _MIPS_SIM == _ABI64

View File

@ -1,4 +1,4 @@
From d1beb7fb4f912a4beaa2b993919e6d6d019d900d Mon Sep 17 00:00:00 2001
From 846d6945a4e8cfe448bfb211e0898ad70984d450 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Thu, 11 Jul 2019 13:44:13 +0200
Subject: [PATCH] 00328: Restore pyc to TIMESTAMP invalidation mode as default

View File

@ -0,0 +1,25 @@
From e03f3216bbf99b64cfa27343d20534fb306ea2e5 Mon Sep 17 00:00:00 2001
From: Dino Viehland <dinoviehland@gmail.com>
Date: Mon, 27 Jan 2020 14:04:56 -0800
Subject: [PATCH] 00340: Add test.test_import.data.unwritable package to
makefile
---
Makefile.pre.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index af24a2fe2a..aa20b65aac 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1330,6 +1330,7 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
test/test_import/data/circular_imports/subpkg \
test/test_import/data/package \
test/test_import/data/package2 \
+ test/test_import/data/unwritable \
importlib \
importlib/metadata \
test/test_importlib \
--
2.24.1

41
00341-bpo-39460.patch Normal file
View File

@ -0,0 +1,41 @@
From e457696601c6535f65105745998662398dbab064 Mon Sep 17 00:00:00 2001
From: Victor Stinner <vstinner@python.org>
Date: Wed, 29 Jan 2020 15:23:29 +0100
Subject: [PATCH] 00341: bpo-39460: Fix test_zipfile.test_add_file_after_2107()
XFS filesystem is limited to 32-bit timestamp, but the utimensat()
syscall doesn't fail. Moreover, there is a VFS bug which returns
a cached timestamp which is different than the value on disk.
https://bugzilla.redhat.com/show_bug.cgi?id=1795576
https://bugs.python.org/issue39460#msg360952
---
Lib/test/test_zipfile.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
index 66f05ac1f3..4c20bfd7e2 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -616,6 +616,18 @@ class StoredTestsWithSourceFile(AbstractTestsWithSourceFile,
except OverflowError:
self.skipTest('Host fs cannot set timestamp to required value.')
+ mtime_ns = os.stat(TESTFN).st_mtime_ns
+ if mtime_ns != (4386268800 * 10**9):
+ # XFS filesystem is limited to 32-bit timestamp, but the syscall
+ # didn't fail. Moreover, there is a VFS bug which returns
+ # a cached timestamp which is different than the value on disk.
+ #
+ # Test st_mtime_ns rather than st_mtime to avoid rounding issues.
+ #
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1795576
+ # https://bugs.python.org/issue39460#msg360952
+ self.skipTest(f"Linux VFS/XFS kernel bug detected: {mtime_ns=}")
+
with zipfile.ZipFile(TESTFN2, "w") as zipfp:
self.assertRaises(struct.error, zipfp.write, TESTFN)
--
2.24.1

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 a2
%global prerel a3
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
Release: 1%{?dist}
@ -278,6 +278,20 @@ Patch274: 00274-fix-arch-names.patch
# Ideally, we should talk to upstream and explain why we don't want this
Patch328: 00328-pyc-timestamp-invalidation-mode.patch
# 00340 #
# Add test.test_import.data.unwritable package to makefile
# Fixed upstream: https://bugs.python.org/issue39459
Patch340: 00340-makefile-missing-test.patch
# 00341 #
# Fix test_zipfile.test_add_file_after_2107()
# XFS filesystem is limited to 32-bit timestamp, but the utimensat()
# syscall doesn't fail. Moreover, there is a VFS bug which returns
# a cached timestamp which is different than the value on disk.
# Workarounds https://bugzilla.redhat.com/show_bug.cgi?id=1795576
# Workarounded upstream: https://bugs.python.org/issue39460
Patch341: 00341-bpo-39460.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@ -625,6 +639,8 @@ rm Lib/ensurepip/_bundled/*.whl
%patch251 -p1
%patch274 -p1
%patch328 -p1
%patch340 -p1
%patch341 -p1
# Remove files that should be generated by the build
@ -1567,6 +1583,9 @@ CheckPython optimized
# ======================================================
%changelog
* Mon Jan 27 2020 Victor Stinner <vstinner@python.org> - 3.9.0~a3-1
- Update to Python 3.9.0a3
* Thu Dec 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~a2-1
- Rebased to Python 3.9.0a2

View File

@ -1,2 +1,2 @@
SHA512 (Python-3.9.0a2.tar.xz) = 3f17869f3ca4db423f66e145e67c9fb4935d8c908c5362de585898343190edb901861701e27ab9187a287880ee42bbb4897aa298967c1862f44b12dbab19d412
SHA512 (Python-3.9.0a2.tar.xz.asc) = 24dc11f516bfc06955742d420b01367330b5b281d6d2292c173ed0e72221004ac3638c98ad6ed36deaaa4ecbaa53d75850a1811153edb94000389429c97cf2b3
SHA512 (Python-3.9.0a3.tar.xz.asc) = e0a12043f9cd110b9315bec0109713868bc8b8d8e94c3859fc55cbefa0d8ae64236eee057bf65229e67b0668cb6a7cfb18f50bfcfd546b37501113630e53db72
SHA512 (Python-3.9.0a3.tar.xz) = 79475a97503818b526ba4d810e34c9d30fec94ce9c1fa20ef147cbbf8185d310b1f1baa484872eb5f6fc4ce7a92a9d3401773e8fc8a7f610a6bf9173e7426fc7