[Python-apps-commits] r9292 - in packages/cython/trunk/debian (8 files)

yoh at users.alioth.debian.org yoh at users.alioth.debian.org
Thu Dec 6 19:51:09 UTC 2012


    Date: Thursday, December 6, 2012 @ 19:51:06
  Author: yoh
Revision: 9292

new changelog entry and some post-release fixes cherry-picked

Added:
  packages/cython/trunk/debian/changelogs/ReleaseNotes-0.17.2
  packages/cython/trunk/debian/patches/0001-keep-longness-when-folding-negative-integer-constant.patch
  packages/cython/trunk/debian/patches/0003-Fix-compiler-crash.patch
  packages/cython/trunk/debian/patches/0005-fix-cimport-cython-in-string-code-fragments.patch
  packages/cython/trunk/debian/patches/0006-fix-refnanny-code-for-del-statement-inside-of-genera.patch
Modified:
  packages/cython/trunk/debian/changelog
  packages/cython/trunk/debian/changelogs/ReleaseHistory
  packages/cython/trunk/debian/patches/series

Modified: packages/cython/trunk/debian/changelog
===================================================================
--- packages/cython/trunk/debian/changelog	2012-12-06 08:39:47 UTC (rev 9291)
+++ packages/cython/trunk/debian/changelog	2012-12-06 19:51:06 UTC (rev 9292)
@@ -1,3 +1,13 @@
+cython (0.17.2-1) unstable; urgency=low
+
+  * Bugfix upstream release with post-release fixes:
+    - 0001-keep-longness-when-folding-negative-integer-constant.patch
+    - 0003-Fix-compiler-crash.patch
+    - 0005-fix-cimport-cython-in-string-code-fragments.patch
+    - 0006-fix-refnanny-code-for-del-statement-inside-of-genera.patch
+
+ -- Yaroslav Halchenko <debian at onerussian.com>  Mon, 03 Dec 2012 10:59:34 -0500
+
 cython (0.17.1-1) experimental; urgency=low
 
   * Bugfix release

Modified: packages/cython/trunk/debian/changelogs/ReleaseHistory
===================================================================
--- packages/cython/trunk/debian/changelogs/ReleaseHistory	2012-12-06 08:39:47 UTC (rev 9291)
+++ packages/cython/trunk/debian/changelogs/ReleaseHistory	2012-12-06 19:51:06 UTC (rev 9292)
@@ -1,6 +1,10 @@
-Fetched from http://wiki.cython.org/ReleaseHistory on Thu Sep 20 11:28:57 EDT 2012\n
+Fetched from http://wiki.cython.org/ReleaseHistory on Mon Dec  3 11:21:48 EST 2012\n
 There seems to be no list of releases available on the web. These are collected from the mailing list. It is not complete, but is probably already useful so that people can see if it worth upgrading to the latest version. The current release is always linked to from the main site, old releases can be found at http://cython.org/release/.
 
+The latest changelog is available in the source tree: for the https://github.com/cython/cython/blob/master/CHANGES.rst and for https://github.com/cython/cython/blob/0.17/CHANGES.rst.
+
+ * [[ReleaseNotes-0.17.1]]
+
  * [[ReleaseNotes-0.17]]
 
  * [[ReleaseNotes-0.16]]

Added: packages/cython/trunk/debian/changelogs/ReleaseNotes-0.17.2
===================================================================
--- packages/cython/trunk/debian/changelogs/ReleaseNotes-0.17.2	                        (rev 0)
+++ packages/cython/trunk/debian/changelogs/ReleaseNotes-0.17.2	2012-12-06 19:51:06 UTC (rev 9292)
@@ -0,0 +1,47 @@
+Obtained from the release announcement email
+
+0.17.2 (2012-11-20)
+===================
+
+Features added
+--------------
+
+* ``cythonize()`` gained a best effort compile mode that can be used to
+simply ignore .py files that fail to compile.
+
+Bugs fixed
+----------
+
+* Replacing an object reference with the value of one of its cdef
+attributes could generate incorrect C code that accessed the object after
+deleting its last reference.
+
+* C-to-Python type coercions during cascaded comparisons could generate
+invalid C code, specifically when using the 'in' operator.
+
+* "obj[1,]" passed a single integer into the item getter instead of a tuple.
+
+* Cyclic imports at module init time did not work in Py3.
+
+* The names of C++ destructors for template classes were built incorrectly.
+
+* In pure mode, type casts in Cython syntax and the C ampersand operator
+are now rejected. Use the pure mode replacements instead.
+
+* In pure mode, C type names and the sizeof() function are no longer
+recognised as such and can be used as normal Python names.
+
+* The extended C level support for the CPython array type was declared too
+late to be used by user defined classes.
+
+* C++ class nesting was broken.
+
+* Better checking for required nullary constructors for stack-allocated C++
+instances.
+
+* Remove module docstring in no-docstring mode.
+
+* Fix specialization for varargs function signatures.
+
+* Fix several compiler crashes.
+

