Update to version 3.6.4

Rebased patches: 189, 262

Dropped patches due to being upstreamed: 277, 279
This commit is contained in:
Charalampos Stratakis 2018-01-15 15:51:08 +01:00
parent 6e6da4af17
commit f15b8971d4
4 changed files with 34 additions and 85 deletions

View File

@ -1,6 +1,7 @@
diff -Nur Python-3.4.1/Lib/ensurepip/__init__.py Python-3.4.1-rewheel/Lib/ensurepip/__init__.py
--- Python-3.4.1/Lib/ensurepip/__init__.py 2014-08-21 10:49:30.792695824 +0200
+++ Python-3.4.1-rewheel/Lib/ensurepip/__init__.py 2014-08-21 10:10:41.958341726 +0200
diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
index d69e09f..5cb12df 100644
--- a/Lib/ensurepip/__init__.py
+++ b/Lib/ensurepip/__init__.py
@@ -1,8 +1,10 @@
import os
import os.path
@ -12,16 +13,16 @@ diff -Nur Python-3.4.1/Lib/ensurepip/__init__.py Python-3.4.1-rewheel/Lib/ensure
__all__ = ["version", "bootstrap"]
@@ -38,6 +40,8 @@
@@ -25,6 +27,8 @@ def _run_pip(args, additional_paths=None):
# Install the bundled software
import pip
+ if args[0] in ["install", "list", "wheel"]:
+ args.append('--pre')
pip.main(args)
return pip.main(args)
@@ -87,20 +91,39 @@
@@ -88,20 +92,39 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
# omit pip and easy_install
os.environ["ENSUREPIP_OPTIONS"] = "install"
@ -72,8 +73,8 @@ diff -Nur Python-3.4.1/Lib/ensurepip/__init__.py Python-3.4.1-rewheel/Lib/ensure
# Construct the arguments to be passed to the pip command
args = ["install", "--no-index", "--find-links", tmpdir]
diff -Nur Python-3.4.1/Lib/ensurepip/rewheel/__init__.py Python-3.4.1-rewheel/Lib/ensurepip/rewheel/__init__.py
--- Python-3.4.1/Lib/ensurepip/rewheel/__init__.py 1970-01-01 01:00:00.000000000 +0100
+++ Python-3.4.1-rewheel/Lib/ensurepip/rewheel/__init__.py 2014-08-21 10:11:22.560320121 +0200
--- Python-3.4.1/Lib/ensurepip/rewheel/__init__.py 1970-01-01 01:00:00.000000000 +0100
+++ Python-3.4.1-rewheel/Lib/ensurepip/rewheel/__init__.py 2014-08-21 10:11:22.560320121 +0200
@@ -0,0 +1,143 @@
+import argparse
+import codecs
@ -219,8 +220,8 @@ diff -Nur Python-3.4.1/Lib/ensurepip/rewheel/__init__.py Python-3.4.1-rewheel/Li
+ pass # bad RECORD or empty line
+ return to_write, to_omit
diff -Nur Python-3.4.1/Makefile.pre.in Python-3.4.1-rewheel/Makefile.pre.in
--- Python-3.4.1/Makefile.pre.in 2014-08-21 10:49:31.512695040 +0200
+++ Python-3.4.1-rewheel/Makefile.pre.in 2014-08-21 10:10:41.961341722 +0200
--- Python-3.4.1/Makefile.pre.in 2014-08-21 10:49:31.512695040 +0200
+++ Python-3.4.1-rewheel/Makefile.pre.in 2014-08-21 10:10:41.961341722 +0200
@@ -1145,7 +1145,7 @@
test/test_asyncio \
collections concurrent concurrent/futures encodings \

View File

