* Wed Apr 11 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-1
- 3.2.3; refresh patch 102 (lib64); drop upstream patches 148 (gdbm magic
values), 149 (__pycache__ fix); add patch 152 (test_gdb regex)
This commit is contained in:
David Malcolm 2012-04-11 20:20:08 -04:00
parent ae2fc1c043
commit 28856627bf
6 changed files with 65 additions and 202 deletions

View File

@ -1,13 +0,0 @@
diff -up Python-3.2.2/Lib/dbm/__init__.py.gdbm-1.9-magic Python-3.2.2/Lib/dbm/__init__.py
--- Python-3.2.2/Lib/dbm/__init__.py.gdbm-1.9-magic 2011-09-03 12:16:40.000000000 -0400
+++ Python-3.2.2/Lib/dbm/__init__.py 2011-09-30 15:47:27.488863694 -0400
@@ -166,7 +166,7 @@ def whichdb(filename):
return ""
# Check for GNU dbm
- if magic == 0x13579ace:
+ if magic in (0x13579ace, 0x13579acd, 0x13579acf):
return "dbm.gnu"
# Later versions of Berkeley db hash file have a 12-byte pad in
diff -up Python-3.2.2/Misc/NEWS.gdbm-1.9-magic Python-3.2.2/Misc/NEWS

View File