Added: packages/cython/trunk/debian/patches/0001-keep-longness-when-folding-negative-integer-constant.patch
===================================================================
--- packages/cython/trunk/debian/patches/0001-keep-longness-when-folding-negative-integer-constant.patch	                        (rev 0)
+++ packages/cython/trunk/debian/patches/0001-keep-longness-when-folding-negative-integer-constant.patch	2012-12-06 19:51:06 UTC (rev 9292)
@@ -0,0 +1,72 @@
+From a89bf8567d2c54f38a5a3f4f8b8f9208db936d64 Mon Sep 17 00:00:00 2001
+From: Stefan Behnel <stefan_ml at behnel.de>
+Date: Tue, 27 Nov 2012 07:37:32 +0100
+Subject: [PATCH 1/6] keep longness when folding negative integer constants
+
+--HG--
+extra : transplant_source : %CC%EC%23%19%11%1A%22%FB%5C-%18%AD%0D%FC%24L%BD%81%91%FF
+---
+ Cython/Compiler/ExprNodes.py |  3 ++-
+ tests/run/int_literals.pyx   | 18 +++++++++++++++++-
+ 2 files changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
+index 13fc0ef..06fc30d 100755
+--- a/Cython/Compiler/ExprNodes.py
++++ b/Cython/Compiler/ExprNodes.py
+@@ -7290,7 +7290,8 @@ def unop_node(pos, operator, operand):
+     # Construct unnop node of appropriate class for
+     # given operator.
+     if isinstance(operand, IntNode) and operator == '-':
+-        return IntNode(pos = operand.pos, value = str(-Utils.str_to_number(operand.value)))
++        return IntNode(pos = operand.pos, value = str(-Utils.str_to_number(operand.value)),
++                       longness=operand.longness, unsigned=operand.unsigned)
+     elif isinstance(operand, UnopNode) and operand.operator == operator in '+-':
+         warning(pos, "Python has no increment/decrement operator: %s%sx == %s(%sx) == x" % ((operator,)*4), 5)
+     return unop_node_classes[operator](pos,
+diff --git a/tests/run/int_literals.pyx b/tests/run/int_literals.pyx
+index edc14af..770b60a 100644
+--- a/tests/run/int_literals.pyx
++++ b/tests/run/int_literals.pyx
+@@ -1,6 +1,8 @@
+ __doc__ = u"""
+ >>> c_longs()
+ (1, 1L, -1L, 18446744073709551615L)
++>>> negative_c_longs()
++(-1, -9223285636854775809L)
+ >>> py_longs()
+ (1, 1L, 100000000000000000000000000000000L, -100000000000000000000000000000000L)
+ 
+@@ -18,14 +20,28 @@ import sys
+ if sys.version_info[0] >= 3:
+     __doc__ = __doc__.replace(u'L', u'')
+ 
++ at cython.test_assert_path_exists(
++    '//IntNode[@longness = "LL"]',
++    '//IntNode[@longness = "L"]',
++    )
++ at cython.test_fail_if_path_exists('//IntNode[@longness = ""]')
+ def c_longs():
+     cdef long a = 1L
+     cdef unsigned long ua = 1UL
+     cdef long long aa = 0xFFFFFFFFFFFFFFFFLL
+     cdef unsigned long long uaa = 0xFFFFFFFFFFFFFFFFULL
+-
+     return a, ua, aa, uaa
+ 
++ at cython.test_assert_path_exists(
++    '//IntNode[@longness = "LL"]',
++    '//IntNode[@longness = "L"]',
++    )
++ at cython.test_fail_if_path_exists('//IntNode[@longness = ""]')
++def negative_c_longs():
++    cdef long a = -1L
++    cdef long long aa = -9223285636854775809LL
++    return a, aa
++
+ def py_longs():
+     return 1, 1L, 100000000000000000000000000000000, -100000000000000000000000000000000
+ 
+-- 
+1.8.0
+

Added: packages/cython/trunk/debian/patches/0003-Fix-compiler-crash.patch
===================================================================
--- packages/cython/trunk/debian/patches/0003-Fix-compiler-crash.patch	                        (rev 0)
+++ packages/cython/trunk/debian/patches/0003-Fix-compiler-crash.patch	2012-12-06 19:51:06 UTC (rev 9292)
@@ -0,0 +1,25 @@
+From c08ac4ed4a8f149d7cae86eb4b862bbb57a4b905 Mon Sep 17 00:00:00 2001
+From: Robert Bradshaw <robertwb at gmail.com>
+Date: Mon, 26 Nov 2012 23:54:50 -0800
+Subject: [PATCH 3/6] Fix compiler crash.
+
+---
+ Cython/Compiler/Nodes.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py
+index c4f9f0b..6ba0e12 100644
+--- a/Cython/Compiler/Nodes.py
++++ b/Cython/Compiler/Nodes.py
+@@ -828,7 +828,7 @@ class CSimpleBaseTypeNode(CBaseTypeNode):
+                 scope = env
+                 for item in self.module_path:
+                     entry = scope.lookup(item)
+-                    if entry.is_cpp_class:
++                    if entry is not None and entry.is_cpp_class:
+                         scope = entry.type.scope
+                     else:
+                         scope = None
+-- 
+1.8.0
+

Added: packages/cython/trunk/debian/patches/0005-fix-cimport-cython-in-string-code-fragments.patch
===================================================================
--- packages/cython/trunk/debian/patches/0005-fix-cimport-cython-in-string-code-fragments.patch	                        (rev 0)
+++ packages/cython/trunk/debian/patches/0005-fix-cimport-cython-in-string-code-fragments.patch	2012-12-06 19:51:06 UTC (rev 9292)
@@ -0,0 +1,25 @@
+From 37724cccf7258445d4d5b710519fbf4bcc2df7dc Mon Sep 17 00:00:00 2001
+From: Stefan Behnel <stefan_ml at behnel.de>
+Date: Wed, 28 Nov 2012 21:15:28 +0100
+Subject: [PATCH 5/6] fix 'cimport cython' in string code fragments
+
+---
+ Cython/Compiler/TreeFragment.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Cython/Compiler/TreeFragment.py b/Cython/Compiler/TreeFragment.py
+index 29ff12d..9832959 100644
+--- a/Cython/Compiler/TreeFragment.py
++++ b/Cython/Compiler/TreeFragment.py
+@@ -26,7 +26,7 @@ class StringParseContext(Main.Context):
+         self.module_name = name
+ 
+     def find_module(self, module_name, relative_to = None, pos = None, need_pxd = 1):
+-        if module_name != self.module_name:
++        if module_name not in (self.module_name, 'cython'):
+             raise AssertionError("Not yet supporting any cimports/includes from string code snippets")
+         return ModuleScope(module_name, parent_module = None, context = self)
+ 
+-- 
+1.8.0
+

Added: packages/cython/trunk/debian/patches/0006-fix-refnanny-code-for-del-statement-inside-of-genera.patch
===================================================================
--- packages/cython/trunk/debian/patches/0006-fix-refnanny-code-for-del-statement-inside-of-genera.patch	                        (rev 0)
+++ packages/cython/trunk/debian/patches/0006-fix-refnanny-code-for-del-statement-inside-of-genera.patch	2012-12-06 19:51:06 UTC (rev 9292)
@@ -0,0 +1,46 @@
+From 5827f4c9bcfe6b9030358727c1ca3197425e576e Mon Sep 17 00:00:00 2001
+From: Stefan Behnel <stefan_ml at behnel.de>
+Date: Fri, 30 Nov 2012 13:30:31 +0100
+Subject: [PATCH 6/6] fix refnanny code for del statement inside of generators
+
+---
+ Cython/Compiler/ExprNodes.py |  2 ++
+ tests/run/generators_py.py   | 12 ++++++++++++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
+index 06fc30d..df4bff7 100755
+--- a/Cython/Compiler/ExprNodes.py
++++ b/Cython/Compiler/ExprNodes.py
+@@ -1861,6 +1861,8 @@ class NameNode(AtomicExprNode):
+                     code.put_error_if_unbound(self.pos, self.entry)
+ 
+                 if self.entry.type.is_pyobject:
++                    if self.entry.in_closure:
++                        code.put_gotref(self.result()) # generator
+                     code.put_decref(self.result(), self.ctype())
+                     code.putln('%s = NULL;' % self.result())
+                 else:
+diff --git a/tests/run/generators_py.py b/tests/run/generators_py.py
+index f044eb1..3159d52 100644
+--- a/tests/run/generators_py.py
++++ b/tests/run/generators_py.py
+@@ -350,3 +350,15 @@ def test_generator_cleanup():
+         yield 1
+     finally:
+         print('cleanup')
++
++def test_del_in_generator():
++    """
++    >>> [ s for s in test_del_in_generator() ]
++    ['abcabcabc', 'abcabcabc']
++    """
++    x = len('abc') * 'abc'
++    a = x
++    yield x
++    del x
++    yield a
++    del a
+-- 
+1.8.0
+

Modified: packages/cython/trunk/debian/patches/series
===================================================================
--- packages/cython/trunk/debian/patches/series	2012-12-06 08:39:47 UTC (rev 9291)
+++ packages/cython/trunk/debian/patches/series	2012-12-06 19:51:06 UTC (rev 9292)
@@ -0,0 +1,4 @@
+0001-keep-longness-when-folding-negative-integer-constant.patch
+0003-Fix-compiler-crash.patch
+0005-fix-cimport-cython-in-string-code-fragments.patch
+0006-fix-refnanny-code-for-del-statement-inside-of-genera.patch




More information about the Python-apps-commits mailing list