rpms/python/devel python-2.7-fix-2to3-itertools-import-star.patch, NONE, 1.1 python.spec, 1.197, 1.198
dmalcolm
dmalcolm at fedoraproject.org
Mon Jul 26 13:04:32 UTC 2010
Author: dmalcolm
Update of /cvs/pkgs/rpms/python/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv30905
Modified Files:
python.spec
Added Files:
python-2.7-fix-2to3-itertools-import-star.patch
Log Message:
* Mon Jul 26 2010 David Malcolm <dmalcolm at redhat.com> - 2.7-6
- re-enable systemtap
- cherrypick upstream patch to 2to3 for "from itertools import *"
traceback (patch 123)
python-2.7-fix-2to3-itertools-import-star.patch:
fixes/fix_itertools_imports.py | 3 +++
tests/test_fixers.py | 4 ++++
2 files changed, 7 insertions(+)
--- NEW FILE python-2.7-fix-2to3-itertools-import-star.patch ---
Index: lib2to3/tests/test_fixers.py
===================================================================
--- lib2to3/tests/test_fixers.py (revision 82529)
+++ lib2to3/tests/test_fixers.py (revision 82530)
@@ -3670,7 +3670,11 @@
a = "from itertools import bar, filterfalse, foo"
self.check(b, a)
+ def test_import_star(self):
+ s = "from itertools import *"
+ self.unchanged(s)
+
def test_unchanged(self):
s = "from itertools import foo"
self.unchanged(s)
Index: lib2to3/fixes/fix_itertools_imports.py
===================================================================
--- lib2to3/fixes/fix_itertools_imports.py (revision 82529)
+++ lib2to3/fixes/fix_itertools_imports.py (revision 82530)
@@ -20,6 +20,9 @@
if child.type == token.NAME:
member = child.value
name_node = child
+ elif child.type == token.STAR:
+ # Just leave the import as is.
+ return
else:
assert child.type == syms.import_as_name
name_node = child.children[0]
Index: python.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python/devel/python.spec,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -p -r1.197 -r1.198
--- python.spec 22 Jul 2010 20:04:43 -0000 1.197
+++ python.spec 26 Jul 2010 13:04:32 -0000 1.198
@@ -37,7 +37,7 @@
%global with_gdb_hooks 1
-%global with_systemtap 0
+%global with_systemtap 1
# some arches dont have valgrind so we need to disable its support on them
%ifarch %{sparc} s390 s390x
@@ -91,7 +91,7 @@ Summary: An interpreted, interactive, ob
Name: %{python}
# Remember to also rebase python-docs when changing this:
Version: 2.7
-Release: 5%{?dist}
+Release: 6%{?dist}
License: Python
Group: Development/Languages
Provides: python-abi = %{pybasever}
@@ -411,6 +411,11 @@ Patch121: python-2.7rc2-r79310.patch
# Not yet sent upstream:
Patch122: python-2.7-fix-parallel-make.patch
+# Fix traceback in 2to3 on "from itertools import *"
+# This is http://bugs.python.org/issue8892 (see also rhbz#600036)
+# Cherrypicked from r82530 upstream:
+Patch123: python-2.7-fix-2to3-itertools-import-star.patch
+
# This is the generated patch to "configure"; see the description of
# %{regenerate_autotooling_patch}
# above:
@@ -652,6 +657,9 @@ rm -r Modules/zlib || exit 1
%patch119 -p0 -b .fix-expat-issue9054
%patch121 -p0 -R
%patch122 -p1 -b .fix-parallel-make
+pushd Lib
+%patch123 -p0
+popd
# This shouldn't be necesarry, but is right now (2.2a3)
find -name "*~" |xargs rm -f
@@ -1397,6 +1405,11 @@ rm -fr %{buildroot}
# payload file would be unpackaged)
%changelog
+* Mon Jul 26 2010 David Malcolm <dmalcolm at redhat.com> - 2.7-6
+- re-enable systemtap
+- cherrypick upstream patch to 2to3 for "from itertools import *"
+traceback (patch 123)
+
* Thu Jul 22 2010 David Malcolm <dmalcolm at redhat.com> - 2.7-5
- disable systemtap for now (dtrace is failing on startup due to the bug
mentioned in 2.7-4)
More information about the scm-commits
mailing list