Update to 3.5.4

See https://docs.python.org/3.5/whatsnew/changelog.html#python-3-5-4

Remove patch 259 - workaround for magic number bump (upstream commit 93602e3).
Remove patch 267 - pip option --system-site-packages (upstream commit db6322c).
Remove patch 269 - multiple compilation issue with PGO (upstream commit 8489409).
Rebase patch 55 - systemtap (for upstream commit a5c62a8e).
This commit is contained in:
Petr Viktorin 2017-08-22 17:43:33 +02:00
parent 50e4bfa0d1
commit f7d3d35029
6 changed files with 24 additions and 5877 deletions

View File

@ -2,7 +2,7 @@ diff --git a/configure.ac b/configure.ac
index f50a6c8..b0650a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3277,6 +3277,23 @@ if test "$with_valgrind" != no; then
@@ -3288,6 +3288,23 @@ if test "$with_valgrind" != no; then
OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
fi
@ -39,7 +39,7 @@ index 0906ae0..4acd1cd 100755
THREADOBJ
LDLAST
USE_THREAD_MODULE
@@ -835,6 +837,7 @@ with_doc_strings
@@ -834,6 +836,7 @@ with_doc_strings
with_tsc
with_pymalloc
with_valgrind
@ -47,7 +47,7 @@ index 0906ae0..4acd1cd 100755
with_fpectl
with_libm
with_libc
@@ -1540,6 +1543,7 @@ Optional Packages:
@@ -1528,6 +1531,7 @@ Optional Packages:
--with(out)-tsc enable/disable timestamp counter profile
--with(out)-pymalloc disable/enable specialized mallocs
--with-valgrind Enable Valgrind support
@ -55,7 +55,7 @@ index 0906ae0..4acd1cd 100755
--with-fpectl enable SIGFPE catching
--with-libm=STRING math library
--with-libc=STRING C library
@@ -11181,6 +11185,31 @@ fi
@@ -11180,6 +11184,31 @@ fi
OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
fi
@ -642,7 +642,7 @@ diff --git a/Makefile.pre.in b/Makefile.pre.in
index a88b7d5..3585b88 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -415,6 +415,7 @@ PYTHON_OBJS= \
@@ -383,6 +383,7 @@ PYTHON_OBJS= \
Python/formatter_unicode.o \
Python/fileutils.o \
Python/$(DYNLOADFILE) \
@ -650,19 +650,19 @@ index a88b7d5..3585b88 100644
$(LIBOBJS) \
$(MACHDEP_OBJS) \
$(THREADOBJ)
@@ -868,7 +869,8 @@ Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
$(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
$(PYTHON_FOR_GEN) $(OPCODETARGETGEN) $(OPCODETARGETS_H)
@@ -864,7 +865,8 @@ Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
$(PYTHON_FOR_REGEN) $(srcdir)/Python/makeopcodetargets.py \
$(srcdir)/Python/opcode_targets.h
-Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h
+Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h \
-Python/ceval.o: $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/ceval_gil.h
+Python/ceval.o: $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/ceval_gil.h \
+ $(srcdir)/Python/ceval_systemtap.h @SYSTEMTAPDEPS@
Python/frozen.o: Python/importlib.h Python/importlib_external.h
Python/frozen.o: $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib_external.h
@@ -876,6 +878,13 @@ Objects/typeobject.o: Objects/typeslots.inc
Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
$(PYTHON_FOR_GEN) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h Objects/typeslots.inc
@@ -878,6 +880,13 @@ Objects/typeobject.o: Objects/typeslots.inc
< $(srcdir)/Include/typeslots.h \
$(srcdir)/Objects/typeslots.inc
+# Only needed with --with-systemtap; not a public header:
+$(srcdir)/Python/pysystemtap.h: $(srcdir)/Python/pysystemtap.d
@ -674,7 +674,7 @@ index a88b7d5..3585b88 100644
############################################################################
# Header files
@@ -1597,6 +1606,7 @@ clean: pycremoval
@@ -1601,6 +1610,7 @@ clean: pycremoval
-rm -f Lib/lib2to3/*Grammar*.pickle
-rm -f Programs/_testembed Programs/_freeze_importlib
-find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
@ -720,7 +720,7 @@ index 7b40518..0e49de5 100644
co = f->f_code;
names = co->co_names;
consts = co->co_consts;
@@ -3640,6 +3646,11 @@ fast_yield:
@@ -3678,6 +3684,11 @@ fast_yield:
/* pop frame */
exit_eval_frame:

File diff suppressed because it is too large Load Diff

View File

@ -1,78 +0,0 @@
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index 3999d1f..c1e6566 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -328,13 +328,7 @@ def test_devnull_exists_and_is_empty(self):
with open(os.devnull, "rb") as f:
self.assertEqual(f.read(), b"")
- # Requesting pip fails without SSL (http://bugs.python.org/issue19744)
- @unittest.skipIf(ssl is None, ensurepip._MISSING_SSL_MESSAGE)
- @unittest.skipUnless(threading, 'some dependencies of pip import threading'
- ' module unconditionally')
- # Issue #26610: pip/pep425tags.py requires ctypes
- @unittest.skipUnless(ctypes, 'pip requires ctypes')
- def test_with_pip(self):
+ def do_test_with_pip(self, system_site_packages):
rmtree(self.env_dir)
with EnvironmentVarGuard() as envvars:
# pip's cross-version compatibility may trigger deprecation
@@ -368,6 +362,7 @@ def test_with_pip(self):
# config in place to ensure we ignore it
try:
self.run_with_capture(venv.create, self.env_dir,
+ system_site_packages=system_site_packages,
with_pip=True)
except subprocess.CalledProcessError as exc:
# The output this produces can be a little hard to read,
@@ -417,9 +412,21 @@ def test_with_pip(self):
out = out.decode("latin-1") # Force to text, prevent decoding errors
self.assertIn("Successfully uninstalled pip", out)
self.assertIn("Successfully uninstalled setuptools", out)
- # Check pip is now gone from the virtual environment
- self.assert_pip_not_installed()
+ # Check pip is now gone from the virtual environment. This only
+ # applies in the system_site_packages=False case, because in the
+ # other case, pip may still be available in the system site-packages
+ if not system_site_packages:
+ self.assert_pip_not_installed()
+ # Requesting pip fails without SSL (http://bugs.python.org/issue19744)
+ @unittest.skipIf(ssl is None, ensurepip._MISSING_SSL_MESSAGE)
+ @unittest.skipUnless(threading, 'some dependencies of pip import threading'
+ ' module unconditionally')
+ # Issue #26610: pip/pep425tags.py requires ctypes
+ @unittest.skipUnless(ctypes, 'pip requires ctypes')
+ def test_with_pip(self):
+ self.do_test_with_pip(False)
+ self.do_test_with_pip(True)
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
index 74245ab..fa03262 100644
--- a/Lib/venv/__init__.py
+++ b/Lib/venv/__init__.py
@@ -77,6 +77,10 @@ def create(self, env_dir):
"""
env_dir = os.path.abspath(env_dir)
context = self.ensure_directories(env_dir)
+ # See issue 24875. We need system_site_packages to be False
+ # until after pip is installed.
+ true_system_site_packages = self.system_site_packages
+ self.system_site_packages = False
self.create_configuration(context)
self.setup_python(context)
if self.with_pip:
@@ -84,6 +88,11 @@ def create(self, env_dir):
if not self.upgrade:
self.setup_scripts(context)
self.post_setup(context)
+ if true_system_site_packages:
+ # We had set it to False before, now
+ # restore it and rewrite the configuration
+ self.system_site_packages = True
+ self.create_configuration(context)
def clear_directory(self, path):
for fn in os.listdir(path):

View File

@ -1,67 +0,0 @@
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 0e1d0af..42ab191 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -989,7 +989,7 @@ TESTTIMEOUT= 1200
# Run a basic set of regression tests.
# This excludes some tests that are particularly resource-intensive.
-test: all platform
+test: @DEF_MAKE_RULE@ platform
$(TESTRUNNER) $(TESTOPTS)
# Run the full test suite twice - once without .pyc files, and once with.
@@ -999,7 +999,7 @@ test: all platform
# the bytecode read from a .pyc file had the bug, sometimes the directly
# generated bytecode. This is sometimes a very shy bug needing a lot of
# sample data.
-testall: all platform
+testall: @DEF_MAKE_RULE@ platform
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
$(TESTPYTHON) -E $(srcdir)/Lib/compileall.py
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
@@ -1008,7 +1008,7 @@ testall: all platform
# Run the test suite for both architectures in a Universal build on OSX.
# Must be run on an Intel box.
-testuniversal: all platform
+testuniversal: @DEF_MAKE_RULE@ platform
if [ `arch` != 'i386' ];then \
echo "This can only be used on OSX/i386" ;\
exit 1 ;\
@@ -1031,7 +1031,7 @@ QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
test_multiprocessing_forkserver \
test_mailbox test_socket test_poll \
test_select test_zipfile test_concurrent_futures
-quicktest: all platform
+quicktest: @DEF_MAKE_RULE@ platform
$(TESTRUNNER) $(QUICKTESTOPTS)
@@ -1368,7 +1368,7 @@ LIBPL= $(LIBDEST)/config-$(LDVERSION)-$(MULTIARCH)
# pkgconfig directory
LIBPC= $(LIBDIR)/pkgconfig
-libainstall: all python-config
+libainstall: @DEF_MAKE_RULE@ python-config
@for i in $(LIBDIR) $(LIBPL) $(LIBPC); \
do \
if test ! -d $(DESTDIR)$$i; then \
@@ -1616,7 +1616,7 @@ distclean: clobber
-exec rm -f {} ';'
# Check for smelly exported symbols (not starting with Py/_Py)
-smelly: all
+smelly: @DEF_MAKE_RULE@
nm -p $(LIBRARY) | \
sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
@@ -1653,7 +1653,7 @@ funny:
-o -print
# Perform some verification checks on any modified files.
-patchcheck: all
+patchcheck: @DEF_MAKE_RULE@
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
# Dependencies

View File

@ -111,8 +111,8 @@
# ==================
Summary: Version 3 of the Python programming language aka Python 3000
Name: python3
Version: %{pybasever}.3
Release: 6%{?dist}
Version: %{pybasever}.4
Release: 1%{?dist}
License: Python
Group: Development/Languages
@ -389,27 +389,6 @@ Patch206: 00206-remove-hf-from-arm-triplet.patch
# Fedora needs the default mips64-linux-gnu
Patch243: 00243-fix-mips64-triplet.patch
# 00259 #
# Tolerate legacy invalid bytecode
# This patch restores the ability to import legacy bytecode generated
# by 3.5.0, 3.5.1 or 3.5.2, and modifies the eval loop to
# avoid any harmful consequences from the potentially malformed legacy
# bytecode.
# Original import patch by Petr Viktorin, eval loop patch by Serhiy Storchaka,
# and tests and integration by Nick Coghlan.
Patch259: 00259-tolerate-legacy-invalid-bytecode.patch
# 00267 #
# Make pip installable inside a new venv when using the --system-site-packages flag
# FIXED UPSTREAM: https://bugs.python.org/issue24875
Patch267: 00267-install-pip-in-a-venv-with-system-site-packages.patch
# 00269 #
# Fix python's recompilation with common build commands when using
# profile guided optimizations.
# Fixed upstream: http://bugs.python.org/issue29243
Patch269: 00269-fix-multiple-compilations-issue-with-pgo-builds.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@ -650,9 +629,6 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch205 -p1
%patch206 -p1
%patch243 -p1
%patch259 -p1
%patch267 -p1
%patch269 -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.
@ -1556,6 +1532,11 @@ rm -fr %{buildroot}
# ======================================================
%changelog
* Wed Aug 23 2017 Petr Viktorin <pviktori@redhat.com> - 3.5.4-1
- Update to 3.5.4
see https://docs.python.org/3.5/whatsnew/changelog.html#python-3-5-4
- Remove upstreamed patches (259, 267, 269)
* Wed May 10 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.5.3-6
- Enable profile guided optimizations for x86_64 and i686 architectures

View File

@ -1 +1 @@
SHA512 (Python-3.5.3.tar.xz) = bbcc20e315c63dbc8901d7e7bfa29d4dbdad9335720757d8d679730319fd1d9fcfdb55cf62d620c9b052134170f162c28d653a8af60923185b8932524d827864
SHA512 (Python-3.5.4.tar.xz) = dbbe2740ee1cce5404b7b6436a9b3887e15f415a1006efa22014ec7e5b1e48c43eed0ff98f6f5b365c527b8d2525be4ce72bbe404ce71c0835529fcd6f0267ff