@ -1,8 +1,8 @@
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index 195f63f..8ecd70f 100644
index 9ffb714..3f7201a 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -713,6 +713,45 @@ conflict.
@@ -711,6 +711,45 @@ conflict.
.. versionadded:: 3.6
@ -500,37 +500,13 @@ index 0000000..635c98f
+if __name__ == "__main__":
+ test_main()
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index 6c3625d..009f542 100644
index 6e4286e..594dfa9 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -369,14 +369,21 @@ class EmbeddingTests(unittest.TestCase):
def tearDown(self):
os.chdir(self.oldcwd)
- def run_embedded_interpreter(self, *args):
+ def run_embedded_interpreter(self, *args, env=None):
"""Runs a test in the embedded interpreter"""
cmd = [self.test_exe]
cmd.extend(args)
+ if env is not None and sys.platform == 'win32':
+ # Windows requires at least the SYSTEMROOT environment variable to
+ # start Python.
+ env = env.copy()
+ env['SYSTEMROOT'] = os.environ['SYSTEMROOT']
+
p = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
- universal_newlines=True)
+ universal_newlines=True,
+ env=env)
(out, err) = p.communicate()
self.assertEqual(p.returncode, 0,
"bad returncode %d, stderr is %r" %
@@ -386,31 +393,21 @@ class EmbeddingTests(unittest.TestCase):
def test_subinterps(self):
@@ -425,32 +425,21 @@ class EmbeddingTests(unittest.TestCase):
def test_repeated_init_and_subinterpreters(self):
# This is just a "don't crash" test
out, err = self.run_embedded_interpreter()
out, err = self.run_embedded_interpreter('repeated_init_and_subinterpreters')
- if support.verbose:
+ if support.verbose > 1:
print()
@ -549,33 +525,19 @@ index 6c3625d..009f542 100644
-
def test_forced_io_encoding(self):
# Checks forced configuration of embedded interpreter IO streams
- out, err = self.run_embedded_interpreter("forced_io_encoding")
env = dict(os.environ, PYTHONIOENCODING="utf-8:surrogateescape")
out, err = self.run_embedded_interpreter("forced_io_encoding", env=env)
- if support.verbose:
+ env = dict(os.environ, PYTHONIOENCODING="utf-8:surrogateescape")
+ out, err = self.run_embedded_interpreter("forced_io_encoding", env=env)
+ if support.verbose > 1:
print()
print(out)
print(err)
- expected_errors = sys.__stdout__.errors
- expected_stdin_encoding = sys.__stdin__.encoding
expected_stream_encoding = "utf-8"
expected_errors = "surrogateescape"
- expected_pipe_encoding = self._get_default_pipe_encoding()
+ expected_stream_encoding = "utf-8"
+ expected_errors = "surrogateescape"
expected_output = '\n'.join([
"--- Use defaults ---",
"Expected encoding: default",
@@ -437,8 +434,8 @@ class EmbeddingTests(unittest.TestCase):
"stdout: latin-1:replace",
"stderr: latin-1:backslashreplace"])
expected_output = expected_output.format(
- in_encoding=expected_stdin_encoding,
- out_encoding=expected_pipe_encoding,
+ in_encoding=expected_stream_encoding,
+ out_encoding=expected_stream_encoding,
errors=expected_errors)
# This is useful if we ever trip over odd platform behaviour
self.maxDiff = None
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
@ -601,7 +563,7 @@ index ae2bcd4..0a302ff 100644
b'import locale; '
b'print(ascii("' + undecodable + b'"), '
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index df9ebd4..63145e4 100644
index 7866a5c..b41239a 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -680,6 +680,7 @@ class SysModuleTest(unittest.TestCase):
@ -613,7 +575,7 @@ index df9ebd4..63145e4 100644
'import sys',
'def dump(name):',
diff --git a/Modules/main.c b/Modules/main.c
index dd50211..f20cf24 100644
index b0fb78f..0d8590a 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -105,7 +105,11 @@ static const char usage_6[] =
@ -630,16 +592,15 @@ index dd50211..f20cf24 100644
static int
usage(int exitcode, const wchar_t* program)
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index 3968399..1bd2bbf 100644
index b0f9087..da892bf 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -1,4 +1,5 @@
-#include <Python.h>
+#include "Python.h"
#include <Python.h>
+#include "pyconfig.h"
#include "pythread.h"
#include <stdio.h>
/*********************************************************
diff --git a/Programs/python.c b/Programs/python.c
index a7afbc7..03f8295 100644
--- a/Programs/python.c
@ -713,7 +674,7 @@ index a7afbc7..03f8295 100644
for (i = 0; i < argc; i++) {
PyMem_RawFree(argv_copy2[i]);
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index a4f7f82..3843297 100644
index 640271f..2a22b24 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -167,6 +167,7 @@ Py_SetStandardStreamEncoding(const char *encoding, const char *errors)
@ -929,7 +890,7 @@ index a4f7f82..3843297 100644
#endif
if ((p = Py_GETENV("PYTHONDEBUG")) && *p != '\0')
@@ -1242,12 +1428,8 @@ initstdio(void)
@@ -1251,12 +1437,8 @@ initstdio(void)
}
}
if (!errors && !(pythonioencoding && *pythonioencoding)) {

View File

@ -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}.3
Release: 2%{?dist}
Version: %{pybasever}.4
Release: 1%{?dist}
License: Python
Group: Development/Languages
@ -417,19 +417,6 @@ Patch262: 00262-pep538_coerce_legacy_c_locale.patch
# Reported upstream: http://bugs.python.org/issue29804
Patch264: 00264-skip-test-failing-on-aarch64.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
# 00279 #
# Fix memory corruption due to allocator mix
# Fixed upstream: https://bugs.python.org/issue31532
Patch279: 00279-fix-memory-corruption-due-to-allocator-mix.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@ -706,9 +693,6 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch264 -p1
%endif
%patch277 -p1
%patch279 -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.
#
@ -1668,6 +1652,9 @@ fi
# ======================================================
%changelog
* Mon Jan 15 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.4-1
- Update to version 3.6.4
* Mon Oct 09 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.3-2
- Fix memory corruption due to allocator mix
Resolves: rhbz#1498207

View File

@ -1 +1 @@
SHA512 (Python-3.6.3.tar.xz) = 32f24a3adcb7880003c7ecdc5e53e838e774adda76b308961d8215e28db630b2fa2828097817924c76afa4212b2df3362eb64d4e10f37c0147f512ec5aa8662b
SHA512 (Python-3.6.4.tar.xz) = 09ba2103ac517ac4d262f00380c9aac836a53401ce252540c17fd821a3b92e1ddf32528d00772221eb3126b12cb95b62c3ac3e852f4951e6f2eb406c88c848a2