Update to Python 3.4.2

This commit is contained in:
Matej Stuchlik 2014-11-13 10:58:03 +01:00
parent e0539fb2e7
commit a8e96a15a3
6 changed files with 17 additions and 131 deletions

View File

@ -45,7 +45,7 @@ diff -up Python-3.2.3/Lib/test/test_gdb.py.gdb-autoload-safepath Python-3.2.3/Li
# print commands # print commands
# Use "commands" to generate the arguments with which to invoke "gdb": # Use "commands" to generate the arguments with which to invoke "gdb":
args = ["gdb", "--batch"] args = ["gdb", "--batch", "-nx"]
+ args += ['--init-eval-command=%s' % cmd for cmd in init_commands] + args += ['--init-eval-command=%s' % cmd for cmd in init_commands]
args += ['--eval-command=%s' % cmd for cmd in commands] args += ['--eval-command=%s' % cmd for cmd in commands]
args += ["--args", args += ["--args",

View File

@ -1,86 +0,0 @@
diff --git a/Makefile.pre.in b/Makefile.pre.in
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -71,12 +71,17 @@
BASECFLAGS= @BASECFLAGS@
BASECPPFLAGS= @BASECPPFLAGS@
CONFIGURE_CFLAGS= @CFLAGS@
+# CFLAGS_NODIST is used for building the interpreter and stdlib C extensions.
+# Use it when a compiler flag should _not_ be part of the distutils CFLAGS
+# once Python is installed (Issue #21121).
+CONFIGURE_CFLAGS_NODIST=@CFLAGS_NODIST@
CONFIGURE_CPPFLAGS= @CPPFLAGS@
CONFIGURE_LDFLAGS= @LDFLAGS@
# Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
# command line to append to these values without stomping the pre-set
# values.
PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
+PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST)
# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
# be able to build extension modules using the directories specified in the
# environment variables
@@ -91,7 +96,7 @@
# Extra C flags added for building the interpreter object files.
CFLAGSFORSHARED=@CFLAGSFORSHARED@
# C flags used for building the interpreter object files
-PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
+PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
# Machine-dependent subdirectories
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -662,6 +662,7 @@
LIBTOOL_CRUFT
OTHER_LIBTOOL_OPT
UNIVERSAL_ARCH_FLAGS
+CFLAGS_NODIST
BASECFLAGS
OPT
ABIFLAGS
@@ -6504,7 +6505,7 @@
if test $ac_cv_declaration_after_statement_warning = yes
then
- BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
+ CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
fi
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1147,6 +1147,7 @@
fi
AC_SUBST(BASECFLAGS)
+AC_SUBST(CFLAGS_NODIST)
# The -arch flags for universal builds on OSX
UNIVERSAL_ARCH_FLAGS=
@@ -1231,7 +1232,7 @@
if test $ac_cv_declaration_after_statement_warning = yes
then
- BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
+ CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
fi
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -19,6 +19,12 @@
cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
+# Add special CFLAGS reserved for building the interpreter and the stdlib
+# modules (Issue #21121).
+cflags = sysconfig.get_config_var('CFLAGS')
+py_cflags_nodist = sysconfig.get_config_var('PY_CFLAGS_NODIST')
+sysconfig.get_config_vars()['CFLAGS'] = cflags + ' ' + py_cflags_nodist
+
def get_platform():
# cross build
if "_PYTHON_HOST_PLATFORM" in os.environ:

View File

@ -1,34 +0,0 @@
# HG changeset patch
# User Benjamin Peterson <benjamin@python.org>
# Date 1402796473 25200
# Node ID 847e288d6e93dba049c280f40979e16a1378d0f6
# Parent 6f1f387759913d91cb307d2783b3a40c48fe7424# Parent 5676797f3a3eccaf38e2c500e77ed39c68923cc9
merge 3.3 (#21766)
diff --git a/Lib/http/server.py b/Lib/http/server.py
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -977,7 +977,7 @@ class CGIHTTPRequestHandler(SimpleHTTPRe
(and the next character is a '/' or the end of the string).
"""
- collapsed_path = _url_collapse_path(self.path)
+ collapsed_path = _url_collapse_path(urllib.parse.unquote(self.path))
dir_sep = collapsed_path.find('/', 1)
head, tail = collapsed_path[:dir_sep], collapsed_path[dir_sep+1:]
if head in self.cgi_directories:
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -485,6 +485,11 @@ class CGIHTTPServerTestCase(BaseTestCase
(res.read(), res.getheader('Content-type'), res.status))
self.assertEqual(os.environ['SERVER_SOFTWARE'], signature)
+ def test_urlquote_decoding_in_cgi_check(self):
+ res = self.request('/cgi-bin%2ffile1.py')
+ self.assertEqual((b'Hello World\n', 'text/html', 200),
+ (res.read(), res.getheader('Content-type'), res.status))
+
class SocketlessRequestHandler(SimpleHTTPRequestHandler):
def __init__(self):

View File

@ -139,8 +139,8 @@
# ================== # ==================
Summary: Version 3 of the Python programming language aka Python 3000 Summary: Version 3 of the Python programming language aka Python 3000
Name: python3 Name: python3
Version: %{pybasever}.1 Version: %{pybasever}.2
Release: 16%{?dist} Release: 1%{?dist}
License: Python License: Python
Group: Development/Languages Group: Development/Languages
@ -682,7 +682,8 @@ Patch194: temporarily-disable-tests-requiring-SIGHUP.patch
# Don't declare Werror=declaration-after-statement for extension # Don't declare Werror=declaration-after-statement for extension
# modules through setup.py # modules through setup.py
# http://bugs.python.org/issue21121 # http://bugs.python.org/issue21121
Patch195: 00195-dont-add-Werror-declaration-after-statement.patch # FIXED UPSTREAM
# Patch195: 00195-dont-add-Werror-declaration-after-statement.patch
# 00196 # 00196
# #
@ -695,7 +696,8 @@ Patch196: 00196-test-gdb-match-addr-before-builtin.patch
# path separators in URLs. This may have enabled attackers to disclose a CGI # path separators in URLs. This may have enabled attackers to disclose a CGI
# script's source code or execute arbitrary scripts in the server's # script's source code or execute arbitrary scripts in the server's
# document root. # document root.
Patch197: 00197-fix-CVE-2014-4650.patch # FIXED UPSTREAM
# Patch197: 00197-fix-CVE-2014-4650.patch
# (New patches go here ^^^) # (New patches go here ^^^)
@ -973,9 +975,9 @@ done
# 00190: upstream as of Python 3.4.1 # 00190: upstream as of Python 3.4.1
# 00193: upstream as of Python 3.4.1 # 00193: upstream as of Python 3.4.1
%patch194 -p1 %patch194 -p1
%patch195 -p1 # 00195: upstream as of Python 3.4.2
%patch196 -p1 %patch196 -p1
%patch197 -p1 # 00197: upstream as of Python 3.4.2
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there # 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. # are many differences between 2.6 and the Python 3 library.
@ -1722,7 +1724,6 @@ rm -fr %{buildroot}
%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes} %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
%dir %{pylibdir}/turtledemo %dir %{pylibdir}/turtledemo
%{pylibdir}/turtledemo/*.py %{pylibdir}/turtledemo/*.py
%{pylibdir}/turtledemo/*.txt
%{pylibdir}/turtledemo/*.cfg %{pylibdir}/turtledemo/*.cfg
%dir %{pylibdir}/turtledemo/__pycache__/ %dir %{pylibdir}/turtledemo/__pycache__/
%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes} %{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes}
@ -1865,6 +1866,11 @@ rm -fr %{buildroot}
# ====================================================== # ======================================================
%changelog %changelog
* Thu Nov 13 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.2-1
- Update to 3.4.2
- Refreshed patches: 156 (gdb autoload)
- Removed: 195 (Werror declaration), 197 (CVE-2014-4650)
* Mon Nov 03 2014 Slavek Kabrda <bkabrda@redhat.com> - 3.4.1-16 * Mon Nov 03 2014 Slavek Kabrda <bkabrda@redhat.com> - 3.4.1-16
- Fix CVE-2014-4650 - CGIHTTPServer URL handling - Fix CVE-2014-4650 - CGIHTTPServer URL handling
Resolves: rhbz#1113529 Resolves: rhbz#1113529

View File

@ -1 +1 @@
6cafc183b4106476dd73d5738d7f616a Python-3.4.1.tar.xz 36fc7327c02c6f12fa24fc9ba78039e3 Python-3.4.2.tar.xz

View File

@ -21,5 +21,5 @@ diff -up Python-3.4.0/Lib/test/test_asyncio/test_subprocess.py.orig Python-3.4.0
- @unittest.skipIf(sys.platform == 'win32', "Don't have SIGHUP") - @unittest.skipIf(sys.platform == 'win32', "Don't have SIGHUP")
+ @unittest.skipIf(True, "Temporarily skipped (rhbz#1088233)") + @unittest.skipIf(True, "Temporarily skipped (rhbz#1088233)")
def test_send_signal(self): def test_send_signal(self):
args = PROGRAM_BLOCKED code = 'import time; print("sleeping", flush=True); time.sleep(3600)'
create = asyncio.create_subprocess_exec(*args, loop=self.loop) args = [sys.executable, '-c', code]