From cb2a07f45ecb08f5698cf10ad05e9d312fca4dd2cf518880131a5f24d035693a Mon Sep 17 00:00:00 2001 From: Todd R Date: Tue, 26 Sep 2017 15:49:29 +0000 Subject: [PATCH] Accepting request 528846 from home:TheBlackCat:branches:devel:languages:python - Update to version 0.27 + Features added * Extension module initialisation follows `PEP 489 `_ in CPython 3.5+, which resolves several differences with regard to normal Python modules. This makes the global names ``__file__`` and ``__path__`` correctly available to module level code and improves the support for module-level relative imports. (Github issues #1715, #1753, #1035) * Asynchronous generators (`PEP 525 `_) and asynchronous comprehensions (`PEP 530 `_) have been implemented. Note that async generators require finalisation support in order to allow for asynchronous operations during cleanup, which is only available in CPython 3.6+. All other functionality has been backported as usual. * Variable annotations are now parsed according to `PEP 526 `_. Cython types (e.g. ``cython.int``) are evaluated as C type declarations and everything else as Python types. This can be disabled with the directive ``annotation_typing=False``. Note that most complex PEP-484 style annotations are currently ignored. This will change in future releases. (Github issue #1850) * Extension types (also in pure Python mode) can implement the normal special methods ``__eq__``, ``__lt__`` etc. for comparisons instead of the low-level ``__richcmp__`` method. (Github issue #690) * New decorator ``@cython.exceptval(x=None, check=False)`` that makes the signature declarations ``except x``, ``except? x`` and ``except *`` available to pure Python code. Original patch by Antonio Cuni. (Github issue #1653) * Signature annotations are now included in the signature docstring generated by the ``embedsignature`` directive. Patch by Lisandro Dalcin (Github issue #1781). * The gdb support for Python code (``libpython.py``) was updated to the latest version in CPython 3.7 (git rev 5fe59f8). * The compiler tries to find a usable exception return value for cdef functions with ``except *`` if the returned type allows it. Note that this feature is subject to safety limitations, so it is still better to provide an explicit declaration. * C functions can be assigned to function pointers with a compatible exception declaration, not only with exact matches. A side-effect is that certain compatible signature overrides are now allowed and some more mismatches of exception signatures are now detected and rejected as errors that were not detected before. * The IPython/Jupyter magic integration has a new option ``%%cython --pgo`` for profile guided optimisation. It compiles the cell with PGO settings for the C compiler, executes it to generate a runtime profile, and then compiles it again using that profile for C compiler optimisation. Currently only tested with gcc. * ``len(memoryview)`` can be used in nogil sections to get the size of the first dimension of a memory view (``shape[0]``). (Github issue #1733) * C++ classes can now contain (properly refcounted) Python objects. * NumPy dtype subarrays are now accessible through the C-API. Patch by Gerald Dalley (Github issue #245). * Resolves several issues with PyPy and uses faster async slots in PyPy3. Patch by Ronan Lamy (Github issues #1871, #1878). + Bugs fixed * Extension types that were cimported from other Cython modules could disagree about the order of fused cdef methods in their call table. This could lead to wrong methods being called and potentially also crashes. The fix required changes to the ordering of fused methods in the call table, which may break existing compiled modules that call fused cdef methods across module boundaries, if these methods were implemented in a different order than they were declared in the corresponding .pxd file. (Github issue #1873) * The exception state handling in generators and coroutines could lead to exceptions in the caller being lost if an exception was raised and handled inside of the coroutine when yielding. (Github issue #1731) * Loops over ``range(enum)`` were not converted into C for-loops. Note that it is still recommended to use an explicit cast to a C integer type in this case. * Error positions of names (e.g. variables) were incorrectly reported after the name and not at the beginning of the name. * Compile time ``DEF`` assignments were evaluated even when they occur inside of falsy ``IF`` blocks. (Github issue #1796) * Disabling the line tracing from a trace function could fail. Original patch by Dmitry Trofimov. (Github issue #1769) * Several issues with the Pythran integration were resolved. * abs(signed int) now returns a signed rather than unsigned int. (Github issue #1837) * Reading ``frame.f_locals`` of a Cython function (e.g. from a debugger or profiler could modify the module globals. (Github issue #1836) * Buffer type mismatches in the NumPy buffer support could leak a reference to the buffer owner. * Using the "is_f_contig" and "is_c_contig" memoryview methods together could leave one of them undeclared. (Github issue #1872) * Compilation failed if the for-in-range loop target was not a variable but a more complex expression, e.g. an item assignment. (Github issue #1831) * Compile time evaluations of (partially) constant f-strings could show incorrect results. * Escape sequences in raw f-strings (``fr'...'``) were resolved instead of passing them through as expected. * Some ref-counting issues in buffer error handling have been resolved. + Other changes * Type declarations in signature annotations are now parsed according to `PEP 484 `_ typing. Only Cython types (e.g. ``cython.int``) and Python builtin types are currently considered as type declarations. Everything else is ignored, but this will change in a future Cython release. (Github issue #1672) * The directive ``annotation_typing`` is now ``True`` by default, which enables parsing type declarations from annotations. * This release no longer supports Python 3.2. - Update to version 0.26.1 + Bugs fixed * ``cython.view.array`` was missing ``.__len__()``. * Extension types with a ``.pxd`` override for their ``__releasebuffer__`` slot (e.g. as provided by Cython for the Python ``array.array`` type) could leak a reference to the buffer owner on release, thus not freeing the memory. (Github issue #1638) * Auto-decoding failed in 0.26 for strings inside of C++ containers. (Github issue #1790) * Compile error when inheriting from C++ container types. (Github issue #1788) * Invalid C code in generators (declaration after code). (Github issue #1801) * Arithmetic operations on ``const`` integer variables could generate invalid code. (Github issue #1798) * Local variables with names of special Python methods failed to compile inside of closures. (Github issue #1797) * Problem with indirect Emacs buffers in cython-mode. Patch by Martin Albrecht (Github issue #1743). * Extension types named ``result`` or ``PickleError`` generated invalid unpickling code. Patch by Jason Madden (Github issue #1786). * Bazel integration failed to compile ``.py`` files. Patch by Guro Bokum (Github issue #1784). * Some include directories and dependencies were referenced with their absolute paths in the generated files despite lying within the project directory. * Failure to compile in Py3.7 due to a modified signature of ``_PyCFunctionFast()`` - Update to version 0.26 + Features added * Pythran can be used as a backend for evaluating NumPy array expressions. Patch by Adrien Guinet (Github issue #1607). * cdef classes now support pickling by default when possible. This can be disabled with the ``auto_pickle`` directive. * Speed up comparisons of strings if their hash value is available. Patch by Claudio Freire (Github issue #1571). * Support pyximport from zip files. Patch by Sergei Lebedev (Github issue #1485). * IPython magic now respects the ``__all__`` variable and ignores names with leading-underscore (like ``import *`` does). Patch by Syrtis Major (Github issue #1625). * ``abs()`` is optimised for C complex numbers. Patch by da-woods (Github issue #1648). * The display of C lines in Cython tracebacks can now be enabled at runtime via ``import cython_runtime; cython_runtime.cline_in_traceback=True``. The default has been changed to False. * The overhead of calling fused types generic functions was reduced. * "cdef extern" include files are now also searched relative to the current file. Patch by Jeroen Demeyer (Github issue #1654). * Optional optimization for re-aquiring the GIL, controlled by the `fast_gil` directive. + Bugs fixed * Item lookup/assignment with a unicode character as index that is typed (explicitly or implicitly) as ``Py_UCS4`` or ``Py_UNICODE`` used the integer value instead of the Unicode string value. Code that relied on the previous behaviour now triggers a warning that can be disabled by applying an explicit cast. (Github issue #1602) * f-string processing was adapted to changes in PEP 498 and CPython 3.6. * Invalid C code when decoding from UTF-16(LE/BE) byte strings. (Github issue #1696) * Unicode escapes in 'ur' raw-unicode strings were not resolved in Py2 code. Original patch by Aaron Gallagher (Github issue #1594). * File paths of code objects are now relative. Original patch by Jelmer Vernooij (Github issue #1565). * Decorators of cdef class methods could be executed twice. Patch by Jeroen Demeyer (Github issue #1724). * Dict iteration using the Py2 ``iter*`` methods failed in PyPy3. Patch by Armin Rigo (Github issue #1631). * Several warnings in the generated code are now suppressed. + Other changes * The ``unraisable_tracebacks`` option now defaults to ``True``. * Coercion of C++ containers to Python is no longer automatic on attribute access (Github issue #1521). * Access to Python attributes of cimported modules without the corresponding import is now a compile-time (rather than runtime) error. * Do not use special dll linkage for "cdef public" functions. Patch by Jeroen Demeyer (Github issue #1687). * cdef/cpdef methods must match their declarations. See Github Issue #1732. This is now a warning and will be an error in future releases. - Update to version 0.25.2 + Bugs fixed * Fixes several issues with C++ template deduction. * Fixes a issue with bound method type inference (Github issue #551). * Fixes a bug with cascaded tuple assignment (Github issue #1523). * Fixed or silenced many Clang warnings. * Fixes bug with powers of pure real complex numbers (Github issue #1538). OBS-URL: https://build.opensuse.org/request/show/528846 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Cython?expand=0&rev=84 --- Cython-0.25.1.tar.gz | 3 - Cython-0.27.tar.gz | 3 + python-Cython.changes | 181 ++++++++++++++++++++++++++++++++++++++++++ python-Cython.spec | 15 ++-- 4 files changed, 189 insertions(+), 13 deletions(-) delete mode 100644 Cython-0.25.1.tar.gz create mode 100644 Cython-0.27.tar.gz diff --git a/Cython-0.25.1.tar.gz b/Cython-0.25.1.tar.gz deleted file mode 100644 index 85f084a..0000000 --- a/Cython-0.25.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e0941455769335ec5afb17dee36dc3833b7edc2ae20a8ed5806c58215e4b6669 -size 1701919 diff --git a/Cython-0.27.tar.gz b/Cython-0.27.tar.gz new file mode 100644 index 0000000..4712ab0 --- /dev/null +++ b/Cython-0.27.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b932b5194e87a8b853d493dc1b46e38632d6846a86f55b8346eb9c6ec3bdc00b +size 1769385 diff --git a/python-Cython.changes b/python-Cython.changes index a4d4f00..1623c54 100644 --- a/python-Cython.changes +++ b/python-Cython.changes @@ -1,3 +1,184 @@ +------------------------------------------------------------------- +Mon Sep 25 15:29:55 UTC 2017 - toddrme2178@gmail.com + +- Update to version 0.27 + + Features added + * Extension module initialisation follows + `PEP 489 `_ in CPython 3.5+, which + resolves several differences with regard to normal Python modules. This makes + the global names ``__file__`` and ``__path__`` correctly available to module + level code and improves the support for module-level relative imports. + (Github issues #1715, #1753, #1035) + * Asynchronous generators (`PEP 525 `_) + and asynchronous comprehensions (`PEP 530 `_) + have been implemented. Note that async generators require finalisation support + in order to allow for asynchronous operations during cleanup, which is only + available in CPython 3.6+. All other functionality has been backported as usual. + * Variable annotations are now parsed according to + `PEP 526 `_. Cython types (e.g. + ``cython.int``) are evaluated as C type declarations and everything else as Python + types. This can be disabled with the directive ``annotation_typing=False``. + Note that most complex PEP-484 style annotations are currently ignored. This will + change in future releases. (Github issue #1850) + * Extension types (also in pure Python mode) can implement the normal special methods + ``__eq__``, ``__lt__`` etc. for comparisons instead of the low-level ``__richcmp__`` + method. (Github issue #690) + * New decorator ``@cython.exceptval(x=None, check=False)`` that makes the signature + declarations ``except x``, ``except? x`` and ``except *`` available to pure Python + code. Original patch by Antonio Cuni. (Github issue #1653) + * Signature annotations are now included in the signature docstring generated by + the ``embedsignature`` directive. Patch by Lisandro Dalcin (Github issue #1781). + * The gdb support for Python code (``libpython.py``) was updated to the latest + version in CPython 3.7 (git rev 5fe59f8). + * The compiler tries to find a usable exception return value for cdef functions + with ``except *`` if the returned type allows it. Note that this feature is subject + to safety limitations, so it is still better to provide an explicit declaration. + * C functions can be assigned to function pointers with a compatible exception + declaration, not only with exact matches. A side-effect is that certain compatible + signature overrides are now allowed and some more mismatches of exception signatures + are now detected and rejected as errors that were not detected before. + * The IPython/Jupyter magic integration has a new option ``%%cython --pgo`` for profile + guided optimisation. It compiles the cell with PGO settings for the C compiler, + executes it to generate a runtime profile, and then compiles it again using that + profile for C compiler optimisation. Currently only tested with gcc. + * ``len(memoryview)`` can be used in nogil sections to get the size of the + first dimension of a memory view (``shape[0]``). (Github issue #1733) + * C++ classes can now contain (properly refcounted) Python objects. + * NumPy dtype subarrays are now accessible through the C-API. + Patch by Gerald Dalley (Github issue #245). + * Resolves several issues with PyPy and uses faster async slots in PyPy3. + Patch by Ronan Lamy (Github issues #1871, #1878). + + Bugs fixed + * Extension types that were cimported from other Cython modules could disagree + about the order of fused cdef methods in their call table. This could lead + to wrong methods being called and potentially also crashes. The fix required + changes to the ordering of fused methods in the call table, which may break + existing compiled modules that call fused cdef methods across module boundaries, + if these methods were implemented in a different order than they were declared + in the corresponding .pxd file. (Github issue #1873) + * The exception state handling in generators and coroutines could lead to + exceptions in the caller being lost if an exception was raised and handled + inside of the coroutine when yielding. (Github issue #1731) + * Loops over ``range(enum)`` were not converted into C for-loops. Note that it + is still recommended to use an explicit cast to a C integer type in this case. + * Error positions of names (e.g. variables) were incorrectly reported after the + name and not at the beginning of the name. + * Compile time ``DEF`` assignments were evaluated even when they occur inside of + falsy ``IF`` blocks. (Github issue #1796) + * Disabling the line tracing from a trace function could fail. + Original patch by Dmitry Trofimov. (Github issue #1769) + * Several issues with the Pythran integration were resolved. + * abs(signed int) now returns a signed rather than unsigned int. + (Github issue #1837) + * Reading ``frame.f_locals`` of a Cython function (e.g. from a debugger or profiler + could modify the module globals. (Github issue #1836) + * Buffer type mismatches in the NumPy buffer support could leak a reference to the + buffer owner. + * Using the "is_f_contig" and "is_c_contig" memoryview methods together could leave + one of them undeclared. (Github issue #1872) + * Compilation failed if the for-in-range loop target was not a variable but a more + complex expression, e.g. an item assignment. (Github issue #1831) + * Compile time evaluations of (partially) constant f-strings could show incorrect + results. + * Escape sequences in raw f-strings (``fr'...'``) were resolved instead of passing + them through as expected. + * Some ref-counting issues in buffer error handling have been resolved. + + Other changes + * Type declarations in signature annotations are now parsed according to + `PEP 484 `_ + typing. Only Cython types (e.g. ``cython.int``) and Python builtin types are + currently considered as type declarations. Everything else is ignored, but this + will change in a future Cython release. + (Github issue #1672) + * The directive ``annotation_typing`` is now ``True`` by default, which enables + parsing type declarations from annotations. + * This release no longer supports Python 3.2. +- Update to version 0.26.1 + + Bugs fixed + * ``cython.view.array`` was missing ``.__len__()``. + * Extension types with a ``.pxd`` override for their ``__releasebuffer__`` slot + (e.g. as provided by Cython for the Python ``array.array`` type) could leak + a reference to the buffer owner on release, thus not freeing the memory. + (Github issue #1638) + * Auto-decoding failed in 0.26 for strings inside of C++ containers. + (Github issue #1790) + * Compile error when inheriting from C++ container types. + (Github issue #1788) + * Invalid C code in generators (declaration after code). + (Github issue #1801) + * Arithmetic operations on ``const`` integer variables could generate invalid code. + (Github issue #1798) + * Local variables with names of special Python methods failed to compile inside of + closures. (Github issue #1797) + * Problem with indirect Emacs buffers in cython-mode. + Patch by Martin Albrecht (Github issue #1743). + * Extension types named ``result`` or ``PickleError`` generated invalid unpickling code. + Patch by Jason Madden (Github issue #1786). + * Bazel integration failed to compile ``.py`` files. + Patch by Guro Bokum (Github issue #1784). + * Some include directories and dependencies were referenced with their absolute paths + in the generated files despite lying within the project directory. + * Failure to compile in Py3.7 due to a modified signature of ``_PyCFunctionFast()`` +- Update to version 0.26 + + Features added + * Pythran can be used as a backend for evaluating NumPy array expressions. + Patch by Adrien Guinet (Github issue #1607). + * cdef classes now support pickling by default when possible. + This can be disabled with the ``auto_pickle`` directive. + * Speed up comparisons of strings if their hash value is available. + Patch by Claudio Freire (Github issue #1571). + * Support pyximport from zip files. + Patch by Sergei Lebedev (Github issue #1485). + * IPython magic now respects the ``__all__`` variable and ignores + names with leading-underscore (like ``import *`` does). + Patch by Syrtis Major (Github issue #1625). + * ``abs()`` is optimised for C complex numbers. + Patch by da-woods (Github issue #1648). + * The display of C lines in Cython tracebacks can now be enabled at runtime + via ``import cython_runtime; cython_runtime.cline_in_traceback=True``. + The default has been changed to False. + * The overhead of calling fused types generic functions was reduced. + * "cdef extern" include files are now also searched relative to the current file. + Patch by Jeroen Demeyer (Github issue #1654). + * Optional optimization for re-aquiring the GIL, controlled by the + `fast_gil` directive. + + Bugs fixed + * Item lookup/assignment with a unicode character as index that is typed + (explicitly or implicitly) as ``Py_UCS4`` or ``Py_UNICODE`` used the + integer value instead of the Unicode string value. Code that relied on + the previous behaviour now triggers a warning that can be disabled by + applying an explicit cast. (Github issue #1602) + * f-string processing was adapted to changes in PEP 498 and CPython 3.6. + * Invalid C code when decoding from UTF-16(LE/BE) byte strings. + (Github issue #1696) + * Unicode escapes in 'ur' raw-unicode strings were not resolved in Py2 code. + Original patch by Aaron Gallagher (Github issue #1594). + * File paths of code objects are now relative. + Original patch by Jelmer Vernooij (Github issue #1565). + * Decorators of cdef class methods could be executed twice. + Patch by Jeroen Demeyer (Github issue #1724). + * Dict iteration using the Py2 ``iter*`` methods failed in PyPy3. + Patch by Armin Rigo (Github issue #1631). + * Several warnings in the generated code are now suppressed. + + Other changes + * The ``unraisable_tracebacks`` option now defaults to ``True``. + * Coercion of C++ containers to Python is no longer automatic on attribute + access (Github issue #1521). + * Access to Python attributes of cimported modules without the corresponding + import is now a compile-time (rather than runtime) error. + * Do not use special dll linkage for "cdef public" functions. + Patch by Jeroen Demeyer (Github issue #1687). + * cdef/cpdef methods must match their declarations. See Github Issue #1732. + This is now a warning and will be an error in future releases. +- Update to version 0.25.2 + + Bugs fixed + * Fixes several issues with C++ template deduction. + * Fixes a issue with bound method type inference (Github issue #551). + * Fixes a bug with cascaded tuple assignment (Github issue #1523). + * Fixed or silenced many Clang warnings. + * Fixes bug with powers of pure real complex numbers (Github issue #1538). + + ------------------------------------------------------------------- Mon Dec 19 17:49:22 UTC 2016 - jmatejek@suse.com diff --git a/python-Cython.spec b/python-Cython.spec index d1c7858..50da008 100644 --- a/python-Cython.spec +++ b/python-Cython.spec @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python Name: python-Cython -Version: 0.25.1 +Version: 0.27 Release: 0 Url: http://www.cython.org Summary: The Cython compiler for writing C extensions for the Python language @@ -27,12 +27,12 @@ License: Apache-2.0 Group: Development/Languages/Python Source: https://files.pythonhosted.org/packages/source/C/Cython/Cython-%{version}.tar.gz Source1: python-Cython-rpmlintrc -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{python_module devel} BuildRequires: %{python_module xml} BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: python-rpm-macros +BuildRequires: python3-2to3 Requires: python-devel Requires: python-xml Requires(post): update-alternatives @@ -64,7 +64,7 @@ code. # Fix non-executable scripts sed -i "s|^#!.*||" Cython/Debugger/{libpython,Cygdb}.py cython.py # Fix EOL encoding -sed -i "s|\r||" Demos/callback/{README.txt,cheesefinder.h} Demos/embed/Makefile.{unix,msc.static} Doc/primes.c +sed -i "s|\r||" Demos/callback/{README.txt,cheesefinder.h} Demos/embed/Makefile.{unix,msc.static} %build export CFLAGS="%{optflags}" @@ -92,20 +92,15 @@ done %python_uninstall_alternative cython %check -%if 0%{?suse_version} && 0%{?suse_version} <= 1140 -sed -i.SLES11.SP4.bak -e 's/const char/char/' ./tests/run/cpdef_extern_func.pyx -#mv ./tests/run/cpdef_extern_func.pxd ./tests/run/cpdef_extern_func.pxd.TNT.txt -#mv ./tests/run/cpdef_extern_func.pyx ./tests/run/cpdef_extern_func.pyx.TNT.txt -#sleep 60 -%endif %ifarch x86_64 export LANG=en_US.UTF-8 +export CFLAGS="%{optflags}" %python_exec runtests.py -vv %endif %files %{python_files} %defattr(-,root,root,-) -%doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Doc Demos +%doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Demos %python_alternative %{_bindir}/cygdb %python_alternative %{_bindir}/cython %python_alternative %{_bindir}/cythonize