Update to Python 3.6.3
Patches 270, 271, 272 were removed as they have been upstreamed. Patch 277 was added to fix two hanging tests from test_subprocess. Added gdb at the build dependencies, since gdb is not anymore in the buildroot, and that made test_gdb to be skipped.
This commit is contained in:
parent
71718b673e
commit
47069ff417
43
00277-fix-test-subprocess-hanging-tests.patch
Normal file
43
00277-fix-test-subprocess-hanging-tests.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 54849962eacc38f4e6c6f8a72ae258b3e7c2ecd5 Mon Sep 17 00:00:00 2001
|
||||
From: Victor Stinner <victor.stinner@gmail.com>
|
||||
Date: Thu, 5 Oct 2017 15:05:30 +0200
|
||||
Subject: [PATCH] bpo-31178: Mock os.waitpid() in test_subprocess
|
||||
|
||||
Fix test_exception_errpipe_bad_data() and
|
||||
test_exception_errpipe_normal() of test_subprocess: mock os.waitpid()
|
||||
to avoid calling the real os.waitpid(0, 0) which is an unexpected
|
||||
side effect of the test.
|
||||
---
|
||||
Lib/test/test_subprocess.py | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
|
||||
index 00dc37bc2c7..3ba5c028517 100644
|
||||
--- a/Lib/test/test_subprocess.py
|
||||
+++ b/Lib/test/test_subprocess.py
|
||||
@@ -1559,8 +1559,10 @@ def proper_error(*args):
|
||||
|
||||
fork_exec.side_effect = proper_error
|
||||
|
||||
- with self.assertRaises(IsADirectoryError):
|
||||
- self.PopenNoDestructor(["non_existent_command"])
|
||||
+ with mock.patch("subprocess.os.waitpid",
|
||||
+ side_effect=ChildProcessError):
|
||||
+ with self.assertRaises(IsADirectoryError):
|
||||
+ self.PopenNoDestructor(["non_existent_command"])
|
||||
|
||||
@mock.patch("subprocess._posixsubprocess.fork_exec")
|
||||
def test_exception_errpipe_bad_data(self, fork_exec):
|
||||
@@ -1577,8 +1579,10 @@ def bad_error(*args):
|
||||
|
||||
fork_exec.side_effect = bad_error
|
||||
|
||||
- with self.assertRaises(subprocess.SubprocessError) as e:
|
||||
- self.PopenNoDestructor(["non_existent_command"])
|
||||
+ with mock.patch("subprocess.os.waitpid",
|
||||
+ side_effect=ChildProcessError):
|
||||
+ with self.assertRaises(subprocess.SubprocessError) as e:
|
||||
+ self.PopenNoDestructor(["non_existent_command"])
|
||||
|
||||
self.assertIn(repr(error_data), str(e.exception))
|
||||
|
39
python3.spec
39
python3.spec
@ -13,8 +13,8 @@ URL: https://www.python.org/
|
||||
|
||||
# WARNING When rebasing to a new Python version,
|
||||
# remember to update the python3-docs package as well
|
||||
Version: %{pybasever}.2
|
||||
Release: 19%{?dist}
|
||||
Version: %{pybasever}.3
|
||||
Release: 1%{?dist}
|
||||
License: Python
|
||||
|
||||
|
||||
@ -190,6 +190,7 @@ BuildRequires: openssl-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: sqlite-devel
|
||||
BuildRequires: gdb
|
||||
|
||||
%if %{with systemtap}
|
||||
BuildRequires: systemtap-devel
|
||||
@ -367,25 +368,6 @@ Patch262: 00262-pep538_coerce_legacy_c_locale.patch
|
||||
# Reported upstream: http://bugs.python.org/issue29804
|
||||
Patch264: 00264-skip-test-failing-on-aarch64.patch
|
||||
|
||||
# 00270 #
|
||||
# Fix test_alpn_protocols from test_ssl as openssl > 1.1.0f
|
||||
# changed the behaviour of the ALPN hook.
|
||||
# Fixed upstream: http://bugs.python.org/issue30714
|
||||
Patch270: 00270-fix-ssl-alpn-hook-test.patch
|
||||
|
||||
# 00271 #
|
||||
# Make test_asyncio to not depend on the current signal handler
|
||||
# as this can make it hang on koji, since it ignores SIGHUP.
|
||||
# Reported upstream: http://bugs.python.org/issue31034
|
||||
Patch271: 00271-asyncio-get-default-signal-handler.patch
|
||||
|
||||
# 00272 #
|
||||
# Reject newline characters in ftplib.FTP.putline() arguments to
|
||||
# avoid FTP protocol stream injection via malicious URLs.
|
||||
# See https://bugzilla.redhat.com/show_bug.cgi?id=1478916
|
||||
# Fixed upstream: http://bugs.python.org/issue30119
|
||||
Patch272: 00272-fix-ftplib-to-reject-newlines.patch
|
||||
|
||||
# 00273 #
|
||||
# Skip test_float_with_comma, which fails in Koji with UnicodeDecodeError
|
||||
# See https://bugzilla.redhat.com/show_bug.cgi?id=1484497
|
||||
@ -395,6 +377,14 @@ Patch273: 00273-skip-float-test.patch
|
||||
# Upstream uses Debian-style architecture naming. Change to match Fedora.
|
||||
Patch274: 00274-fix-arch-names.patch
|
||||
|
||||
# 00277 #
|
||||
# Fix test_exception_errpipe_bad_data() and
|
||||
# test_exception_errpipe_normal() of test_subprocess: mock os.waitpid()
|
||||
# to avoid calling the real os.waitpid(0, 0) which is an unexpected
|
||||
# side effect of the test, which makes the koji builds hang.
|
||||
# Fixed upstream: https://github.com/python/cpython/commit/11045c9d8a21dd9bd182a3939189db02815f9783
|
||||
Patch277: 00277-fix-test-subprocess-hanging-tests.patch
|
||||
|
||||
# (New patches go here ^^^)
|
||||
#
|
||||
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
|
||||
@ -641,11 +631,9 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
|
||||
%patch264 -p1
|
||||
%endif
|
||||
|
||||
%patch270 -p1
|
||||
%patch271 -p1
|
||||
%patch272 -p1
|
||||
%patch273 -p1
|
||||
%patch274 -p1
|
||||
%patch277 -p1
|
||||
|
||||
|
||||
# Remove files that should be generated by the build
|
||||
@ -1544,6 +1532,9 @@ fi
|
||||
# ======================================================
|
||||
|
||||
%changelog
|
||||
* Fri Oct 06 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.3-1
|
||||
- Update to Python 3.6.3
|
||||
|
||||
* Fri Sep 29 2017 Miro Hrončok <mhroncok@redhat.com> - 3.6.2-19
|
||||
- Move pathfix.py to bindir, https://github.com/fedora-python/python-rpm-porting/issues/24
|
||||
- Make the -devel package require redhat-rpm-config
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (Python-3.6.2.tar.xz) = a8270a09a9e9b39f69ece6cdade2fa964665d2107b5acbad4453f1b921107b329c697c137185928fb4a576fc0f2ae2a98dbf26a8b7ea17219e990ddbc216db8b
|
||||
SHA512 (Python-3.6.3.tar.xz) = 32f24a3adcb7880003c7ecdc5e53e838e774adda76b308961d8215e28db630b2fa2828097817924c76afa4212b2df3362eb64d4e10f37c0147f512ec5aa8662b
|
||||
|
Loading…
Reference in New Issue
Block a user