@ -1,146 +0,0 @@
diff -up Python-3.2.2/Doc/distutils/apiref.rst.issue11254 Python-3.2.2/Doc/distutils/apiref.rst
--- Python-3.2.2/Doc/distutils/apiref.rst.issue11254 2011-09-03 12:16:38.000000000 -0400
+++ Python-3.2.2/Doc/distutils/apiref.rst 2011-10-10 17:01:23.167196855 -0400
@@ -1204,9 +1204,9 @@ other utility module.
.. function:: byte_compile(py_files[, optimize=0, force=0, prefix=None, base_dir=None, verbose=1, dry_run=0, direct=None])
Byte-compile a collection of Python source files to either :file:`.pyc` or
- :file:`.pyo` files in the same directory. *py_files* is a list of files to
- compile; any files that don't end in :file:`.py` are silently skipped.
- *optimize* must be one of the following:
+ :file:`.pyo` files in a :file:`__pycache__` subdirectory (see :pep:`3147`).
+ *py_files* is a list of files to compile; any files that don't end in
+ :file:`.py` are silently skipped. *optimize* must be one of the following:
* ``0`` - don't optimize (generate :file:`.pyc`)
* ``1`` - normal optimization (like ``python -O``)
@@ -1231,6 +1231,11 @@ other utility module.
is used by the script generated in indirect mode; unless you know what you're
doing, leave it set to ``None``.
+ .. versionchanged:: 3.2.3
+ Create ``.pyc`` or ``.pyo`` files with an :func:`import magic tag
+ <imp.get_tag>` in their name, in a :file:`__pycache__` subdirectory
+ instead of files without tag in the current directory.
+
.. function:: rfc822_escape(header)
diff -up Python-3.2.2/Lib/distutils/tests/test_build_py.py.issue11254 Python-3.2.2/Lib/distutils/tests/test_build_py.py
--- Python-3.2.2/Lib/distutils/tests/test_build_py.py.issue11254 2011-09-03 12:16:40.000000000 -0400
+++ Python-3.2.2/Lib/distutils/tests/test_build_py.py 2011-10-10 17:01:23.167196855 -0400
@@ -3,6 +3,7 @@
import os
import sys
import io
+import imp
import unittest
from distutils.command.build_py import build_py
@@ -57,13 +58,15 @@ class BuildPyTestCase(support.TempdirMan
self.assertEqual(len(cmd.get_outputs()), 3)
pkgdest = os.path.join(destination, "pkg")
files = os.listdir(pkgdest)
+ pycache_dir = os.path.join(pkgdest, "__pycache__")
self.assertIn("__init__.py", files)
self.assertIn("README.txt", files)
- # XXX even with -O, distutils writes pyc, not pyo; bug?
if sys.dont_write_bytecode:
- self.assertNotIn("__init__.pyc", files)
+ self.assertFalse(os.path.exists(pycache_dir))
else:
- self.assertIn("__init__.pyc", files)
+ # XXX even with -O, distutils writes pyc, not pyo; bug?
+ pyc_files = os.listdir(pycache_dir)
+ self.assertIn("__init__.%s.pyc" % imp.get_tag(), pyc_files)
def test_empty_package_dir(self):
# See SF 1668596/1720897.
diff -up Python-3.2.2/Lib/distutils/tests/test_install_lib.py.issue11254 Python-3.2.2/Lib/distutils/tests/test_install_lib.py
--- Python-3.2.2/Lib/distutils/tests/test_install_lib.py.issue11254 2011-09-03 12:16:40.000000000 -0400
+++ Python-3.2.2/Lib/distutils/tests/test_install_lib.py 2011-10-10 17:01:23.167196855 -0400
@@ -1,6 +1,7 @@
"""Tests for distutils.command.install_data."""
import sys
import os
+import imp
import unittest
from distutils.command.install_lib import install_lib
@@ -32,18 +33,20 @@ class InstallLibTestCase(support.Tempdir
cmd.finalize_options()
self.assertEqual(cmd.optimize, 2)
- @unittest.skipUnless(not sys.dont_write_bytecode,
- 'byte-compile not supported')
+ @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile disabled')
def test_byte_compile(self):
pkg_dir, dist = self.create_dist()
+ os.chdir(pkg_dir)
cmd = install_lib(dist)
cmd.compile = cmd.optimize = 1
f = os.path.join(pkg_dir, 'foo.py')
self.write_file(f, '# python file')
cmd.byte_compile([f])
- self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc')))
- self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo')))
+ pyc_file = imp.cache_from_source('foo.py')
+ pyo_file = imp.cache_from_source('foo.py', debug_override=False)
+ self.assertTrue(os.path.exists(pyc_file))
+ self.assertTrue(os.path.exists(pyo_file))
def test_get_outputs(self):
pkg_dir, dist = self.create_dist()
diff -up Python-3.2.2/Lib/distutils/util.py.issue11254 Python-3.2.2/Lib/distutils/util.py
--- Python-3.2.2/Lib/distutils/util.py.issue11254 2011-09-03 12:16:40.000000000 -0400
+++ Python-3.2.2/Lib/distutils/util.py 2011-10-10 17:01:23.172196793 -0400
@@ -4,7 +4,11 @@ Miscellaneous utility functions -- anyth
one of the other *util.py modules.
"""
-import sys, os, string, re
+import os
+import re
+import imp
+import sys
+import string
from distutils.errors import DistutilsPlatformError
from distutils.dep_util import newer
from distutils.spawn import spawn
@@ -415,9 +419,9 @@ def byte_compile (py_files,
verbose=1, dry_run=0,
direct=None):
"""Byte-compile a collection of Python source files to either .pyc
- or .pyo files in the same directory. 'py_files' is a list of files
- to compile; any files that don't end in ".py" are silently skipped.
- 'optimize' must be one of the following:
+ or .pyo files in a __pycache__ subdirectory. 'py_files' is a list
+ of files to compile; any files that don't end in ".py" are silently
+ skipped. 'optimize' must be one of the following:
0 - don't optimize (generate .pyc)
1 - normal optimization (like "python -O")
2 - extra optimization (like "python -OO")
@@ -529,7 +533,10 @@ byte_compile(files, optimize=%r, force=%
# Terminology from the py_compile module:
# cfile - byte-compiled file
# dfile - purported source filename (same as 'file' by default)
- cfile = file + (__debug__ and "c" or "o")
+ if optimize >= 0:
+ cfile = imp.cache_from_source(file, debug_override=not optimize)
+ else:
+ cfile = imp.cache_from_source(file)
dfile = file
if prefix:
if file[:len(prefix)] != prefix:
diff -up Python-3.2.2/Misc/ACKS.issue11254 Python-3.2.2/Misc/ACKS
--- Python-3.2.2/Misc/ACKS.issue11254 2011-09-03 12:16:45.000000000 -0400
+++ Python-3.2.2/Misc/ACKS 2011-10-10 17:01:23.168196842 -0400
@@ -715,6 +715,7 @@ Pierre Quentel
Brian Quinlan
Anders Qvist
Burton Radons
+Jeff Ramnani
Brodie Rao
Antti Rasinen
Sridhar Ratnakumar

View File

@ -0,0 +1,11 @@
--- Lib/test/test_gdb.py.old 2012-04-11 19:35:13.512681203 -0400
+++ Lib/test/test_gdb.py 2012-04-11 19:39:52.567192540 -0400
@@ -159,7 +159,7 @@ class DebuggerTests(unittest.TestCase):
# gdb can insert additional '\n' and space characters in various places
# in its output, depending on the width of the terminal it's connected
# to (using its "wrap_here" function)
- m = re.match('.*#0\s+builtin_id\s+\(self\=.*,\s+v=\s*(.*?)\)\s+at\s+Python/bltinmodule.c.*',
+ m = re.match('.*#0\s+builtin_id\s+\(self\=.*,\s+v=\s*(.*?)\)\s+at\s+\S*Python/bltinmodule.c.*',
gdb_output, re.DOTALL)
if not m:
self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output))

View File

@ -1,7 +1,7 @@
diff -up Python-3.2.1/Lib/distutils/command/install.py.lib64 Python-3.2.1/Lib/distutils/command/install.py
--- Python-3.2.1/Lib/distutils/command/install.py.lib64 2011-07-09 02:58:46.000000000 -0400
+++ Python-3.2.1/Lib/distutils/command/install.py 2011-07-11 11:20:45.980426001 -0400
@@ -47,14 +47,14 @@ else:
diff -up Python-3.2.3/Lib/distutils/command/install.py.lib64 Python-3.2.3/Lib/distutils/command/install.py
--- Python-3.2.3/Lib/distutils/command/install.py.lib64 2012-04-11 02:54:02.000000000 -0400
+++ Python-3.2.3/Lib/distutils/command/install.py 2012-04-11 19:01:19.727107020 -0400
@@ -45,14 +45,14 @@ else:
INSTALL_SCHEMES = {
'unix_prefix': {
'purelib': '$base/lib/python$py_version_short/site-packages',
@ -18,10 +18,10 @@ diff -up Python-3.2.1/Lib/distutils/command/install.py.lib64 Python-3.2.1/Lib/di
'headers': '$base/include/python/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
diff -up Python-3.2.1/Lib/distutils/sysconfig.py.lib64 Python-3.2.1/Lib/distutils/sysconfig.py
--- Python-3.2.1/Lib/distutils/sysconfig.py.lib64 2011-07-09 02:58:47.000000000 -0400
+++ Python-3.2.1/Lib/distutils/sysconfig.py 2011-07-11 11:20:45.981426001 -0400
@@ -124,8 +124,12 @@ def get_python_lib(plat_specific=0, stan
diff -up Python-3.2.3/Lib/distutils/sysconfig.py.lib64 Python-3.2.3/Lib/distutils/sysconfig.py
--- Python-3.2.3/Lib/distutils/sysconfig.py.lib64 2012-04-11 02:54:02.000000000 -0400
+++ Python-3.2.3/Lib/distutils/sysconfig.py 2012-04-11 19:01:19.727107020 -0400
@@ -122,8 +122,12 @@ def get_python_lib(plat_specific=0, stan
prefix = plat_specific and EXEC_PREFIX or PREFIX
if os.name == "posix":
@ -35,9 +35,9 @@ diff -up Python-3.2.1/Lib/distutils/sysconfig.py.lib64 Python-3.2.1/Lib/distutil
if standard_lib:
return libpython
else:
diff -up Python-3.2.1/Lib/site.py.lib64 Python-3.2.1/Lib/site.py
--- Python-3.2.1/Lib/site.py.lib64 2011-07-09 02:58:49.000000000 -0400
+++ Python-3.2.1/Lib/site.py 2011-07-11 11:20:45.982426001 -0400
diff -up Python-3.2.3/Lib/site.py.lib64 Python-3.2.3/Lib/site.py
--- Python-3.2.3/Lib/site.py.lib64 2012-04-11 02:54:03.000000000 -0400
+++ Python-3.2.3/Lib/site.py 2012-04-11 19:01:19.728107008 -0400
@@ -285,12 +285,16 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@ -55,9 +55,9 @@ diff -up Python-3.2.1/Lib/site.py.lib64 Python-3.2.1/Lib/site.py
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
diff -up Python-3.2.1/Lib/sysconfig.py.lib64 Python-3.2.1/Lib/sysconfig.py
--- Python-3.2.1/Lib/sysconfig.py.lib64 2011-07-09 02:58:49.000000000 -0400
+++ Python-3.2.1/Lib/sysconfig.py 2011-07-11 11:20:45.982426001 -0400
diff -up Python-3.2.3/Lib/sysconfig.py.lib64 Python-3.2.3/Lib/sysconfig.py
--- Python-3.2.3/Lib/sysconfig.py.lib64 2012-04-11 02:54:03.000000000 -0400
+++ Python-3.2.3/Lib/sysconfig.py 2012-04-11 19:01:19.728107008 -0400
@@ -21,10 +21,10 @@ __all__ = [
_INSTALL_SCHEMES = {
@ -86,13 +86,13 @@ diff -up Python-3.2.1/Lib/sysconfig.py.lib64 Python-3.2.1/Lib/sysconfig.py
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',
diff -up Python-3.2.1/Lib/test/test_site.py.lib64 Python-3.2.1/Lib/test/test_site.py
--- Python-3.2.1/Lib/test/test_site.py.lib64 2011-07-09 02:58:51.000000000 -0400
+++ Python-3.2.1/Lib/test/test_site.py 2011-07-11 11:20:45.983426001 -0400
@@ -222,12 +222,15 @@ class HelperFunctionsTests(unittest.Test
wanted = os.path.join('xoxo', 'Lib', 'site-packages')
self.assertEqual(dirs[0], wanted)
diff -up Python-3.2.3/Lib/test/test_site.py.lib64 Python-3.2.3/Lib/test/test_site.py
--- Python-3.2.3/Lib/test/test_site.py.lib64 2012-04-11 02:54:05.000000000 -0400
+++ Python-3.2.3/Lib/test/test_site.py 2012-04-11 19:02:01.413585869 -0400
@@ -236,12 +236,15 @@ class HelperFunctionsTests(unittest.Test
self.assertEqual(dirs[2], wanted)
elif os.sep == '/':
# OS X non-framwework builds, Linux, FreeBSD, etc
- self.assertEqual(len(dirs), 2)
- wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
+ self.assertEqual(len(dirs), 3)
@ -106,11 +106,11 @@ diff -up Python-3.2.1/Lib/test/test_site.py.lib64 Python-3.2.1/Lib/test/test_sit
+ wanted = os.path.join('xoxo', 'lib', 'site-python')
+ self.assertEqual(dirs[2], wanted)
else:
# other platforms
self.assertEqual(len(dirs), 2)
self.assertEqual(dirs[0], 'xoxo')
diff -up Python-3.2.1/Makefile.pre.in.lib64 Python-3.2.1/Makefile.pre.in
--- Python-3.2.1/Makefile.pre.in.lib64 2011-07-11 11:20:45.974426000 -0400
+++ Python-3.2.1/Makefile.pre.in 2011-07-11 11:20:45.984426001 -0400
diff -up Python-3.2.3/Makefile.pre.in.lib64 Python-3.2.3/Makefile.pre.in
--- Python-3.2.3/Makefile.pre.in.lib64 2012-04-11 19:01:19.722107084 -0400
+++ Python-3.2.3/Makefile.pre.in 2012-04-11 19:01:19.729106996 -0400
@@ -106,7 +106,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
@ -120,9 +120,9 @@ diff -up Python-3.2.1/Makefile.pre.in.lib64 Python-3.2.1/Makefile.pre.in
ABIFLAGS= @ABIFLAGS@
# Detailed destination directories
diff -up Python-3.2.1/Modules/getpath.c.lib64 Python-3.2.1/Modules/getpath.c
--- Python-3.2.1/Modules/getpath.c.lib64 2011-07-09 02:58:54.000000000 -0400
+++ Python-3.2.1/Modules/getpath.c 2011-07-11 11:27:44.596425999 -0400
diff -up Python-3.2.3/Modules/getpath.c.lib64 Python-3.2.3/Modules/getpath.c
--- Python-3.2.3/Modules/getpath.c.lib64 2012-04-11 02:54:07.000000000 -0400
+++ Python-3.2.3/Modules/getpath.c 2012-04-11 19:01:19.729106996 -0400
@@ -122,8 +122,8 @@
#endif
@ -161,9 +161,9 @@ diff -up Python-3.2.1/Modules/getpath.c.lib64 Python-3.2.1/Modules/getpath.c
}
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
diff -up Python-3.2.1/setup.py.lib64 Python-3.2.1/setup.py
--- Python-3.2.1/setup.py.lib64 2011-07-09 02:58:56.000000000 -0400
+++ Python-3.2.1/setup.py 2011-07-11 11:28:00.193426004 -0400
diff -up Python-3.2.3/setup.py.lib64 Python-3.2.3/setup.py
--- Python-3.2.3/setup.py.lib64 2012-04-11 02:54:08.000000000 -0400
+++ Python-3.2.3/setup.py 2012-04-11 19:01:19.730106984 -0400
@@ -396,7 +396,7 @@ class PyBuildExt(build_ext):
# Ensure that /usr/local is always used, but the local build
# directories (i.e. '.' and 'Include') must be first. See issue

View File

@ -121,8 +121,8 @@
# ==================
Summary: Version 3 of the Python programming language aka Python 3000
Name: python3
Version: %{pybasever}.2
Release: 13%{?dist}
Version: %{pybasever}.3
Release: 1%{?dist}
License: Python
Group: Development/Languages
@ -224,7 +224,7 @@ Patch3: python-3.2b2-remove-mimeaudio-tests.patch
# dmalcolm
Patch55: 00055-systemtap.patch
Patch102: python-3.2.1-lib64.patch
Patch102: python-3.2.3-lib64.patch
# Only used when "%{_lib}" == "lib64"
# Another lib64 fix, for distutils/tests/test_install.py; not upstream:
@ -358,14 +358,11 @@ Patch146: 00146-hashlib-fips.patch
# Not yet sent upstream
Patch147: 00147-add-debug-malloc-stats.patch
# Cherrypick fix for dbm version detection to cope with gdbm-1.9's magic values
# Taken from upstream http://bugs.python.org/issue13007 (rhbz#742242)
Patch148: 00148-gdbm-1.9-magic-values.patch
# Upstream as of Python 3.2.3:
# Patch148: 00148-gdbm-1.9-magic-values.patch
# Cherrypick fix for distutils not using __pycache__ when byte-compiling files
# Based on upstream http://bugs.python.org/issue11254 (rhbz#722578)
# (upstream commits 27a36b05caed and 651e84363001):
Patch149: 00149-backport-issue11254-pycache-bytecompilation-fix.patch
# Upstream as of Python 3.2.3:
# Patch149: 00149-backport-issue11254-pycache-bytecompilation-fix.patch
# temporarily disable rAssertAlmostEqual in test_cmath on PPC (bz #750811)
# caused by a glibc bug. This patch can be removed when we have a glibc with
@ -373,6 +370,14 @@ Patch149: 00149-backport-issue11254-pycache-bytecompilation-fix.patch
# http://sourceware.org/bugzilla/show_bug.cgi?id=13472
Patch150: 00150-disable-rAssertAlmostEqual-cmath-on-ppc.patch
# python.spec had:
# Patch151: 00151-fork-deadlock.patch
# Fix a regex in test_gdb so that it doesn't choke when gdb provides a full
# path to Python/bltinmodule.c:
Patch152: 00152-fix-test-gdb-regex.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora 17 onwards,
@ -583,11 +588,13 @@ done
# 00145: not for python3
%patch146 -p1
%patch147 -p1
%patch148 -p1
%patch149 -p1
# 00148: upstream as of Python 3.2.3
# 00149: upstream as of Python 3.2.3
%ifarch ppc ppc64
%patch150 -p1
%endif
# 00151: not for python3
%patch152 -p0
# 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.
@ -1410,6 +1417,10 @@ rm -fr %{buildroot}
# ======================================================
%changelog
* Wed Apr 11 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-1
- 3.2.3; refresh patch 102 (lib64); drop upstream patches 148 (gdbm magic
values), 149 (__pycache__ fix); add patch 152 (test_gdb regex)
* Thu Feb 9 2012 Thomas Spura <tomspur@fedoraproject.org> - 3.2.2-13
- use newly installed python for byte compiling (now for real)

View File

@ -1 +1 @@
3720ce9460597e49264bbb63b48b946d Python-3.2.2.tar.xz
187564726f2c1473d301c586acc24847 Python-3.2.3.tar.xz