Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-Cython0 for openSUSE:Factory 
checked in at 2024-02-06 16:32:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Cython0 (Old)
 and      /work/SRC/openSUSE:Factory/.python-Cython0.new.1815 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Cython0"

Tue Feb  6 16:32:40 2024 rev:3 rq:1144125 version:0.29.37

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Cython0/python-Cython0.changes    
2024-01-05 22:59:20.073716217 +0100
+++ /work/SRC/openSUSE:Factory/.python-Cython0.new.1815/python-Cython0.changes  
2024-02-06 16:32:47.311214730 +0100
@@ -1,0 +2,16 @@
+Sun Feb  4 15:27:06 UTC 2024 - Frank Schreiner <[email protected]>
+
+- update to version 0.29.37
+  * Fix a potential crash while cleaning up subtypes of externally 
+    imported extension types when terminating Python.
+    This was introduced in Cython 0.29.35.
+  * Fix a ``complex`` related compile error on Windows.
+    (Github issue :issue:`5512`)
+
+  * Compiling fused types used in pxd files could crash Cython in
+    Python 3.11+. (Github issues :issue:`5894`, :issue:`5588`)
+
+  * ``cythonize`` failed to consider the ``CYTHON_FORCE_REGEN`` env variable.
+    Patch by Harmen Stoppels.  (Github issue :issue:`5712`)
+
+-------------------------------------------------------------------

Old:
----
  Cython-0.29.36.tar.gz

New:
----
  Cython-0.29.37.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Cython0.spec ++++++
--- /var/tmp/diff_new_pack.IMX2bk/_old  2024-02-06 16:32:50.023313461 +0100
+++ /var/tmp/diff_new_pack.IMX2bk/_new  2024-02-06 16:32:50.043314189 +0100
@@ -19,7 +19,7 @@
 %{?sle15_python_module_pythons}
 %bcond_with test
 Name:           python-Cython0
-Version:        0.29.36
+Version:        0.29.37
 Release:        0
 Summary:        The Cython compiler for writing C extensions for the Python 
language
 License:        Apache-2.0
@@ -39,7 +39,7 @@
 Requires:       python-devel
 Requires:       python-xml
 Requires(post): update-alternatives
-Requires(postun):update-alternatives
+Requires(postun): update-alternatives
 %python_subpackages
 
 %description

++++++ Cython-0.29.36.tar.gz -> Cython-0.29.37.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/.gitrev new/Cython-0.29.37/.gitrev
--- old/Cython-0.29.36/.gitrev  2023-07-04 21:20:42.912309200 +0200
+++ new/Cython-0.29.37/.gitrev  2023-12-19 09:58:55.113947600 +0100
@@ -1 +1 @@
-702bbc80fe2e346c4ddc58f074e0054da56e0ced
+1586ba7dc53549c30b8beeb16bef38942bff5569
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/CHANGES.rst 
new/Cython-0.29.37/CHANGES.rst
--- old/Cython-0.29.36/CHANGES.rst      2023-07-04 21:20:38.236224400 +0200
+++ new/Cython-0.29.37/CHANGES.rst      2023-12-19 09:58:51.389988700 +0100
@@ -2,6 +2,25 @@
 Cython Changelog
 ================
 
+0.29.37 (2023-12-18)
+====================
+
+Bugs fixed
+----------
+
+* Fix a potential crash while cleaning up subtypes of externally imported 
extension
+  types when terminating Python.  This was introduced in Cython 0.29.35.
+
+* Fix a ``complex`` related compile error on Windows.
+  (Github issue :issue:`5512`)
+
+* Compiling fused types used in pxd files could crash Cython in Python 3.11+.
+  (Github issues :issue:`5894`, :issue:`5588`)
+
+* ``cythonize`` failed to consider the ``CYTHON_FORCE_REGEN`` env variable.
+  Patch by Harmen Stoppels.  (Github issue :issue:`5712`)
+
+
 0.29.36 (2023-07-04)
 ====================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/Cython/Build/Dependencies.py 
new/Cython-0.29.37/Cython/Build/Dependencies.py
--- old/Cython-0.29.36/Cython/Build/Dependencies.py     2023-07-04 
21:20:38.236224400 +0200
+++ new/Cython-0.29.37/Cython/Build/Dependencies.py     2023-12-19 
09:58:51.389988700 +0100
@@ -878,7 +878,7 @@
 
 
 # This is the user-exposed entry point.
