Cython

Latest version: v3.0.11

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 17

0.29.27

====================

Features added
--------------

* The ``cythonize`` command has a new option ``-M`` to generate ``.dep`` dependency
files for the compilation unit. This can be used by external build tools to track
these dependencies.
Patch by Evgeni Burovski. (Github issue :issue:`1214`)

Bugs fixed
----------

* Compilation failures on PyPy were resolved.
Patches by Matti Picus. (Github issues :issue:`4509`, :issue:`4517`)

* Calls to ``range()`` with more than three arguments did not fail.
Original patch by Max Bachmann. (Github issue :issue:`4550`)

* Some C compiler warnings about missing type struct initialisers in Py3.10 were resolved.

* Cython no longer warns about using OpenMP 3.0 features since they are now
considered generally available.

0.29.26

====================

Bugs fixed
----------

* An incompatibility with CPython 3.11.0a3 was resolved.
(Github issue :issue:`4499`)

* The ``in`` operator failed on literal lists with starred expressions.
Patch by Arvind Natarajan. (Github issue :issue:`3938`)

* A C compiler warning in PyPy about a missing struct field initialisation was resolved.

0.29.25

====================

Bugs fixed
----------

* Several incompatibilities with CPython 3.11 were resolved.
Patches by David Woods, Victor Stinner, Thomas Caswell.
(Github issues :issue:`4411`, :issue:`4414`, :issue:`4415`, :issue:`4416`, :issue:`4420`,
:issue:`4428`, :issue:`4473`, :issue:`4479`, :issue:`4480`)

* Some C compiler warnings were resolved.
Patches by Lisandro Dalcin and others. (Github issue :issue:`4439`)

* C++ ``std::move()`` should only be used automatically in MSVC versions that support it.
Patch by Max Bachmann. (Github issue :issue:`4191`)

* The ``Py_hash_t`` type failed to accept arbitrary "index" values.
(Github issue :issue:`2752`)

* Avoid copying unaligned 16-bit values since some platforms require them to be aligned.
Use memcpy() instead to let the C compiler decide how to do it.
(Github issue :issue:`4343`)

* Cython crashed on invalid truthiness tests on C++ types without ``operator bool``.
Patch by David Woods. (Github issue :issue:`4348`)

* The declaration of ``PyUnicode_CompareWithASCIIString()`` in ``cpython.unicode`` was incorrect.
Patch by Max Bachmann. (Github issue :issue:`4344`)

0.29.24

====================

Bugs fixed
----------

* Inline functions in pxd files that used memory views could lead to invalid
C code if the module that imported from them does not use memory views.
Patch by David Woods. (Github issue :issue:`1415`)

* Several declarations in ``libcpp.string`` were added and corrected.
Patch by Janek Bevendorff. (Github issue :issue:`4268`)

* Pickling unbound Cython compiled methods failed.
Patch by Pierre Glaser. (Github issue :issue:`2972`)

* The tracing code was adapted to work with CPython 3.10.

* The optimised ``in`` operator failed on unicode strings in Py3.9 and later
that were constructed from an external ``wchar_t`` source.
Also, related C compiler warnings about deprecated C-API usage were resolved.
(Github issue :issue:`3925`)

* Some compiler crashes were resolved.
Patch by David Woods. (Github issues :issue:`4214`, :issue:`2811`)

* An incorrect warning about 'unused' generator expressions was removed.
(GIthub issue :issue:`1699`)

* The attributes ``gen.gi_frame`` and ``coro.cr_frame`` of Cython compiled
generators and coroutines now return an actual frame object for introspection,
instead of ``None``.
(Github issue :issue:`2306`)

0.29.23

====================

Bugs fixed
----------

* Some problems with Python 3.10 were resolved.
Patches by Victor Stinner and David Woods. (Github issues :issue:`4046`, :issue:`4100`)

* An incorrect "optimisation" was removed that allowed changes to a keyword
dict to leak into keyword arguments passed into a function.
Patch by Peng Weikang. (Github issue :issue:`3227`)

* Multiplied str constants could end up as bytes constants with language_level=2.
Patch by Alphadelta14 and David Woods. (Github issue :issue:`3951`)

* ``PY_SSIZE_T_CLEAN`` does not get defined any more if it is already defined.
Patch by Andrew Jones. (Github issue :issue:`4104`)

0.29.22

====================

Features added
--------------

* Some declarations were added to the provided pxd includes.
Patches by Zackery Spytz and John Kirkham.
(Github issues :issue:`3811`, :issue:`3882`, :issue:`3899`, :issue:`3901`)

Bugs fixed
----------

* A crash when calling certain functions in Py3.9 and later was resolved.
(Github issue :issue:`3917`)

* ``const`` memory views of structs failed to compile.
(Github issue :issue:`2251`)

* ``const`` template declarations could not be nested.
Patch by Ashwin Srinath. (Github issue :issue:`1355`)

* The declarations in the ``cpython.pycapsule`` module were missing their
``const`` modifiers and generated incorrect C code.
Patch by Warren Weckesser. (Github issue :issue:`3964`)

* Casts to memory views failed for fused dtypes.
Patch by David Woods. (Github issue :issue:`3881`)

* ``repr()`` was assumed to return ``str`` instead of ``unicode`` with ``language_level=3``.
(Github issue :issue:`3736`)

* Calling ``cpdef`` functions from cimported modules crashed the compiler.
Patch by David Woods. (Github issue :issue:`4000`)

* Cython no longer validates the ABI size of the NumPy classes it compiled against.
See the discussion in https://github.com/numpy/numpy/pull/432

* A C compiler warning about enum value casting was resolved in GCC.
(Github issue :issue:`2749`)

* Coverage reporting in the annotated HTML file failed in Py3.9.
Patch by Nick Pope. (Github issue :issue:`3865`)

* The embedding code now reports Python errors as exit status.

* Long type declarations could lead to (harmless) random changes in the
C file when used in auto-generated Python wrappers or pickled classes.

Other changes
-------------

* Variables defined as ``cpdef`` now generate a warning since this
is currently useless and thus does not do what users would expect.
Patch by David Woods. (Github issue :issue:`3959`)

Page 5 of 17

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.