Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-Cython for openSUSE:Factory checked in at 2023-05-29 22:47:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Cython (Old) and /work/SRC/openSUSE:Factory/.python-Cython.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Cython" Mon May 29 22:47:31 2023 rev:71 rq:1089349 version:0.29.35 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Cython/python-Cython.changes 2023-04-22 22:03:33.366326920 +0200 +++ /work/SRC/openSUSE:Factory/.python-Cython.new.1533/python-Cython.changes 2023-05-29 22:47:33.814226986 +0200 @@ -1,0 +2,22 @@ +Sat May 27 21:05:03 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 0.29.35: + * A garbage collection enabled subtype of a non-GC extension + type could call into the deallocation function of the + super type with GC tracking enabled. This could lead + to crashes during deallocation if GC was triggered on the + type at the same time. + * Some C compile failures and crashes in CPython 3.12 were + resolved. + * ``except + nogil`` was syntactically not allowed. + * ``except +nogil`` (i.e. defining a C++ exception handling + function called ``nogil``) is now disallowed to prevent typos. + * A C compile failure in PyPy 3.10 was resolved. + * Cython modules now use PEP-489 multi-phase init by default in + PyPy 3.9 and later. + * API header files generated by different Cython versions can + now be included in the same C file. + * Function signatures containing a type like `tuple[()]` could + not be printed. + +------------------------------------------------------------------- Old: ---- Cython-0.29.34.tar.gz New: ---- Cython-0.29.35.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Cython.spec ++++++ --- /var/tmp/diff_new_pack.e6l3JN/_old 2023-05-29 22:47:34.282229510 +0200 +++ /var/tmp/diff_new_pack.e6l3JN/_new 2023-05-29 22:47:34.286229531 +0200 @@ -19,7 +19,7 @@ %bcond_with test %{?sle15_python_module_pythons} Name: python-Cython -Version: 0.29.34 +Version: 0.29.35 Release: 0 Summary: The Cython compiler for writing C extensions for the Python language License: Apache-2.0 ++++++ Cython-0.29.34.tar.gz -> Cython-0.29.35.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/.gitrev new/Cython-0.29.35/.gitrev --- old/Cython-0.29.34/.gitrev 2023-04-02 15:27:09.005781200 +0200 +++ new/Cython-0.29.35/.gitrev 2023-05-24 11:02:18.397117600 +0200 @@ -1 +1 @@ -81cc29aedc0d0df69e81812cb8321cc0bcf41065 +5cef4fa97285b32d1e7d78c57398c464106d14ab diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/CHANGES.rst new/Cython-0.29.35/CHANGES.rst --- old/Cython-0.29.34/CHANGES.rst 2023-04-02 15:27:02.281669100 +0200 +++ new/Cython-0.29.35/CHANGES.rst 2023-05-24 11:02:13.470214800 +0200 @@ -2,6 +2,38 @@ Cython Changelog ================ +0.29.35 (2023-05-24) +==================== + +Bugs fixed +---------- + +* A garbage collection enabled subtype of a non-GC extension type could call into the + deallocation function of the super type with GC tracking enabled. This could lead + to crashes during deallocation if GC was triggered on the type at the same time. + (Github issue :issue:`5432`) + +* Some C compile failures and crashes in CPython 3.12 were resolved. + +* ``except + nogil`` was syntactically not allowed. + ``except +nogil`` (i.e. defining a C++ exception handling function called ``nogil``) + is now disallowed to prevent typos. + (Github issue :issue:`5430`) + +* A C compile failure in PyPy 3.10 was resolved. + Patch by Matti Picus. (Github issue :issue:`5408`) + +* Cython modules now use PEP-489 multi-phase init by default in PyPy 3.9 and later. + Original patch by Matti Picus. (Github issue :issue:`5413`) + +* API header files generated by different Cython versions can now be included in the + same C file. + (Github issue :issue:`5383`) + +* Function signatures containing a type like `tuple[()]` could not be printed. + Patch by Lisandro Dalcin. (Github issue :issue:`5355`) + + 0.29.34 (2023-04-02) ==================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/Cython/CodeWriter.py new/Cython-0.29.35/Cython/CodeWriter.py --- old/Cython-0.29.34/Cython/CodeWriter.py 2023-04-02 15:27:02.281669100 +0200 +++ new/Cython-0.29.35/Cython/CodeWriter.py 2023-05-24 11:02:13.470214800 +0200 @@ -678,7 +678,10 @@ self.visit(node.base) self.put(u"[") if isinstance(node.index, TupleNode): - self.emit_sequence(node.index) + if node.index.subexpr_nodes(): + self.emit_sequence(node.index) + else: + self.put(u"()") else: self.visit(node.index) self.put(u"]") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/Cython/Compiler/ModuleNode.py new/Cython-0.29.35/Cython/Compiler/ModuleNode.py --- old/Cython-0.29.34/Cython/Compiler/ModuleNode.py 2023-04-02 15:27:02.289669300 +0200 +++ new/Cython-0.29.35/Cython/Compiler/ModuleNode.py 2023-05-24 11:02:13.478204000 +0200 @@ -293,14 +293,14 @@ cname = env.mangle(Naming.func_prefix_api, entry.name) sig = entry.type.signature_string() h_code.putln( - 'if (__Pyx_ImportFunction(module, "%s", (void (**)(void))&%s, "%s") < 0) goto bad;' - % (entry.name, cname, sig)) + 'if (__Pyx_ImportFunction_%s(module, "%s", (void (**)(void))&%s, "%s") < 0) goto bad;' + % (Naming.cyversion, entry.name, cname, sig)) for entry in api_vars: cname = env.mangle(Naming.varptr_prefix_api, entry.name) sig = entry.type.empty_declaration_code() h_code.putln( - 'if (__Pyx_ImportVoidPtr(module, "%s", (void **)&%s, "%s") < 0) goto bad;' - % (entry.name, cname, sig)) + 'if (__Pyx_ImportVoidPtr_%s(module, "%s", (void **)&%s, "%s") < 0) goto bad;' + % (Naming.cyversion, entry.name, cname, sig)) with ModuleImportGenerator(h_code, imported_modules={env.qualified_name: 'module'}) as import_generator: for entry in api_extension_types: self.generate_type_import_call(entry.type, h_code, import_generator, error_code="goto bad;") @@ -1502,28 +1502,25 @@ have_gil=True) if base_type: + base_cname = base_type.typeptr_cname if needs_gc: # The base class deallocator probably expects this to be tracked, # so undo the untracking above. if base_type.scope and base_type.scope.needs_gc(): code.putln("PyObject_GC_Track(o);") else: - code.putln("#if CYTHON_USE_TYPE_SLOTS") - code.putln("if (PyType_IS_GC(Py_TYPE(o)->tp_base))") - code.putln("#endif") - code.putln("PyObject_GC_Track(o);") + code.putln("if (PyType_IS_GC(%s)) PyObject_GC_Track(o);" % base_cname) tp_dealloc = TypeSlots.get_base_slot_function(scope, tp_slot) if tp_dealloc is not None: code.putln("%s(o);" % tp_dealloc) elif base_type.is_builtin_type: - code.putln("%s->tp_dealloc(o);" % base_type.typeptr_cname) + code.putln("%s->tp_dealloc(o);" % base_cname) else: # This is an externally defined type. Calling through the # cimported base type pointer directly interacts badly with # the module cleanup, which may already have cleared it. # In that case, fall back to traversing the type hierarchy. - base_cname = base_type.typeptr_cname code.putln("if (likely(%s)) %s->tp_dealloc(o); " "else __Pyx_call_next_tp_dealloc(o, %s);" % ( base_cname, base_cname, slot_func_cname)) @@ -2957,7 +2954,8 @@ cname = module.mangle(Naming.varptr_prefix, entry.name) signature = entry.type.empty_declaration_code() code.putln( - 'if (__Pyx_ImportVoidPtr(%s, "%s", (void **)&%s, "%s") < 0) %s' % ( + 'if (__Pyx_ImportVoidPtr_%s(%s, "%s", (void **)&%s, "%s") < 0) %s' % ( + Naming.cyversion, temp, entry.name, cname, signature, code.error_goto(self.pos))) code.put_decref_clear(temp, py_object_type) @@ -2982,7 +2980,8 @@ code.put_gotref(temp) for entry in entries: code.putln( - 'if (__Pyx_ImportFunction(%s, "%s", (void (**)(void))&%s, "%s") < 0) %s' % ( + 'if (__Pyx_ImportFunction_%s(%s, "%s", (void (**)(void))&%s, "%s") < 0) %s' % ( + Naming.cyversion, temp, entry.name, entry.cname, @@ -3059,8 +3058,9 @@ error_code = code.error_goto(error_pos) module = import_generator.imported_module(module_name, error_code) - code.put('%s = __Pyx_ImportType(%s, %s,' % ( + code.put('%s = __Pyx_ImportType_%s(%s, %s,' % ( type.typeptr_cname, + Naming.cyversion, module, module_name)) @@ -3078,12 +3078,15 @@ if not condition: code.putln("") # start in new line code.putln("#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000") - code.putln('sizeof(%s), __PYX_GET_STRUCT_ALIGNMENT(%s),' % (objstruct, objstruct)) + code.putln('sizeof(%s), __PYX_GET_STRUCT_ALIGNMENT_%s(%s),' % ( + objstruct, Naming.cyversion, objstruct)) code.putln("#else") - code.putln('sizeof(%s), __PYX_GET_STRUCT_ALIGNMENT(%s),' % (sizeof_objstruct, sizeof_objstruct)) + code.putln('sizeof(%s), __PYX_GET_STRUCT_ALIGNMENT_%s(%s),' % ( + sizeof_objstruct, Naming.cyversion, sizeof_objstruct)) code.putln("#endif") else: - code.putln('sizeof(%s), __PYX_GET_STRUCT_ALIGNMENT(%s),' % (objstruct, objstruct)) + code.put('sizeof(%s), __PYX_GET_STRUCT_ALIGNMENT_%s(%s),' % ( + objstruct, Naming.cyversion, objstruct)) # check_size if type.check_size and type.check_size in ('error', 'warn', 'ignore'): @@ -3093,7 +3096,8 @@ else: raise RuntimeError("invalid value for check_size '%s' when compiling %s.%s" % ( type.check_size, module_name, type.name)) - code.putln('__Pyx_ImportType_CheckSize_%s);' % check_size.title()) + code.put('__Pyx_ImportType_CheckSize_%s_%s);' % ( + check_size.title(), Naming.cyversion)) code.putln(' if (!%s) %s' % (type.typeptr_cname, error_code)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/Cython/Compiler/Naming.py new/Cython-0.29.35/Cython/Compiler/Naming.py --- old/Cython-0.29.34/Cython/Compiler/Naming.py 2023-04-02 15:27:02.289669300 +0200 +++ new/Cython-0.29.35/Cython/Compiler/Naming.py 2023-05-24 11:02:13.478204000 +0200 @@ -5,8 +5,10 @@ # Prefixes for generating C names. # Collected here to facilitate ensuring uniqueness. # +from .. import __version__ pyrex_prefix = "__pyx_" +cyversion = __version__.replace('.', '_') codewriter_temp_prefix = pyrex_prefix + "t_" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/Cython/Compiler/Parsing.py new/Cython-0.29.35/Cython/Compiler/Parsing.py --- old/Cython-0.29.34/Cython/Compiler/Parsing.py 2023-04-02 15:27:02.293669500 +0200 +++ new/Cython-0.29.35/Cython/Compiler/Parsing.py 2023-05-24 11:02:13.482198700 +0200 @@ -2953,11 +2953,18 @@ s.next() elif s.sy == '+': exc_check = '+' + plus_char_pos = s.position()[2] s.next() if s.sy == 'IDENT': name = s.systring - s.next() - exc_val = p_name(s, name) + if name == 'nogil': + if s.position()[2] == plus_char_pos + 1: + error(s.position(), + "'except +nogil' defines an exception handling function. Use 'except + nogil' for the 'nogil' modifier.") + # 'except + nogil' is parsed outside + else: + exc_val = p_name(s, name) + s.next() elif s.sy == '*': exc_val = ExprNodes.CharNode(s.position(), value=u'*') s.next() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/Cython/Compiler/TypeSlots.py new/Cython-0.29.35/Cython/Compiler/TypeSlots.py --- old/Cython-0.29.34/Cython/Compiler/TypeSlots.py 2023-04-02 15:27:02.297669400 +0200 +++ new/Cython-0.29.35/Cython/Compiler/TypeSlots.py 2023-05-24 11:02:13.482198700 +0200 @@ -906,7 +906,7 @@ EmptySlot("tp_vectorcall", ifdef="PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)"), EmptySlot("tp_print", ifdef="PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000"), # PyPy specific extension - only here to avoid C compiler warnings. - EmptySlot("tp_pypy_flags", ifdef="CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000"), + EmptySlot("tp_pypy_flags", ifdef="CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000"), ) #------------------------------------------------------------------------------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/Cython/Shadow.py new/Cython-0.29.35/Cython/Shadow.py --- old/Cython-0.29.34/Cython/Shadow.py 2023-04-02 15:27:02.309669700 +0200 +++ new/Cython-0.29.35/Cython/Shadow.py 2023-05-24 11:02:13.490188100 +0200 @@ -1,7 +1,7 @@ # cython.* namespace for pure mode. from __future__ import absolute_import -__version__ = "0.29.34" +__version__ = "0.29.35" try: from __builtin__ import basestring diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/Cython/Utility/AsyncGen.c new/Cython-0.29.35/Cython/Utility/AsyncGen.c --- old/Cython-0.29.34/Cython/Utility/AsyncGen.c 2023-04-02 15:27:02.309669700 +0200 +++ new/Cython-0.29.35/Cython/Utility/AsyncGen.c 2023-05-24 11:02:13.490188100 +0200 @@ -430,7 +430,10 @@ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 +#if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; @@ -671,7 +674,10 @@ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 +#if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; @@ -789,7 +795,10 @@ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 +#if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; @@ -1080,7 +1089,10 @@ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 +#if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/Cython/Utility/Coroutine.c new/Cython-0.29.35/Cython/Utility/Coroutine.c --- old/Cython-0.29.34/Cython/Utility/Coroutine.c 2023-04-02 15:27:02.309669700 +0200 +++ new/Cython-0.29.35/Cython/Utility/Coroutine.c 2023-05-24 11:02:13.494182800 +0200 @@ -186,7 +186,7 @@ #endif #if CYTHON_COMPILING_IN_CPYTHON && defined(CO_ITERABLE_COROUTINE) #if PY_VERSION_HEX >= 0x030C00A6 - if (PyGen_CheckExact(obj) && (PyGen_GetCode(obj)->co_flags & CO_ITERABLE_COROUTINE)) { + if (PyGen_CheckExact(obj) && (PyGen_GetCode((PyGenObject*)obj)->co_flags & CO_ITERABLE_COROUTINE)) { #else if (PyGen_CheckExact(obj) && ((PyGenObject*)obj)->gi_code && ((PyCodeObject *)((PyGenObject*)obj)->gi_code)->co_flags & CO_ITERABLE_COROUTINE) { #endif @@ -1573,7 +1573,10 @@ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 +#if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; @@ -1736,7 +1739,10 @@ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 +#if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; @@ -1850,7 +1856,10 @@ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 +#if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; @@ -1961,7 +1970,10 @@ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 +#if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/Cython/Utility/CythonFunction.c new/Cython-0.29.35/Cython/Utility/CythonFunction.c --- old/Cython-0.29.34/Cython/Utility/CythonFunction.c 2023-04-02 15:27:02.309669700 +0200 +++ new/Cython-0.29.35/Cython/Utility/CythonFunction.c 2023-05-24 11:02:13.494182800 +0200 @@ -747,7 +747,10 @@ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 +#if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; @@ -1279,7 +1282,10 @@ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 +#if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/Cython/Utility/ImportExport.c new/Cython-0.29.35/Cython/Utility/ImportExport.c --- old/Cython-0.29.34/Cython/Utility/ImportExport.c 2023-04-02 15:27:02.313669700 +0200 +++ new/Cython-0.29.35/Cython/Utility/ImportExport.c 2023-05-24 11:02:13.494182800 +0200 @@ -8,7 +8,6 @@ #endif #endif - /////////////// Import.proto /////////////// static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ @@ -297,37 +296,39 @@ /////////////// TypeImport.proto /////////////// +//@substitute: naming -#ifndef __PYX_HAVE_RT_ImportType_proto -#define __PYX_HAVE_RT_ImportType_proto +#ifndef __PYX_HAVE_RT_ImportType_proto_$cyversion +#define __PYX_HAVE_RT_ImportType_proto_$cyversion #if __STDC_VERSION__ >= 201112L #include <stdalign.h> #endif #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L -#define __PYX_GET_STRUCT_ALIGNMENT(s) alignof(s) +#define __PYX_GET_STRUCT_ALIGNMENT_$cyversion(s) alignof(s) #else // best guess at what the alignment could be since we can't measure it -#define __PYX_GET_STRUCT_ALIGNMENT(s) sizeof(void*) +#define __PYX_GET_STRUCT_ALIGNMENT_$cyversion(s) sizeof(void*) #endif -enum __Pyx_ImportType_CheckSize { - __Pyx_ImportType_CheckSize_Error = 0, - __Pyx_ImportType_CheckSize_Warn = 1, - __Pyx_ImportType_CheckSize_Ignore = 2 +enum __Pyx_ImportType_CheckSize_$cyversion { + __Pyx_ImportType_CheckSize_Error_$cyversion = 0, + __Pyx_ImportType_CheckSize_Warn_$cyversion = 1, + __Pyx_ImportType_CheckSize_Ignore_$cyversion = 2 }; -static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize check_size); /*proto*/ +static PyTypeObject *__Pyx_ImportType_$cyversion(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_$cyversion check_size); /*proto*/ #endif /////////////// TypeImport /////////////// +//@substitute: naming -#ifndef __PYX_HAVE_RT_ImportType -#define __PYX_HAVE_RT_ImportType -static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, - size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize check_size) +#ifndef __PYX_HAVE_RT_ImportType_$cyversion +#define __PYX_HAVE_RT_ImportType_$cyversion +static PyTypeObject *__Pyx_ImportType_$cyversion(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_$cyversion check_size) { PyObject *result = 0; char warning[200]; @@ -387,14 +388,14 @@ module_name, class_name, size, basicsize); goto bad; } - if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + if (check_size == __Pyx_ImportType_CheckSize_Error_$cyversion && (size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); goto bad; } - else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + else if (check_size == __Pyx_ImportType_CheckSize_Warn_$cyversion && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", @@ -410,15 +411,16 @@ #endif /////////////// FunctionImport.proto /////////////// +//@substitute: naming -static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/ +static int __Pyx_ImportFunction_$cyversion(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/ /////////////// FunctionImport /////////////// //@substitute: naming -#ifndef __PYX_HAVE_RT_ImportFunction -#define __PYX_HAVE_RT_ImportFunction -static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { +#ifndef __PYX_HAVE_RT_ImportFunction_$cyversion +#define __PYX_HAVE_RT_ImportFunction_$cyversion +static int __Pyx_ImportFunction_$cyversion(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { @@ -515,15 +517,16 @@ } /////////////// VoidPtrImport.proto /////////////// +//@substitute: naming -static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig); /*proto*/ +static int __Pyx_ImportVoidPtr_$cyversion(PyObject *module, const char *name, void **p, const char *sig); /*proto*/ /////////////// VoidPtrImport /////////////// //@substitute: naming -#ifndef __PYX_HAVE_RT_ImportVoidPtr -#define __PYX_HAVE_RT_ImportVoidPtr -static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig) { +#ifndef __PYX_HAVE_RT_ImportVoidPtr_$cyversion +#define __PYX_HAVE_RT_ImportVoidPtr_$cyversion +static int __Pyx_ImportVoidPtr_$cyversion(PyObject *module, const char *name, void **p, const char *sig) { PyObject *d = 0; PyObject *cobj = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/Cython/Utility/ModuleSetupCode.c new/Cython-0.29.35/Cython/Utility/ModuleSetupCode.c --- old/Cython-0.29.34/Cython/Utility/ModuleSetupCode.c 2023-04-02 15:27:02.313669700 +0200 +++ new/Cython-0.29.35/Cython/Utility/ModuleSetupCode.c 2023-05-24 11:02:13.494182800 +0200 @@ -76,8 +76,12 @@ #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 - #undef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/Cython/Utility/TypeConversion.c new/Cython-0.29.35/Cython/Utility/TypeConversion.c --- old/Cython-0.29.34/Cython/Utility/TypeConversion.c 2023-04-02 15:27:02.313669700 +0200 +++ new/Cython-0.29.35/Cython/Utility/TypeConversion.c 2023-05-24 11:02:13.494182800 +0200 @@ -917,7 +917,7 @@ {{endfor}} } #endif -#if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/PKG-INFO new/Cython-0.29.35/PKG-INFO --- old/Cython-0.29.34/PKG-INFO 2023-04-02 15:27:16.221897600 +0200 +++ new/Cython-0.29.35/PKG-INFO 2023-05-24 11:02:23.784952000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: Cython -Version: 0.29.34 +Version: 0.29.35 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.34/Tools/ci-run.sh new/Cython-0.29.35/Tools/ci-run.sh --- old/Cython-0.29.34/Tools/ci-run.sh 2023-04-02 15:27:02.321669800 +0200 +++ new/Cython-0.29.35/Tools/ci-run.sh 2023-05-24 11:02:13.498177300 +0200 @@ -10,7 +10,7 @@ echo "Installing requirements [apt]" sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test" sudo apt update -y -q - sudo apt install -y -q ccache gdb python-dbg python3-dbg gcc-$GCC_VERSION || exit 1 + sudo apt install -y -q ccache gdb python3-dbg gcc-$GCC_VERSION || exit 1 ALTERNATIVE_ARGS="" if [[ $BACKEND == *"cpp"* ]]; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/tests/errors/e_cpp_nogil.pyx new/Cython-0.29.35/tests/errors/e_cpp_nogil.pyx --- old/Cython-0.29.34/tests/errors/e_cpp_nogil.pyx 1970-01-01 01:00:00.000000000 +0100 +++ new/Cython-0.29.35/tests/errors/e_cpp_nogil.pyx 2023-05-24 11:02:13.522145300 +0200 @@ -0,0 +1,12 @@ +# mode: error +# tag: cpp + +cdef extern from *: + cdef int decl_invalid() except +nogil + + cdef int decl2_ok() except + nogil # comment following + cdef int decl_ok() except + nogil + +_ERRORS = """ +5:36: 'except +nogil' defines an exception handling function. Use 'except + nogil' for the 'nogil' modifier. +""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/tests/pypy_bugs.txt new/Cython-0.29.35/tests/pypy_bugs.txt --- old/Cython-0.29.34/tests/pypy_bugs.txt 2023-04-02 15:27:02.361670500 +0200 +++ new/Cython-0.29.35/tests/pypy_bugs.txt 2023-05-24 11:02:13.526140000 +0200 @@ -24,9 +24,6 @@ # tests for things that don't exist in cpyext compile.pylong -run.datetime_pxd -run.datetime_cimport -run.datetime_members run.extern_builtins_T258 run.line_trace run.line_profile_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/tests/run/__getattribute__.pyx new/Cython-0.29.35/tests/run/__getattribute__.pyx --- old/Cython-0.29.34/tests/run/__getattribute__.pyx 2023-04-02 15:27:02.361670500 +0200 +++ new/Cython-0.29.35/tests/run/__getattribute__.pyx 2023-05-24 11:02:13.526140000 +0200 @@ -14,9 +14,9 @@ 'bar' >>> a.called 4 - >>> a.invalid - Traceback (most recent call last): - AttributeError + >>> try: a.invalid + ... except AttributeError: pass + ... else: print("NOT RAISED!") >>> a.called 6 """ @@ -46,9 +46,9 @@ 'bar' >>> a.called 1 - >>> a.invalid - Traceback (most recent call last): - AttributeError + >>> try: a.invalid + ... except AttributeError: pass + ... else: print("NOT RAISED!") >>> a.called 2 """ @@ -77,9 +77,9 @@ 'bar' >>> (a.called_getattr, a.called_getattribute) (1, 8) - >>> a.invalid - Traceback (most recent call last): - AttributeError + >>> try: a.invalid + ... except AttributeError: pass + ... else: print("NOT RAISED!") >>> (a.called_getattr, a.called_getattribute) (2, 11) """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/tests/run/__getattribute_subclasses__.pyx new/Cython-0.29.35/tests/run/__getattribute_subclasses__.pyx --- old/Cython-0.29.34/tests/run/__getattribute_subclasses__.pyx 2023-04-02 15:27:02.361670500 +0200 +++ new/Cython-0.29.35/tests/run/__getattribute_subclasses__.pyx 2023-05-24 11:02:13.526140000 +0200 @@ -22,9 +22,9 @@ getattr_boring >>> a.getattr_called 1 - >>> a.no_such_member - Traceback (most recent call last): - AttributeError + >>> try: a.no_such_member + ... except AttributeError: pass + ... else: print("FAILED!") >>> a.getattr_called 2 """ @@ -51,18 +51,18 @@ >>> a = getattribute_boring() >>> a.getattribute_called 1 - >>> a.boring_member - Traceback (most recent call last): - AttributeError + >>> try: a.boring_member + ... except AttributeError: pass + ... else: print("FAILED!") >>> a.getattribute_called 3 >>> print(a.resolved_by) getattribute_boring >>> a.getattribute_called 5 - >>> a.no_such_member - Traceback (most recent call last): - AttributeError + >>> try: a.no_such_member + ... except AttributeError: pass + ... else: print("FAILED!") >>> a.getattribute_called 7 """ @@ -114,9 +114,9 @@ True >>> a.getattr_called 2 - >>> a.no_such_member - Traceback (most recent call last): - AttributeError + >>> try: a.no_such_member + ... except AttributeError: pass + ... else: print("FAILED!") # currently fails, see #1793 #>>> a.getattr_called @@ -153,9 +153,9 @@ True >>> a.getattribute_called 5 - >>> a.no_such_member - Traceback (most recent call last): - AttributeError + >>> try: a.no_such_member + ... except AttributeError: pass + ... else: print("FAILED!") >>> a.getattribute_called 7 """ @@ -171,23 +171,23 @@ >>> a = boring_boring_getattribute() >>> a.getattribute_called 1 - >>> a.boring_getattribute_member - Traceback (most recent call last): - AttributeError + >>> try: a.boring_getattribute_member + ... except AttributeError: pass + ... else: print("FAILED!") >>> a.getattribute_called 3 - >>> a.boring_boring_getattribute_member - Traceback (most recent call last): - AttributeError + >>> try: a.boring_boring_getattribute_member + ... except AttributeError: pass + ... else: print("FAILED!") >>> a.getattribute_called 5 >>> print(a.resolved_by) _getattribute >>> a.getattribute_called 7 - >>> a.no_such_member - Traceback (most recent call last): - AttributeError + >>> try: a.no_such_member + ... except AttributeError: pass + ... else: print("FAILED!") >>> a.getattribute_called 9 """ @@ -225,9 +225,9 @@ True >>> (a.getattr_called, a.getattribute_called) (5, 11) - >>> a.no_such_member - Traceback (most recent call last): - AttributeError + >>> try: a.no_such_member + ... except AttributeError: pass + ... else: print("FAILED!") >>> (a.getattr_called, a.getattribute_called) (7, 14) """ @@ -270,9 +270,9 @@ True >>> (a.getattr_called, a.getattribute_called) (5, 11) - >>> a.no_such_member - Traceback (most recent call last): - AttributeError + >>> try: a.no_such_member + ... except AttributeError: pass + ... else: print("FAILED!") >>> (a.getattr_called, a.getattribute_called) (7, 14) """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/tests/run/embedsignatures.pyx new/Cython-0.29.35/tests/run/embedsignatures.pyx --- old/Cython-0.29.34/tests/run/embedsignatures.pyx 2023-04-02 15:27:02.381671000 +0200 +++ new/Cython-0.29.35/tests/run/embedsignatures.pyx 2023-05-24 11:02:13.538123800 +0200 @@ -429,6 +429,7 @@ def m29(self, a: list(range(3))[0:1:1]): pass def m30(self, a: list(range(3))[7, 3:2:1, ...]): pass def m31(self, double[::1] a): pass + def m32(self, a: tuple[()]) -> tuple[tuple[()]]: pass __doc__ += ur""" >>> print(Foo.m00.__doc__) @@ -526,4 +527,8 @@ >>> print(Foo.m31.__doc__) Foo.m31(self, double[::1] a) + +>>> print(Foo.m32.__doc__) +Foo.m32(self, a: tuple[()]) -> tuple[tuple[()]] + """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/tests/run/exttype_gc.pyx new/Cython-0.29.35/tests/run/exttype_gc.pyx --- old/Cython-0.29.34/tests/run/exttype_gc.pyx 1970-01-01 01:00:00.000000000 +0100 +++ new/Cython-0.29.35/tests/run/exttype_gc.pyx 2023-05-24 11:02:13.538123800 +0200 @@ -0,0 +1,38 @@ +# mode: run +# tag: gc + + +def create_obj(cls): + cls() # create and discard + + +cdef class BaseTypeNoGC: + pass + + +cdef class ExtTypeGC(BaseTypeNoGC): + """ + >>> create_obj(ExtTypeGC) + >>> create_obj(ExtTypeGC) + >>> create_obj(ExtTypeGC) + + >>> class PyExtTypeGC(ExtTypeGC): pass + >>> create_obj(PyExtTypeGC) + >>> create_obj(PyExtTypeGC) + >>> create_obj(PyExtTypeGC) + """ + cdef object attr + + +cdef class ExtTypeNoGC(BaseTypeNoGC): + """ + >>> create_obj(ExtTypeNoGC) + >>> create_obj(ExtTypeNoGC) + >>> create_obj(ExtTypeNoGC) + + >>> class PyExtTypeNoGC(ExtTypeNoGC): pass + >>> create_obj(PyExtTypeNoGC) + >>> create_obj(PyExtTypeNoGC) + >>> create_obj(PyExtTypeNoGC) + """ + cdef int x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/tests/run/py_classbody.py new/Cython-0.29.35/tests/run/py_classbody.py --- old/Cython-0.29.34/tests/run/py_classbody.py 2023-04-02 15:27:02.397671200 +0200 +++ new/Cython-0.29.35/tests/run/py_classbody.py 2023-05-24 11:02:13.546113300 +0200 @@ -8,7 +8,7 @@ """ >>> TestPyAttr.pyvar # doctest: +ELLIPSIS Traceback (most recent call last): - AttributeError: ...TestPyAttr...has no attribute 'pyvar' + AttributeError: ...TestPyAttr...has no attribute 'pyvar'... >>> TestPyAttr.pyval1 3 >>> TestPyAttr.pyval2 @@ -27,7 +27,7 @@ """ >>> TestCdefAttr.cdefvar # doctest: +ELLIPSIS Traceback (most recent call last): - AttributeError: ...TestCdefAttr...has no attribute 'cdefvar' + AttributeError: ...TestCdefAttr...has no attribute 'cdefvar'... >>> TestCdefAttr.cdefval1 11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cython-0.29.34/tests/run/special_methods_T561.pyx new/Cython-0.29.35/tests/run/special_methods_T561.pyx --- old/Cython-0.29.34/tests/run/special_methods_T561.pyx 2023-04-02 15:27:02.401671200 +0200 +++ new/Cython-0.29.35/tests/run/special_methods_T561.pyx 2023-05-24 11:02:13.550108000 +0200 @@ -49,10 +49,10 @@ >>> g01 = object.__getattribute__(GetAttr(), '__getattribute__') >>> g01('attr') GetAttr getattr 'attr' - >>> g10 = object.__getattribute__(GetAttribute(), '__getattr__') # doctest: +ELLIPSIS - Traceback (most recent call last): - ... - AttributeError: 'special_methods_T561.GetAttribute' object has no attribute '__getattr__'... + >>> try: object.__getattribute__(GetAttribute(), '__getattr__') + ... except AttributeError as err: + ... assert '__getattr__' in str(err), err + ... else: print("NOT RAISED!") >>> g11 = object.__getattribute__(GetAttribute(), '__getattribute__') >>> g11('attr') GetAttribute getattribute 'attr'