-def cythonize(module_list, exclude=None, nthreads=0, aliases=None, 
quiet=False, force=False, language=None,
+def cythonize(module_list, exclude=None, nthreads=0, aliases=None, 
quiet=False, force=None, language=None,
               exclude_failures=False, **options):
     """
     Compile a set of source modules into C/C++ files and return a list of 
distutils
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/Cython/Compiler/FusedNode.py 
new/Cython-0.29.37/Cython/Compiler/FusedNode.py
--- old/Cython-0.29.36/Cython/Compiler/FusedNode.py     2023-07-04 
21:20:38.240224400 +0200
+++ new/Cython-0.29.37/Cython/Compiler/FusedNode.py     2023-12-19 
09:58:51.393988600 +0100
@@ -190,12 +190,11 @@
                 break
 
         # replace old entry with new entries
-        try:
+        if self.node.entry in env.cfunc_entries:
             cindex = env.cfunc_entries.index(self.node.entry)
-        except ValueError:
-            env.cfunc_entries.extend(new_cfunc_entries)
-        else:
             env.cfunc_entries[cindex:cindex+1] = new_cfunc_entries
+        else:
+            env.cfunc_entries.extend(new_cfunc_entries)
 
         if orig_py_func:
             self.py_func = self.make_fused_cpdef(orig_py_func, env,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/Cython/Compiler/ModuleNode.py 
new/Cython-0.29.37/Cython/Compiler/ModuleNode.py
--- old/Cython-0.29.36/Cython/Compiler/ModuleNode.py    2023-07-04 
21:20:38.240224400 +0200
+++ new/Cython-0.29.37/Cython/Compiler/ModuleNode.py    2023-12-19 
09:58:51.393988600 +0100
@@ -1509,7 +1509,10 @@
                 if base_type.scope and base_type.scope.needs_gc():
                     code.putln("PyObject_GC_Track(o);")
                 else:
-                    code.putln("if (PyType_IS_GC(%s)) PyObject_GC_Track(o);" % 
base_cname)
+                    # Need to check type pointer, see comment on dealloc call 
below.
+                    code.putln("if (%sPyType_IS_GC(%s)) PyObject_GC_Track(o);" 
% (
+                        "" if base_type.is_builtin_type else "likely(%s) && " 
% base_cname,
+                        base_cname))
 
             tp_dealloc = TypeSlots.get_base_slot_function(scope, tp_slot)
             if tp_dealloc is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/Cython/Compiler/PyrexTypes.py 
new/Cython-0.29.37/Cython/Compiler/PyrexTypes.py
--- old/Cython-0.29.36/Cython/Compiler/PyrexTypes.py    2023-07-04 
21:20:38.248224500 +0200
+++ new/Cython-0.29.37/Cython/Compiler/PyrexTypes.py    2023-12-19 
09:58:51.401988500 +0100
@@ -2889,7 +2889,12 @@
         if self.is_overridable:
             arg_decl_list.append("int %s" % Naming.skip_dispatch_cname)
         if self.optional_arg_count:
-            
arg_decl_list.append(self.op_arg_struct.declaration_code(Naming.optional_args_cname))
+            if self.op_arg_struct:
+                
arg_decl_list.append(self.op_arg_struct.declaration_code(Naming.optional_args_cname))
+            else:
+                # op_arg_struct may not be initialized at this point if this 
class is being used
+                # to prepare a Python error message or similar.  In this case, 
just omit the args.
+                assert for_display
         if self.has_varargs:
             arg_decl_list.append("...")
         arg_decl_code = ", ".join(arg_decl_list)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/Cython/Shadow.py 
new/Cython-0.29.37/Cython/Shadow.py
--- old/Cython-0.29.36/Cython/Shadow.py 2023-07-04 21:20:38.256224600 +0200
+++ new/Cython-0.29.37/Cython/Shadow.py 2023-12-19 09:58:51.409988400 +0100
@@ -1,7 +1,7 @@
 # cython.* namespace for pure mode.
 from __future__ import absolute_import
 
-__version__ = "0.29.36"
+__version__ = "0.29.37"
 
 try:
     from __builtin__ import basestring
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/Cython/Shadow.pyi 
new/Cython-0.29.37/Cython/Shadow.pyi
--- old/Cython-0.29.36/Cython/Shadow.pyi        1970-01-01 01:00:00.000000000 
+0100
+++ new/Cython-0.29.37/Cython/Shadow.pyi        2023-12-19 09:58:51.409988400 
+0100
@@ -0,0 +1,102 @@
+from builtins import (int as py_int, float as py_float,
+                      bool as py_bool, str as py_str, complex as py_complex)
+from typing import (Union, Dict, Any, Sequence, Optional,
+                    List, TypeVar, Type, Generic)
+
+int = py_int
+long = py_int
+longlong = py_int
+short = py_int
+char = py_int
+sint = py_int
+slong = py_int
+slonglong = py_int
+sshort = py_int
+schar = py_int
+uint = py_int
+ulong = py_int
+ulonglong = py_int
+ushort = py_int
+uchar = py_int
+size_t = py_int
+Py_ssize_t = py_int
+Py_UCS4 = Union[py_int, str]
+Py_UNICODE = Union[py_int, str]
+float = py_float
+double = py_float
+longdouble = py_float
+complex = py_complex
+floatcomplex = py_complex
+doublecomplex = py_complex
+longdoublecomplex = py_complex
+bint = py_bool
+void = Union[None]
+basestring = py_str
+unicode = py_str
+
+gs: Dict[str, Any]  # Should match the return type of globals()
+
+_T = TypeVar('_T')
+
+class _ArrayType(object, Generic[_T]):
+    is_array: bool
+    subtypes: Sequence[str]
+    dtype: _T
+    ndim: int
+    is_c_contig: bool
+    is_f_contig: bool
+    inner_contig: bool
+    broadcasting: Any
+
+    # broadcasting is not used, so it's not clear about its type
+    def __init__(self, dtype: _T, ndim: int, is_c_contig: bool = ...,
+                 is_f_contig: bool = ..., inner_contig: bool = ...,
+                 broadcasting: Any = ...) -> None: ...
+    def __repr__(self) -> str: ...
+
+class CythonTypeObject(object):
+    ...
+
+class CythonType(CythonTypeObject):
+    ...
+
+class PointerType(CythonType, Generic[_T]):
+    def __init__(
+        self,
+        value: Optional[Union[ArrayType[_T], PointerType[_T], List[_T], int]] 
= ...
+    ) -> None: ...
+    def __getitem__(self, ix: int) -> _T: ...
+    def __setitem__(self, ix: int, value: _T) -> None: ...
+    def __eq__(self, value: object) -> bool: ...
+    def __repr__(self) -> str: ...
+
+class ArrayType(PointerType[_T]):
+    def __init__(self) -> None: ...
+
+#class StructType(CythonType, Generic[_T]):
+#    def __init__(
+#        self,
+#        value: List[Type[_T]] = ...
+#    ) -> None: ...
+
+def index_type(
+    base_type: _T, item: Union[tuple, slice, int]) -> _ArrayType[_T]: ...
+
+def pointer(basetype: _T) -> Type[PointerType[_T]]: ...
+
+def array(basetype: _T, n: int) -> Type[ArrayType[_T]]: ...
+
+#def struct(basetype: _T) -> Type[StructType[_T]]: ...
+
+class typedef(CythonType, Generic[_T]):
+    name: str
+
+    def __init__(self, type: _T, name: Optional[str] = ...) -> None: ...
+    def __call__(self, *arg: Any) -> _T: ...
+    def __repr__(self) -> str: ...
+    __getitem__ = index_type
+
+#class _FusedType(CythonType, Generic[_T]):
+#    def __init__(self) -> None: ...
+
+#def fused_type(*args: Tuple[_T]) -> Type[FusedType[_T]]: ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/Cython/Utility/Complex.c 
new/Cython-0.29.37/Cython/Utility/Complex.c
--- old/Cython-0.29.36/Cython/Utility/Complex.c 2023-07-04 21:20:38.256224600 
+0200
+++ new/Cython-0.29.37/Cython/Utility/Complex.c 2023-12-19 09:58:51.413988400 
+0100
@@ -4,7 +4,8 @@
 #if !defined(CYTHON_CCOMPLEX)
   #if defined(__cplusplus)
     #define CYTHON_CCOMPLEX 1
-  #elif defined(_Complex_I)
+  #elif (defined(_Complex_I) && !defined(_MSC_VER))
+    // MSVC defines "_Complex_I" but not "_Complex". See 
https://github.com/cython/cython/issues/5512
     #define CYTHON_CCOMPLEX 1
   #else
     #define CYTHON_CCOMPLEX 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/PKG-INFO new/Cython-0.29.37/PKG-INFO
--- old/Cython-0.29.36/PKG-INFO 2023-07-04 21:20:48.884419000 +0200
+++ new/Cython-0.29.37/PKG-INFO 2023-12-19 09:58:59.957894600 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Cython
-Version: 0.29.36
+Version: 0.29.37
 Summary: The Cython compiler for writing C extensions for the Python language.
 Home-page: http://cython.org/
 Author: Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/Tools/ci-run.sh 
new/Cython-0.29.37/Tools/ci-run.sh
--- old/Cython-0.29.36/Tools/ci-run.sh  2023-07-04 21:20:38.264224800 +0200
+++ new/Cython-0.29.37/Tools/ci-run.sh  2023-12-19 09:58:51.417988300 +0100
@@ -31,6 +31,11 @@
   echo "Setting up macos compiler"
   export CC="clang -Wno-deprecated-declarations"
   export CXX="clang++ -stdlib=libc++ -Wno-deprecated-declarations"
+
+  if [[ $PYTHON_VERSION == "2.7"* ]]; then
+    # make sure we find Python 2.7 before Python 3.x
+    export PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH
+  fi
 else
   echo "No setup specified for $OSTYPE"
 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/runtests.py 
new/Cython-0.29.37/runtests.py
--- old/Cython-0.29.36/runtests.py      2023-07-04 21:20:38.276225000 +0200
+++ new/Cython-0.29.37/runtests.py      2023-12-19 09:58:51.433988300 +0100
@@ -1825,7 +1825,8 @@
                 "paths", "test",
             ])
         except subprocess.CalledProcessError as err:
-            print(err.output.decode())
+            if err.output:
+                print(err.output.decode())
             raise
         self.assertTrue(True)  # :)
 
@@ -2334,12 +2335,21 @@
             options.with_refnanny = False
 
     if options.with_refnanny:
-        from pyximport.pyxbuild import pyx_to_dll
-        libpath = pyx_to_dll(os.path.join("Cython", "Runtime", "refnanny.pyx"),
-                             build_in_temp=True,
-                             pyxbuild_dir=os.path.join(WORKDIR, "support"))
-        sys.path.insert(0, os.path.split(libpath)[0])
-        CDEFS.append(('CYTHON_REFNANNY', '1'))
+        try:
+            import Cython.Runtime.refnanny
+            CDEFS.append(('CYTHON_REFNANNY', '1'))
+        except ImportError:
+            if sys.version_info < (3, 12):
+                # pyximport requires 'distutils' and 'imp'
+                from pyximport.pyxbuild import pyx_to_dll
+                libpath = pyx_to_dll(os.path.join("Cython", "Runtime", 
"refnanny.pyx"),
+                                     build_in_temp=True,
+                                     pyxbuild_dir=os.path.join(WORKDIR, 
"support"))
+                sys.path.insert(0, os.path.split(libpath)[0])
+                CDEFS.append(('CYTHON_REFNANNY', '1'))
+            else:
+                sys.stderr.write("Disabling refnanny in recent CPython\n")
+                options.with_refnanny = False
 
     if xml_output_dir and options.fork:
         # doesn't currently work together
@@ -2555,7 +2565,10 @@
             sys.stderr.write("   %s\n" % test)
 
     if options.with_refnanny:
-        import refnanny
+        try:
+            from Cython.Runtime import refnanny
+        except ImportError:
+            import refnanny
         sys.stderr.write("\n".join([repr(x) for x in refnanny.reflog]))
 
     result_code = 0 if options.exit_ok else not result.wasSuccessful()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/tests/run/fused_cpdef.pxd 
new/Cython-0.29.37/tests/run/fused_cpdef.pxd
--- old/Cython-0.29.36/tests/run/fused_cpdef.pxd        1970-01-01 
01:00:00.000000000 +0100
+++ new/Cython-0.29.37/tests/run/fused_cpdef.pxd        2023-12-19 
09:58:51.477987800 +0100
@@ -0,0 +1,4 @@
+cimport cython
+
+cdef class C:
+    cpdef object has_default_struct(self, cython.floating x, a=?)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cython-0.29.36/tests/run/fused_cpdef.pyx 
new/Cython-0.29.37/tests/run/fused_cpdef.pyx
--- old/Cython-0.29.36/tests/run/fused_cpdef.pyx        2023-07-04 
21:20:38.308225600 +0200
+++ new/Cython-0.29.37/tests/run/fused_cpdef.pyx        2023-12-19 
09:58:51.477987800 +0100
@@ -104,3 +104,16 @@
     multiarg[int, float](1, 2.0)
     multiarg[cy.int, cy.float](1, 2.0)
     multiarg(4, 5.0)
+
+cdef class C:
+    cpdef object has_default_struct(self, cython.floating x, a=None):
+        return x, a
+
+# https://github.com/cython/cython/issues/5588
+# On some Python versions this was causing a compiler crash
+def test_call_has_default_struct(C c, double x):
+    """
+    >>> test_call_has_default_struct(C(), 5.)
+    (5.0, None)
+    """
+    return c.has_default_struct(x)

Reply via email to