Update to 3.7.0b4

This commit is contained in:
Miro Hrončok 2018-05-10 14:47:13 +02:00
parent 240a1f769d
commit 0c391afb69
5 changed files with 47 additions and 84 deletions

View File

@ -1,7 +1,21 @@
diff -up Python-3.5.0/configure.ac.than Python-3.5.0/configure.ac diff --git a/config.sub b/config.sub
--- Python-3.5.0/configure.ac.than 2015-11-13 11:51:32.039560172 -0500 index ba37cf9..52a9ec6 100755
+++ Python-3.5.0/configure.ac 2015-11-13 11:52:11.670168157 -0500 --- a/config.sub
@@ -788,9 +788,9 @@ cat >> conftest.c <<EOF +++ b/config.sub
@@ -1042,7 +1042,7 @@ case $basic_machine in
;;
ppc64) basic_machine=powerpc64-unknown
;;
- ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
diff --git a/configure.ac b/configure.ac
index 2535969..9fb3193 100644
--- a/configure.ac
+++ b/configure.ac
@@ -765,9 +765,9 @@ cat >> conftest.c <<EOF
alpha-linux-gnu alpha-linux-gnu
# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP) # elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
# if defined(__ARMEL__) # if defined(__ARMEL__)
@ -13,7 +27,7 @@ diff -up Python-3.5.0/configure.ac.than Python-3.5.0/configure.ac
# endif # endif
# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP) # elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
# if defined(__ARMEL__) # if defined(__ARMEL__)
@@ -810,7 +810,7 @@ cat >> conftest.c <<EOF @@ -807,7 +807,7 @@ cat >> conftest.c <<EOF
# elif _MIPS_SIM == _ABIN32 # elif _MIPS_SIM == _ABIN32
mips64el-linux-gnuabin32 mips64el-linux-gnuabin32
# elif _MIPS_SIM == _ABI64 # elif _MIPS_SIM == _ABI64
@ -22,7 +36,7 @@ diff -up Python-3.5.0/configure.ac.than Python-3.5.0/configure.ac
# else # else
# error unknown platform triplet # error unknown platform triplet
# endif # endif
@@ -820,7 +820,7 @@ cat >> conftest.c <<EOF @@ -817,7 +817,7 @@ cat >> conftest.c <<EOF
# elif _MIPS_SIM == _ABIN32 # elif _MIPS_SIM == _ABIN32
mips64-linux-gnuabin32 mips64-linux-gnuabin32
# elif _MIPS_SIM == _ABI64 # elif _MIPS_SIM == _ABI64
@ -31,7 +45,7 @@ diff -up Python-3.5.0/configure.ac.than Python-3.5.0/configure.ac
# else # else
# error unknown platform triplet # error unknown platform triplet
# endif # endif
@@ -830,9 +830,9 @@ cat >> conftest.c <<EOF @@ -827,9 +827,9 @@ cat >> conftest.c <<EOF
powerpc-linux-gnuspe powerpc-linux-gnuspe
# elif defined(__powerpc64__) # elif defined(__powerpc64__)
# if defined(__LITTLE_ENDIAN__) # if defined(__LITTLE_ENDIAN__)
@ -43,16 +57,3 @@ diff -up Python-3.5.0/configure.ac.than Python-3.5.0/configure.ac
# endif # endif
# elif defined(__powerpc__) # elif defined(__powerpc__)
powerpc-linux-gnu powerpc-linux-gnu
diff --git a/config.sub b/config.sub
index 40ea5df..932128b 100755
--- a/config.sub
+++ b/config.sub
@@ -1045,7 +1045,7 @@ case $basic_machine in
;;
ppc64) basic_machine=powerpc64-unknown
;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown

View File

