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
8be884894c
commit
ac4ce3facf
|
@ -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))
|
||||
|
37
python3.spec
37
python3.spec
|
@ -124,8 +124,8 @@ Summary: Version 3 of the Python programming language aka Python 3000
|
|||
Name: python3
|
||||
# WARNING When rebasing to a new Python version,
|
||||
# remember to update the python3-docs package as well
|
||||
Version: %{pybasever}.2
|
||||
Release: 8%{?dist}
|
||||
Version: %{pybasever}.3
|
||||
Release: 1%{?dist}
|
||||
License: Python
|
||||
Group: Development/Languages
|
||||
|
||||
|
@ -164,6 +164,7 @@ BuildRequires: readline-devel
|
|||
BuildRequires: sqlite-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: libappstream-glib
|
||||
BuildRequires: gdb
|
||||
|
||||
BuildRequires: systemtap-sdt-devel
|
||||
BuildRequires: systemtap-devel
|
||||
|
@ -416,24 +417,13 @@ 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.
|
||||
# rhbz#1478916
|
||||
# Fixed upstream: http://bugs.python.org/issue30119
|
||||
Patch272: 00272-fix-ftplib-to-reject-newlines.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 ^^^)
|
||||
#
|
||||
|
@ -711,9 +701,7 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
|
|||
%patch264 -p1
|
||||
%endif
|
||||
|
||||
%patch270 -p1
|
||||
%patch271 -p1
|
||||
%patch272 -p1
|
||||
%patch277 -p1
|
||||
|
||||
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
|
||||
# are many differences between 2.6 and the Python 3 library.
|
||||
|
@ -1674,6 +1662,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-8
|
||||
- Make the -devel package require redhat-rpm-config
|
||||
Resolves: rhbz#1496757
|
||||
|
|
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