The package rpms/python3.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/python3.git/commit/?id=111d8abb6c....
Change:
-%ifarch aarch64
Thanks.
Full change:
============
commit 111d8abb6cc458d16b83d3a4bd62834a25a9fc00
Author: Charalampos Stratakis <cstratak(a)redhat.com>
Date: Thu Mar 29 16:03:33 2018 +0200
Update to 3.6.5
Rebased patches: 102, 111, 262
Removed patches due to being upstreamed:
264, 298
Update pip version to 9.0.3
diff --git a/00102-lib64.patch b/00102-lib64.patch
index 8e9ae4e..476d2ee 100644
--- a/00102-lib64.patch
+++ b/00102-lib64.patch
@@ -96,7 +96,7 @@ index f698927..bc977b5 100644
@@ -248,8 +248,8 @@ class HelperFunctionsTests(unittest.TestCase):
self.assertEqual(dirs[1], wanted)
elif os.sep == '/':
- # OS X non-framwework builds, Linux, FreeBSD, etc
+ # OS X non-framework builds, Linux, FreeBSD, etc
- self.assertEqual(len(dirs), 1)
- wanted = os.path.join('xoxo', 'lib',
+ self.assertEqual(len(dirs), 2)
diff --git a/00111-no-static-lib.patch b/00111-no-static-lib.patch
index 6929fda..bc4203d 100644
--- a/00111-no-static-lib.patch
+++ b/00111-no-static-lib.patch
@@ -1,9 +1,9 @@
diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 70e5927..04c8e3d 100644
+index 4b093e3..1088435 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -556,7 +556,7 @@ clinic: $(BUILDPYTHON) $(srcdir)/Modules/_blake2/blake2s_impl.c
- $(RUNSHARED) $(PYTHON_FOR_BUILD) ./Tools/clinic/clinic.py --make
+@@ -543,7 +543,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
+ $(PYTHON_FOR_REGEN) ./Tools/clinic/clinic.py --make
# Build the interpreter
-$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
@@ -11,7 +11,7 @@ index 70e5927..04c8e3d 100644
$(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS)
$(MODLIBS) $(SYSLIBS) $(LDLAST)
platform: $(BUILDPYTHON) pybuilddir.txt
-@@ -601,18 +601,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
+@@ -588,18 +588,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
@@ -30,7 +30,7 @@ index 70e5927..04c8e3d 100644
libpython$(LDVERSION).so: $(LIBRARY_OBJS)
if test $(INSTSONAME) != $(LDLIBRARY); then \
$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS)
$(LIBC) $(LIBM) $(LDLAST); \
-@@ -702,7 +690,7 @@ Modules/Setup: $(srcdir)/Modules/Setup.dist
+@@ -689,7 +677,7 @@ Modules/Setup: $(srcdir)/Modules/Setup.dist
echo "-----------------------------------------------"; \
fi
@@ -39,7 +39,7 @@ index 70e5927..04c8e3d 100644
$(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY)
$(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
############################################################################
-@@ -1382,18 +1370,6 @@ libainstall: all python-config
+@@ -1425,18 +1413,6 @@ libainstall: @DEF_MAKE_RULE@ python-config
else true; \
fi; \
done
diff --git a/00262-pep538_coerce_legacy_c_locale.patch
b/00262-pep538_coerce_legacy_c_locale.patch
index 026c9a4..643190c 100644
--- a/00262-pep538_coerce_legacy_c_locale.patch
+++ b/00262-pep538_coerce_legacy_c_locale.patch
@@ -542,18 +542,6 @@ diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py
index ae2bcd4..0a302ff 100644
--- a/Lib/test/test_cmd_line.py
+++ b/Lib/test/test_cmd_line.py
-@@ -9,8 +9,9 @@ import sys
- import subprocess
- import tempfile
- from test.support import script_helper, is_android
--from test.support.script_helper import (spawn_python, kill_python, assert_python_ok,
-- assert_python_failure)
-+from test.support.script_helper import (
-+ spawn_python, kill_python, assert_python_ok, assert_python_failure
-+)
-
-
- # XXX (ncoghlan): Move to script_helper and make consistent with run_python
@@ -151,6 +152,7 @@ class CmdLineTest(unittest.TestCase):
env = os.environ.copy()
# Use C locale to get ascii for the locale encoding
diff --git a/00264-skip-test-failing-on-aarch64.patch
b/00264-skip-test-failing-on-aarch64.patch
deleted file mode 100644
index edda219..0000000
--- a/00264-skip-test-failing-on-aarch64.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/Lib/ctypes/test/test_structures.py b/Lib/ctypes/test/test_structures.py
-index 3eded77..ad7859a 100644
---- a/Lib/ctypes/test/test_structures.py
-+++ b/Lib/ctypes/test/test_structures.py
-@@ -392,6 +392,7 @@ class StructureTestCase(unittest.TestCase):
- (1, 0, 0, 0, 0, 0))
- self.assertRaises(TypeError, lambda: Z(1, 2, 3, 4, 5, 6, 7))
-
-+ @unittest.skip('Fails on aarch64:
http://bugs.python.org/issue29804')
- def test_pass_by_value(self):
- # This should mirror the structure in Modules/_ctypes/_ctypes_test.c
- class X(Structure):
diff --git a/00270-fix-ssl-alpn-hook-test.patch b/00270-fix-ssl-alpn-hook-test.patch
deleted file mode 100644
index 97b433e..0000000
--- a/00270-fix-ssl-alpn-hook-test.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
-index d203cdd..c128dae 100644
---- a/Lib/test/test_ssl.py
-+++ b/Lib/test/test_ssl.py
-@@ -3256,8 +3256,9 @@ if _have_threads:
- except ssl.SSLError as e:
- stats = e
-
-- if expected is None and IS_OPENSSL_1_1:
-- # OpenSSL 1.1.0 raises handshake error
-+ if (expected is None and IS_OPENSSL_1_1
-+ and ssl.OPENSSL_VERSION_INFO < (1, 1, 0, 6)):
-+ # OpenSSL 1.1.0 to 1.1.0e raises handshake error
- self.assertIsInstance(stats, ssl.SSLError)
- else:
- msg = "failed trying %s (s) and %s (c).\n" \
diff --git a/00271-asyncio-get-default-signal-handler.patch
b/00271-asyncio-get-default-signal-handler.patch
deleted file mode 100644
index 8b1bf77..0000000
--- a/00271-asyncio-get-default-signal-handler.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
-index 492a84a2313..9746678607c 100644
---- a/Lib/test/test_asyncio/test_events.py
-+++ b/Lib/test/test_asyncio/test_events.py
-@@ -1980,19 +1980,26 @@ def test_subprocess_terminate(self):
-
- @unittest.skipIf(sys.platform == 'win32', "Don't have
SIGHUP")
- def test_subprocess_send_signal(self):
-- prog = os.path.join(os.path.dirname(__file__), 'echo.py')
--
-- connect = self.loop.subprocess_exec(
-- functools.partial(MySubprocessProtocol, self.loop),
-- sys.executable, prog)
-- transp, proto = self.loop.run_until_complete(connect)
-- self.assertIsInstance(proto, MySubprocessProtocol)
-- self.loop.run_until_complete(proto.connected)
--
-- transp.send_signal(signal.SIGHUP)
-- self.loop.run_until_complete(proto.completed)
-- self.assertEqual(-signal.SIGHUP, proto.returncode)
-- transp.close()
-+ # bpo-31034: Make sure that we get the default signal handler (killing
-+ # the process). The parent process may have decided to ignore SIGHUP,
-+ # and signal handlers are inherited.
-+ old_handler = signal.signal(signal.SIGHUP, signal.SIG_DFL)
-+ try:
-+ prog = os.path.join(os.path.dirname(__file__), 'echo.py')
-+
-+ connect = self.loop.subprocess_exec(
-+ functools.partial(MySubprocessProtocol, self.loop),
-+ sys.executable, prog)
-+ transp, proto = self.loop.run_until_complete(connect)
-+ self.assertIsInstance(proto, MySubprocessProtocol)
-+ self.loop.run_until_complete(proto.connected)
-+
-+ transp.send_signal(signal.SIGHUP)
-+ self.loop.run_until_complete(proto.completed)
-+ self.assertEqual(-signal.SIGHUP, proto.returncode)
-+ transp.close()
-+ finally:
-+ signal.signal(signal.SIGHUP, old_handler)
-
- def test_subprocess_stderr(self):
- prog = os.path.join(os.path.dirname(__file__), 'echo2.py')
-diff --git a/Lib/test/test_asyncio/test_subprocess.py
b/Lib/test/test_asyncio/test_subprocess.py
-index 2e14a8a9735..e8822c36698 100644
---- a/Lib/test/test_asyncio/test_subprocess.py
-+++ b/Lib/test/test_asyncio/test_subprocess.py
-@@ -166,25 +166,32 @@ def test_terminate(self):
-
- @unittest.skipIf(sys.platform == 'win32', "Don't have
SIGHUP")
- def test_send_signal(self):
-- code = 'import time; print("sleeping", flush=True);
time.sleep(3600)'
-- args = [sys.executable, '-c', code]
-- create = asyncio.create_subprocess_exec(*args,
-- stdout=subprocess.PIPE,
-- loop=self.loop)
-- proc = self.loop.run_until_complete(create)
--
-- @asyncio.coroutine
-- def send_signal(proc):
-- # basic synchronization to wait until the program is sleeping
-- line = yield from proc.stdout.readline()
-- self.assertEqual(line, b'sleeping\n')
-+ # bpo-31034: Make sure that we get the default signal handler (killing
-+ # the process). The parent process may have decided to ignore SIGHUP,
-+ # and signal handlers are inherited.
-+ old_handler = signal.signal(signal.SIGHUP, signal.SIG_DFL)
-+ try:
-+ code = 'import time; print("sleeping", flush=True);
time.sleep(3600)'
-+ args = [sys.executable, '-c', code]
-+ create = asyncio.create_subprocess_exec(*args,
-+ stdout=subprocess.PIPE,
-+ loop=self.loop)
-+ proc = self.loop.run_until_complete(create)
-
-- proc.send_signal(signal.SIGHUP)
-- returncode = (yield from proc.wait())
-- return returncode
--
-- returncode = self.loop.run_until_complete(send_signal(proc))
-- self.assertEqual(-signal.SIGHUP, returncode)
-+ @asyncio.coroutine
-+ def send_signal(proc):
-+ # basic synchronization to wait until the program is sleeping
-+ line = yield from proc.stdout.readline()
-+ self.assertEqual(line, b'sleeping\n')
-+
-+ proc.send_signal(signal.SIGHUP)
-+ returncode = (yield from proc.wait())
-+ return returncode
-+
-+ returncode = self.loop.run_until_complete(send_signal(proc))
-+ self.assertEqual(-signal.SIGHUP, returncode)
-+ finally:
-+ signal.signal(signal.SIGHUP, old_handler)
-
- def prepare_broken_pipe_test(self):
- # buffer large enough to feed the whole pipe buffer
diff --git a/00272-fix-ftplib-to-reject-newlines.patch
b/00272-fix-ftplib-to-reject-newlines.patch
deleted file mode 100644
index 66486a8..0000000
--- a/00272-fix-ftplib-to-reject-newlines.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 8c2d4cf092c5f0335e7982392a33927579c4d512 Mon Sep 17 00:00:00 2001
-From: Dong-hee Na <donghee.na92(a)gmail.com>
-Date: Wed, 26 Jul 2017 21:11:25 +0900
-Subject: [PATCH] [3.6] bpo-30119: fix ftplib.FTP.putline() to throw an error
- for a illegal command (#1214) (#2886)
-
----
- Lib/ftplib.py | 2 ++
- Lib/test/test_ftplib.py | 6 +++++-
- Misc/NEWS.d/next/Library/2017-07-26-15-15-00.bpo-30119.DZ6C_S.rst | 2 ++
- 3 files changed, 9 insertions(+), 1 deletion(-)
- create mode 100644 Misc/NEWS.d/next/Library/2017-07-26-15-15-00.bpo-30119.DZ6C_S.rst
-
-diff --git a/Lib/ftplib.py b/Lib/ftplib.py
-index 8f36f537e8a..a02e595cb02 100644
---- a/Lib/ftplib.py
-+++ b/Lib/ftplib.py
-@@ -186,6 +186,8 @@ def sanitize(self, s):
-
- # Internal: send one line to the server, appending CRLF
- def putline(self, line):
-+ if '\r' in line or '\n' in line:
-+ raise ValueError('an illegal newline character should not be
contained')
- line = line + CRLF
- if self.debugging > 1:
- print('*put*', self.sanitize(line))
-diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
-index 12fabc5e8be..a561e9efa03 100644
---- a/Lib/test/test_ftplib.py
-+++ b/Lib/test/test_ftplib.py
-@@ -484,6 +484,9 @@ def test_sanitize(self):
- self.assertEqual(self.client.sanitize('PASS 12345'), repr('PASS
*****'))
-
- def test_exceptions(self):
-+ self.assertRaises(ValueError, self.client.sendcmd, 'echo 40\r\n0')
-+ self.assertRaises(ValueError, self.client.sendcmd, 'echo 40\n0')
-+ self.assertRaises(ValueError, self.client.sendcmd, 'echo 40\r0')
- self.assertRaises(ftplib.error_temp, self.client.sendcmd, 'echo 400')
- self.assertRaises(ftplib.error_temp, self.client.sendcmd, 'echo 499')
- self.assertRaises(ftplib.error_perm, self.client.sendcmd, 'echo 500')
-@@ -492,7 +495,8 @@ def test_exceptions(self):
-
- def test_all_errors(self):
- exceptions = (ftplib.error_reply, ftplib.error_temp, ftplib.error_perm,
-- ftplib.error_proto, ftplib.Error, OSError, EOFError)
-+ ftplib.error_proto, ftplib.Error, OSError,
-+ EOFError)
- for x in exceptions:
- try:
- raise x('exception not included in all_errors set')
-diff --git a/Misc/NEWS.d/next/Library/2017-07-26-15-15-00.bpo-30119.DZ6C_S.rst
b/Misc/NEWS.d/next/Library/2017-07-26-15-15-00.bpo-30119.DZ6C_S.rst
-new file mode 100644
-index 00000000000..a37d3703842
---- /dev/null
-+++ b/Misc/NEWS.d/next/Library/2017-07-26-15-15-00.bpo-30119.DZ6C_S.rst
-@@ -0,0 +1,2 @@
-+ftplib.FTP.putline() now throws ValueError on commands that contains CR or
-+LF. Patch by Dong-hee Na.
diff --git a/00277-fix-test-subprocess-hanging-tests.patch
b/00277-fix-test-subprocess-hanging-tests.patch
deleted file mode 100644
index c9b54e2..0000000
--- a/00277-fix-test-subprocess-hanging-tests.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 54849962eacc38f4e6c6f8a72ae258b3e7c2ecd5 Mon Sep 17 00:00:00 2001
-From: Victor Stinner <victor.stinner(a)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))
-
diff --git a/00279-fix-memory-corruption-due-to-allocator-mix.patch
b/00279-fix-memory-corruption-due-to-allocator-mix.patch
deleted file mode 100644
index 4937391..0000000
--- a/00279-fix-memory-corruption-due-to-allocator-mix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/Modules/getpath.c b/Modules/getpath.c
-index c4055be..1258fcd 100644
---- a/Modules/getpath.c
-+++ b/Modules/getpath.c
-@@ -735,7 +735,7 @@ calculate_path(void)
- bufsz += wcslen(zip_path) + 1;
- bufsz += wcslen(exec_prefix) + 1;
-
-- buf = PyMem_New(wchar_t, bufsz);
-+ buf = PyMem_RawMalloc(bufsz * sizeof(wchar_t));
- if (buf == NULL) {
- Py_FatalError(
- "Not enough memory for dynamic PYTHONPATH");
diff --git a/00298-do-not-send-IP-in-SNI-TLS-extension.patch
b/00298-do-not-send-IP-in-SNI-TLS-extension.patch
deleted file mode 100644
index 19b6b31..0000000
--- a/00298-do-not-send-IP-in-SNI-TLS-extension.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff --git a/Modules/_ssl.c b/Modules/_ssl.c
-index df8c6a7d96d8..e8cffef14de0 100644
---- a/Modules/_ssl.c
-+++ b/Modules/_ssl.c
-@@ -55,6 +55,11 @@ static PySocketModule_APIObject PySocketModule;
- #include <sys/poll.h>
- #endif
-
-+#ifndef MS_WINDOWS
-+/* inet_pton */
-+#include <arpa/inet.h>
-+#endif
-+
- /* Don't warn about deprecated functions */
- #ifdef __GNUC__
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-@@ -667,8 +672,41 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock,
- SSL_set_mode(self->ssl, mode);
-
- #if HAVE_SNI
-- if (server_hostname != NULL)
-- SSL_set_tlsext_host_name(self->ssl, server_hostname);
-+ if (server_hostname != NULL) {
-+/* Don't send SNI for IP addresses. We cannot simply use inet_aton() and
-+ * inet_pton() here. inet_aton() may be linked weakly and inet_pton() isn't
-+ * available on all platforms. Use OpenSSL's IP address parser. It's
-+ * available since 1.0.2 and LibreSSL since at least 2.3.0. */
-+ int send_sni = 1;
-+#if OPENSSL_VERSION_NUMBER >= 0x10200000L
-+ ASN1_OCTET_STRING *ip = a2i_IPADDRESS(server_hostname);
-+ if (ip == NULL) {
-+ send_sni = 1;
-+ ERR_clear_error();
-+ } else {
-+ send_sni = 0;
-+ ASN1_OCTET_STRING_free(ip);
-+ }
-+#elif defined(HAVE_INET_PTON)
-+#ifdef ENABLE_IPV6
-+ char packed[Py_MAX(sizeof(struct in_addr), sizeof(struct in6_addr))];
-+#else
-+ char packed[sizeof(struct in_addr)];
-+#endif /* ENABLE_IPV6 */
-+ if (inet_pton(AF_INET, server_hostname, packed)) {
-+ send_sni = 0;
-+#ifdef ENABLE_IPV6
-+ } else if(inet_pton(AF_INET6, server_hostname, packed)) {
-+ send_sni = 0;
-+#endif /* ENABLE_IPV6 */
-+ } else {
-+ send_sni = 1;
-+ }
-+#endif /* HAVE_INET_PTON */
-+ if (send_sni) {
-+ SSL_set_tlsext_host_name(self->ssl, server_hostname);
-+ }
-+ }
- #endif
-
- /* If the socket is in non-blocking mode or timeout mode, set the BIO
diff --git a/python3.spec b/python3.spec
index e106dd5..45006f9 100644
--- a/python3.spec
+++ b/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}.4
-Release: 6%{?dist}
+Version: %{pybasever}.5
+Release: 1%{?dist}
License: Python
Group: Development/Languages
@@ -410,25 +410,12 @@ Patch243: 00243-fix-mips64-triplet.patch
# Original proposal:
https://bugzilla.redhat.com/show_bug.cgi?id=1404918
Patch262: 00262-pep538_coerce_legacy_c_locale.patch
-# 00264 #
-# test_pass_by_value was added in Python 3.6.1 and on aarch64
-# it is catching an error that was there, but wasn't tested before.
-# Therefore skipping the test on aarch64 until fixed upstream.
-# Reported upstream:
http://bugs.python.org/issue29804
-Patch264: 00264-skip-test-failing-on-aarch64.patch
-
# 00292 #
# Restore the public PyExc_RecursionErrorInst symbol that was removed
# from the 3.6.4 release upstream.
# Reported upstream:
https://bugs.python.org/issue30697
Patch292: 00292-restore-PyExc_RecursionErrorInst-symbol.patch
-# 00298 #
-# The SSL module no longer sends IP addresses in SNI TLS extension on
-# platforms with OpenSSL 1.0.2+ or inet_pton.
-# Fixed upstream:
https://bugs.python.org/issue32185
-Patch298: 00298-do-not-send-IP-in-SNI-TLS-extension.patch
-
# 00301 #
# Tools/scripts/pathfix.py: Add -n option for no backup~
# See:
https://bugzilla.redhat.com/show_bug.cgi?id=1546990
@@ -667,7 +654,7 @@ rm -r Modules/zlib || exit 1
#done
%if 0%{with_rewheel}
-%global pip_version 9.0.1
+%global pip_version 9.0.3
sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION =
"%{pip_version}"'/ Lib/ensurepip/__init__.py
%endif
@@ -706,13 +693,7 @@ sed -r -i s/'_PIP_VERSION =
"[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch206 -p1
%patch243 -p1
%patch262 -p1
-
-%ifarch aarch64
-%patch264 -p1
-%endif
-
%patch292 -p1
-%patch298 -p1
%patch301 -p1
# Currently (2010-01-15),
http://docs.python.org/library is for 2.6, and there
@@ -1675,6 +1656,9 @@ fi
# ======================================================
%changelog
+* Thu Mar 29 2018 Charalampos Stratakis <cstratak(a)redhat.com> - 3.6.5-1
+- Update to 3.6.5
+
* Sat Mar 24 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.6.4-6
- Fix broken macro invocation and broken building of C Python extensions
Resolves: rhbz#1560103
diff --git a/sources b/sources
index 6b5ff13..9d32274 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (Python-3.6.4.tar.xz) =
09ba2103ac517ac4d262f00380c9aac836a53401ce252540c17fd821a3b92e1ddf32528d00772221eb3126b12cb95b62c3ac3e852f4951e6f2eb406c88c848a2
+SHA512 (Python-3.6.5.tar.xz) =
6b26fcd296b9bd8e67861eff10d14db7507711ddba947288d16d6def53135c39326b7f969c04bb2b2993f924d9e7ad3f5c5282a3915760bc0885cf0a8ea5eb51
commit 8e08331a37badd9e95e667ced3cb6649e580df84
Author: Miro Hrončok <miro(a)hroncok.cz>
Date: Sun Mar 25 20:49:54 2018 +0200
Fix shebangs of the GDB hooks
Also, use -p (preserve timestamp) and -n (don't create backup files)
with pathfix.py.
Resolves
https://bugzilla.redhat.com/show_bug.cgi?id=1560295
diff --git a/python3.spec b/python3.spec
index e552011..e106dd5 100644
--- a/python3.spec
+++ b/python3.spec
@@ -988,8 +988,9 @@ sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/"
\
# Switch all shebangs to refer to the specific Python version.
LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
Tools/scripts/pathfix.py \
- -i "%{_bindir}/python%{pybasever}" \
- %{buildroot}
+ -i "%{_bindir}/python%{pybasever}" -pn \
+ %{buildroot} \
+ %{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py}
# Remove shebang lines from .py files that aren't executable, and
# remove executability from .py files that don't have a shebang line:
commit d647195bcb7d46595cc3a016a5d90f1572a6091a
Author: Miro Hrončok <miro(a)hroncok.cz>
Date: Sat Mar 24 08:06:56 2018 +0100
rpmlintrc: Filter macro-in-comment %{_pyconfig(32|64)_h}
diff --git a/python3.rpmlintrc b/python3.rpmlintrc
index bf8a300..6d570c0 100644
--- a/python3.rpmlintrc
+++ b/python3.rpmlintrc
@@ -57,6 +57,8 @@ addFilter(r'python3\d?-debug.[^:]+: (E|W):
(non-)?devel-file-in-(non-)?devel-pac
addFilter(r'dangling-relative-symlink /usr/lib(64)?/pkgconfig/python-3\.\ddm\.pc
python-3\.\d\.pc')
addFilter(r'read-error /usr/lib(64)?/pkgconfig/python-3\.\ddm\.pc \[Errno 2\]')
+# we need this macro to evaluate, even if the line starts with #
+addFilter(r'macro-in-comment %\{_pyconfig(32|64)_h\}')
# SPELLING ERRORS
addFilter(r'spelling-error .* en_US (bytecode|pyc|filename|tkinter|namespaces|pytest)
')
commit e99f00f29dccae7236516681d347349f1f3b7c5f
Author: Miro Hrončok <miro(a)hroncok.cz>
Date: Sat Mar 24 08:02:08 2018 +0100
Fix broken macro invocation and broken building of C Python extensions
Revert "Use %% for actual % in spec"
This reverts commit 90512a5a1b6bb4e54449a0e3611482e6a55a8ab3.
Resolves
https://bugzilla.redhat.com/show_bug.cgi?id=1560103
diff --git a/python3.spec b/python3.spec
index e58da4e..e552011 100644
--- a/python3.spec
+++ b/python3.spec
@@ -125,7 +125,7 @@ Name: python3
# WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well
Version: %{pybasever}.4
-Release: 5%{?dist}
+Release: 6%{?dist}
License: Python
Group: Development/Languages
@@ -965,9 +965,9 @@ for PyIncludeDir in %{PyIncludeDirs} ; do
#include <bits/wordsize.h>
#if __WORDSIZE == 32
-#include "%%{_pyconfig32_h}"
+#include "%{_pyconfig32_h}"
#elif __WORDSIZE == 64
-#include "%%{_pyconfig64_h}"
+#include "%{_pyconfig64_h}"
#else
#error "Unknown word size"
#endif
@@ -1674,6 +1674,10 @@ fi
# ======================================================
%changelog
+* Sat Mar 24 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.6.4-6
+- Fix broken macro invocation and broken building of C Python extensions
+Resolves: rhbz#1560103
+
* Fri Mar 16 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.6.4-5
- Add -n option for pathfix.py
Resolves: rhbz#1546990
commit 66a03df0632928f51933df4dc4279eaaf093049a
Author: Miro Hrončok <miro(a)hroncok.cz>
Date: Wed Mar 14 14:15:23 2018 +0100
rpmlintrc: Do not filter library-without-ldconfig-post on F < 28
diff --git a/python3.rpmlintrc b/python3.rpmlintrc
index 2c6e93d..bf8a300 100644
--- a/python3.rpmlintrc
+++ b/python3.rpmlintrc
@@ -50,9 +50,6 @@ addFilter(r'^python3\d?-debugsource\.[^:]+: (E|W):
no-documentation')
# debuginfo
addFilter(r'^python3\d?-debuginfo\.[^:]+: (E|W): useless-provides
debuginfo\(build-id\)')
-# this is OK for F28+
-addFilter(r'library-without-ldconfig-post')
-
# debug package contains devel and non-devel files
addFilter(r'python3\d?-debug.[^:]+: (E|W):
(non-)?devel-file-in-(non-)?devel-package')
commit 9518239d87ff61d71dab5ca0e40de1bef3007c62
Author: Miro Hrončok <miro(a)hroncok.cz>
Date: Thu Mar 1 15:21:59 2018 +0100
Add rpmlintrc file
Filter all the errors and warnings. This allows us to actually read the rpmlint
output to get new information. From now on, we can rely on this information
when pushing updates.
Resolves
https://bugzilla.redhat.com/show_bug.cgi?id=1548683
Backport of
https://src.fedoraproject.org/rpms/python37/pull-request/10
diff --git a/python3.rpmlintrc b/python3.rpmlintrc
new file mode 100644
index 0000000..2c6e93d
--- /dev/null
+++ b/python3.rpmlintrc
@@ -0,0 +1,65 @@
+# KNOWN BUGS:
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1489816
+addFilter(r'crypto-policy-non-compliance-openssl')
+
+
+# TESTS:
+addFilter(r'(zero-length|pem-certificate|uncompressed-zip)
/usr/lib(64)?/python3.\d/test')
+
+
+# OTHER DELIBERATES:
+# chroot function
+addFilter(r'missing-call-to-chdir-with-chroot')
+
+# intentionally unversioned and selfobsoleted
+addFilter(r'unversioned-explicit-obsoletes python')
+addFilter(r'self-obsoletion python3\d obsoletes python3\d')
+
+# intentionally hardcoded
+addFilter(r'hardcoded-library-path in
%{_prefix}/lib/(debug/%{_libdir}|python%{pybasever})')
+
+# we have non binary stuff, python files
+addFilter(r'only-non-binary-in-usr-lib')
+
+# some devel files that are deliberately needed
+addFilter(r'devel-file-in-non-devel-package
/usr/include/python3\.\dm/pyconfig-(32|64)\.h')
+addFilter(r'devel-file-in-non-devel-package
/usr/lib64/python3\.\d/distutils/tests/xxmodule\.c')
+
+
+# SORRY, NOT SORRY:
+# manual pages
+addFilter(r'no-manual-page-for-binary
(idle|pydoc|pyvenv|2to3|python3-debug|pathfix\.py)')
+addFilter(r'no-manual-page-for-binary python3.*-config$')
+addFilter(r'no-manual-page-for-binary python3.\dd?m$')
+
+# missing documentation from subpackages
+addFilter(r'^python3\d?-(debug|tkinter|test|idle)\.[^:]+: (E|W):
no-documentation')
+
+# platform python is obsoleted, but not provided
+addFilter(r'obsolete-not-provided platform-python')
+
+
+# RPMLINT IMPERFECTIONS:
+# ifarch applied patches are OK
+#
https://fedoraproject.org/wiki/Packaging:Guidelines#Architecture_Support
+addFilter(r'%ifarch-applied-patch')
+
+# debugsource
+addFilter(r'^python3\d?-debugsource\.[^:]+: (E|W): no-documentation')
+
+# debuginfo
+addFilter(r'^python3\d?-debuginfo\.[^:]+: (E|W): useless-provides
debuginfo\(build-id\)')
+
+# this is OK for F28+
+addFilter(r'library-without-ldconfig-post')
+
+# debug package contains devel and non-devel files
+addFilter(r'python3\d?-debug.[^:]+: (E|W):
(non-)?devel-file-in-(non-)?devel-package')
+
+# this goes to other subpackage, hence not actually dangling, the read error is bogus
+addFilter(r'dangling-relative-symlink /usr/lib(64)?/pkgconfig/python-3\.\ddm\.pc
python-3\.\d\.pc')
+addFilter(r'read-error /usr/lib(64)?/pkgconfig/python-3\.\ddm\.pc \[Errno 2\]')
+
+
+# SPELLING ERRORS
+addFilter(r'spelling-error .* en_US (bytecode|pyc|filename|tkinter|namespaces|pytest)
')
commit 8b019d678ba35cb252dc18b9abea016cbd272f1f
Author: Miro Hrončok <miro(a)hroncok.cz>
Date: Thu Mar 1 15:19:51 2018 +0100
Use %% for actual % in spec
rpmlint reports this as macro in comment, however it was left here, because it
is not macro and not comment. On the other hand, % shall be escaped using %%.
All this needs to blow is somebody defining a macro called _pyconfig64_h.
diff --git a/python3.spec b/python3.spec
index b14d948..e58da4e 100644
--- a/python3.spec
+++ b/python3.spec
@@ -965,9 +965,9 @@ for PyIncludeDir in %{PyIncludeDirs} ; do
#include <bits/wordsize.h>
#if __WORDSIZE == 32
-#include "%{_pyconfig32_h}"
+#include "%%{_pyconfig32_h}"
#elif __WORDSIZE == 64
-#include "%{_pyconfig64_h}"
+#include "%%{_pyconfig64_h}"
#else
#error "Unknown word size"
#endif
commit f21dd01d2a2ec54ca035704252b97c75125c31d0
Author: Miro Hrončok <miro(a)hroncok.cz>
Date: Wed Mar 14 22:05:06 2018 +0100
Add -n option for pathfix.py (#1546990)
diff --git a/00301-pathfix-add-n-option-for-no-backup.patch
b/00301-pathfix-add-n-option-for-no-backup.patch
new file mode 100644
index 0000000..350fe97
--- /dev/null
+++ b/00301-pathfix-add-n-option-for-no-backup.patch
@@ -0,0 +1,104 @@
+From 5affd5c29eb1493cb31ef3cfdde15538ac134689 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz>
+Date: Tue, 13 Mar 2018 10:56:43 +0100
+Subject: [PATCH] bpo-32885: Tools/scripts/pathfix.py: Add -n option for no
+ backup~ (#5772)
+
+Creating backup files with ~ suffix can be undesirable in some environment,
+such as when building RPM packages. Instead of requiring the user to remove
+those files manually, option -n was added, that simply disables this feature.
+
+-n was selected because 2to3 has the same option with this behavior.
+---
+ Misc/ACKS | 1 +
+ .../2018-02-20-12-16-47.bpo-32885.dL5x7C.rst | 2 ++
+ Tools/scripts/pathfix.py | 28 +++++++++++++++-------
+ 3 files changed, 23 insertions(+), 8 deletions(-)
+ create mode 100644
Misc/NEWS.d/next/Tools-Demos/2018-02-20-12-16-47.bpo-32885.dL5x7C.rst
+
+diff --git a/Misc/ACKS b/Misc/ACKS
+index d8179c8b03ab..d752d8a35434 100644
+--- a/Misc/ACKS
++++ b/Misc/ACKS
+@@ -687,6 +687,7 @@ Ken Howard
+ Brad Howes
+ Mike Hoy
+ Ben Hoyt
++Miro Hrončok
+ Chiu-Hsiang Hsu
+ Chih-Hao Huang
+ Christian Hudon
+diff --git a/Misc/NEWS.d/next/Tools-Demos/2018-02-20-12-16-47.bpo-32885.dL5x7C.rst
b/Misc/NEWS.d/next/Tools-Demos/2018-02-20-12-16-47.bpo-32885.dL5x7C.rst
+new file mode 100644
+index 000000000000..e003e1d84fd0
+--- /dev/null
++++ b/Misc/NEWS.d/next/Tools-Demos/2018-02-20-12-16-47.bpo-32885.dL5x7C.rst
+@@ -0,0 +1,2 @@
++Add an ``-n`` flag for ``Tools/scripts/pathfix.py`` to disbale automatic
++backup creation (files with ``~`` suffix).
+diff --git a/Tools/scripts/pathfix.py b/Tools/scripts/pathfix.py
+index 562bbc737812..c5bf984306a3 100755
+--- a/Tools/scripts/pathfix.py
++++ b/Tools/scripts/pathfix.py
+@@ -7,8 +7,9 @@
+ # Directories are searched recursively for files whose name looks
+ # like a python module.
+ # Symbolic links are always ignored (except as explicit directory
+-# arguments). Of course, the original file is kept as a back-up
+-# (with a "~" attached to its name).
++# arguments).
++# The original file is kept as a back-up (with a "~" attached to its name),
++# -n flag can be used to disable this.
+ #
+ # Undoubtedly you can do this using find and sed or perl, but this is
+ # a nice example of Python code that recurses down a directory tree
+@@ -31,14 +32,17 @@
+
+ new_interpreter = None
+ preserve_timestamps = False
++create_backup = True
++
+
+ def main():
+ global new_interpreter
+ global preserve_timestamps
+- usage = ('usage: %s -i /interpreter -p file-or-directory ...\n' %
++ global create_backup
++ usage = ('usage: %s -i /interpreter -p -n file-or-directory ...\n' %
+ sys.argv[0])
+ try:
+- opts, args = getopt.getopt(sys.argv[1:], 'i:p')
++ opts, args = getopt.getopt(sys.argv[1:], 'i:pn')
+ except getopt.error as msg:
+ err(str(msg) + '\n')
+ err(usage)
+@@ -48,6 +52,8 @@ def main():
+ new_interpreter = a.encode()
+ if o == '-p':
+ preserve_timestamps = True
++ if o == '-n':
++ create_backup = False
+ if not new_interpreter or not new_interpreter.startswith(b'/') or \
+ not args:
+ err('-i option or file-or-directory missing\n')
+@@ -134,10 +140,16 @@ def fix(filename):
+ except OSError as msg:
+ err('%s: warning: chmod failed (%r)\n' % (tempname, msg))
+ # Then make a backup of the original file as filename~
+- try:
+- os.rename(filename, filename + '~')
+- except OSError as msg:
+- err('%s: warning: backup failed (%r)\n' % (filename, msg))
++ if create_backup:
++ try:
++ os.rename(filename, filename + '~')
++ except OSError as msg:
++ err('%s: warning: backup failed (%r)\n' % (filename, msg))
++ else:
++ try:
++ os.remove(filename)
++ except OSError as msg:
++ err('%s: warning: removing failed (%r)\n' % (filename, msg))
+ # Now move the temp file to the original file
+ try:
+ os.rename(tempname, filename)
diff --git a/python3.spec b/python3.spec
index 60fc5fb..b14d948 100644
--- a/python3.spec
+++ b/python3.spec
@@ -125,7 +125,7 @@ Name: python3
# WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well
Version: %{pybasever}.4
-Release: 4%{?dist}
+Release: 5%{?dist}
License: Python
Group: Development/Languages
@@ -429,6 +429,12 @@ Patch292: 00292-restore-PyExc_RecursionErrorInst-symbol.patch
# Fixed upstream:
https://bugs.python.org/issue32185
Patch298: 00298-do-not-send-IP-in-SNI-TLS-extension.patch
+# 00301 #
+# Tools/scripts/pathfix.py: Add -n option for no backup~
+# See:
https://bugzilla.redhat.com/show_bug.cgi?id=1546990
+# Fixed upstream:
https://bugs.python.org/issue32885
+Patch301: 00301-pathfix-add-n-option-for-no-backup.patch
+
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL,
etc.,
@@ -707,6 +713,7 @@ sed -r -i s/'_PIP_VERSION =
"[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch292 -p1
%patch298 -p1
+%patch301 -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.
@@ -1667,6 +1674,10 @@ fi
# ======================================================
%changelog
+* Fri Mar 16 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.6.4-5
+- Add -n option for pathfix.py
+Resolves: rhbz#1546990
+
* Thu Mar 15 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.6.4-4
- Fix the py_byte_compile macro to work on Python 2
- Remove the pybytecompile macro file from the flat package
commit 58a18acd4db584fa90cd0fca7e22be2b0461a1b3
Author: Miro Hrončok <miro(a)hroncok.cz>
Date: Thu Jan 18 16:53:05 2018 +0100
Fix the py_byte_compile macro to work on Python 2
See
https://bugzilla.redhat.com/show_bug.cgi?id=1484993
Inspired by Terje Røsten's workaround from that bugzilla
diff --git a/macros.pybytecompile3.6 b/macros.pybytecompile3.6
index 3968c6e..f319979 100644
--- a/macros.pybytecompile3.6
+++ b/macros.pybytecompile3.6
@@ -3,8 +3,23 @@
# Python's compile_all module only works on directories, and requires a max
# recursion depth
+# Note that the py_byte_compile macro should work for python2 as well
+# Which unfortunately makes the definition more complicated than it should be
+# The condition should be reversed once /usr/bin/python is python3!
+
%py_byte_compile()\
-python_binary="%1"\
-bytecode_compilation_path="%2"\
-find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0
$python_binary -O -c 'import py_compile, sys; [py_compile.compile(f,
dfile=f.partition("$RPM_BUILD_ROOT")[2], optimize=opt) for opt in range(2) for f
in sys.argv[1:]]' || :\
+py2_byte_compile () {\
+ python_binary="%1"\
+ bytecode_compilation_path="%2"\
+ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0
$python_binary -c 'import py_compile, sys; [py_compile.compile(f,
dfile=f.partition("$RPM_BUILD_ROOT")[2]) for f in sys.argv[1:]]' || :\
+ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0
$python_binary -O -c 'import py_compile, sys; [py_compile.compile(f,
dfile=f.partition("$RPM_BUILD_ROOT")[2]) for f in sys.argv[1:]]' || :\
+}\
+\
+py3_byte_compile () {\
+ python_binary="%1"\
+ bytecode_compilation_path="%2"\
+ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0
$python_binary -O -c 'import py_compile, sys; [py_compile.compile(f,
dfile=f.partition("$RPM_BUILD_ROOT")[2], optimize=opt) for opt in range(2) for f
in sys.argv[1:]]' || :\
+}\
+\
+[[ "%1" == *python3* ]] || py2_byte_compile "%1" "%2"
&& py3_byte_compile "%1" "%2" \
%{nil}
diff --git a/python3.spec b/python3.spec
index 26a5fdb..60fc5fb 100644
--- a/python3.spec
+++ b/python3.spec
@@ -125,7 +125,7 @@ Name: python3
# WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well
Version: %{pybasever}.4
-Release: 3%{?dist}
+Release: 4%{?dist}
License: Python
Group: Development/Languages
@@ -1667,6 +1667,11 @@ fi
# ======================================================
%changelog
+* Thu Mar 15 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.6.4-4
+- Fix the py_byte_compile macro to work on Python 2
+- Remove the pybytecompile macro file from the flat package
+Resolves: rhbz#1484993
+
* Tue Mar 13 2018 Charalampos Stratakis <cstratak(a)redhat.com> - 3.6.4-3
- Do not send IP addresses in SNI TLS extension