@ -1,55 +0,0 @@
From a3febe3cba14b89885f42ca2f0224096a52885f6 Mon Sep 17 00:00:00 2001
From: Antoine Pitrou <antoine@python.org>
Date: Mon, 23 Apr 2018 13:19:42 +0200
Subject: [PATCH] bpo-33329: Fix multiprocessing regression on newer glibcs
Starting with glibc 2.27.9000-xxx, sigaddset() can return EINVAL for some
reserved signal numbers between 1 and NSIG. The `range(1, NSIG)` idiom
is commonly used to select all signals for blocking with `pthread_sigmask`.
So we ignore the sigaddset() return value until we expose sigfillset()
to provide a better idiom.
---
.../next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst | 1 +
Modules/signalmodule.c | 14 ++++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
create mode 100644 Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst
diff --git a/Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst b/Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst
new file mode 100644
index 000000000000..d1a4e56d04b9
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst
@@ -0,0 +1 @@
+Fix multiprocessing regression on newer glibcs
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index 791616014384..35fd87e2d1e7 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -819,7 +819,6 @@ iterable_to_sigset(PyObject *iterable, sigset_t *mask)
int result = -1;
PyObject *iterator, *item;
long signum;
- int err;
sigemptyset(mask);
@@ -841,11 +840,14 @@ iterable_to_sigset(PyObject *iterable, sigset_t *mask)
Py_DECREF(item);
if (signum == -1 && PyErr_Occurred())
goto error;
- if (0 < signum && signum < NSIG)
- err = sigaddset(mask, (int)signum);
- else
- err = 1;
- if (err) {
+ if (0 < signum && signum < NSIG) {
+ /* bpo-33329: ignore sigaddset() return value as it can fail
+ * for some reserved signals, but we want the `range(1, NSIG)`
+ * idiom to allow selecting all valid signals.
+ */
+ (void) sigaddset(mask, (int)signum);
+ }
+ else {
PyErr_Format(PyExc_ValueError,
"signal number %ld out of range", signum);
goto error;

View File

@ -0,0 +1,13 @@
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index da0135b..1b27b5f 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -1463,7 +1463,7 @@ class TestPosixSpawn(unittest.TestCase):
"""
pid = posix.posix_spawn(sys.executable,
[sys.executable, '-c', script],
- {'foo': 'bar'})
+ {**os.environ, 'foo': 'bar'})
self.assertEqual(os.waitpid(pid, 0), (pid, 0))
with open(envfile) as f:
self.assertEqual(f.read(), 'bar')

View File

@ -13,12 +13,12 @@ URL: https://www.python.org/
# Third beta # Third beta
%global prerel b3 %global prerel b4
# WARNING When rebasing to a new Python version, # WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well # remember to update the python3-docs package as well
Version: %{pybasever}.0 Version: %{pybasever}.0
Release: 0.16.%{?prerel}%{?dist} Release: 0.17.%{?prerel}%{?dist}
License: Python License: Python
@ -350,11 +350,12 @@ Patch274: 00274-fix-arch-names.patch
# and: https://src.fedoraproject.org/rpms/redhat-rpm-config/c/078af19 # and: https://src.fedoraproject.org/rpms/redhat-rpm-config/c/078af19
Patch291: 00291-setup-Link-ctypes-against-dl-explicitly.patch Patch291: 00291-setup-Link-ctypes-against-dl-explicitly.patch
# 00302 # # 00304 #
# Fix multiprocessing regression on newer glibcs # Pass os.environ to new process created at test_posix::test_specify_environment
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1569933 # Otherwise important variables such as LD_LIBRARY_PATH are not set and the
# and: https://bugs.python.org/issue33329 # child process might not work at all
Patch302: 00302-fix-multiprocessing-regression-on-newer-glibcs.patch # Proposed upstream: https://bugs.python.org/issue33455
Patch304: 00304-test-posix-pass-environ.patch
# (New patches go here ^^^) # (New patches go here ^^^)
# #
@ -668,7 +669,7 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch251 -p1 %patch251 -p1
%patch274 -p1 %patch274 -p1
%patch291 -p1 %patch291 -p1
%patch302 -p1 %patch304 -p1
# Remove files that should be generated by the build # Remove files that should be generated by the build
@ -1564,6 +1565,9 @@ CheckPython optimized
# ====================================================== # ======================================================
%changelog %changelog
* Thu May 10 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-0.17.b4
- Update to 3.7.0b4
* Mon Apr 23 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-0.16.b3 * Mon Apr 23 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-0.16.b3
- Fix multiprocessing regression on newer glibcs - Fix multiprocessing regression on newer glibcs
- Enable test_multiprocessing_fork(server) and _spawn again - Enable test_multiprocessing_fork(server) and _spawn again

View File

@ -1 +1 @@
SHA512 (Python-3.7.0b3.tar.xz) = 4fd605cb1621e4bed73c2aadf0443fb70b4d013e9d93a26e81e75dc56906062660b63ac1d97224da217d5e05a3372802a291924a26cc067959d8e1e753a8356f SHA512 (Python-3.7.0b4.tar.xz) = e97459a5467a984a5a2bfc08ed937dfeb899f3d4ff9a655878badffc19e722efc30112422c14f94fcf9f6c82ee01e9fe2bb538db83454e4c83b711d1a8444472