Opened 11 months ago

Closed 11 months ago

Last modified 8 months ago

#22353 closed enhancement (fixed)

cython-3.2.0 (Python module)

Reported by: Bruce Dubbs Owned by: Bruce Dubbs
Priority: normal Milestone: 13.0
Component: BOOK Version: git
Severity: medium Keywords:
Cc:

Description

New minor version.

Change History (4)

comment:1 by Bruce Dubbs, 11 months ago

Owner: changed from blfs-book to Bruce Dubbs
Status: new → assigned

comment:2 by Bruce Dubbs, 11 months ago

3.2.0 (2025-11-05)

Bugs fixed

  • The cygdb program failed to work with virtualenvs on Windows. Patch by Merlin.

3.2.0b3 (2025-10-30)

Bugs fixed

  • Using cython.pymutex in an extension type declared as public or api generated invalid C code missing the required PyMutex declarations.
  • 3.2.0b2 generated incorrect pointer casts in the cimport importing code.
  • Cython's type sharing across modules suffered from race conditions if multiple modules tried to initialise and share their types concurrently. This is due to an underlying CPython issue and cannot easily be worked around completely. In the common case that module dicts are plain Python dict objects, however, Cython now uses a .setdefault() equivalent for thread-safe type sharing.
  • Cython incorrectly called PyList_GetItemRef() in PyPy and GraalPython before Py3.13.

3.2.0b2 (2025-10-27)

Features added

  • The code generated for importing and exporting cimports across modules uses less space.

Bugs fixed

  • Iteration over memoryviews could loop indefinitely in 3.2b1 when encountering a continue statement.
  • Extension arguments defined for the shared code module were ignored in cythonize().
  • Failures while following package attributes in import pkg.module as … were not handled.

  • Trying to instantiate internal types used by Cython is now prohibited.
  • Includes all fixes as of Cython 3.1.6.

Other changes

  • The musllinux platform is now served with an abi3 Cython wheel instead of Python specific ones.

3.2.0b1 (2025-10-22)

Features added

  • Builtin exception types are now inferred.
  • The list of known, inferred and optimised Python builtins was updated. range is now considered a type. ascii, bin, format, hex, oct were added as functions.
  • The f-string syntax was extended according to PEP-701.
  • t-strings are implemented according to PEP-750. The implementation backports the template classes but prefers existing backports if installed separately.
  • Unknown return type annotations with -> are no longer rejected but produce warnings. This allows better integration with Python type hints that are not always usable for Cython. -> None is also allowed now.
  • The runtime Python dispatch for fused functions is substantially faster.
  • Freelists (via cdef class decorator and for internally used types such as async) are now also used in the Limited API and with extension type specs enabled.
  • Module imports now quickly check for an already imported module to speed up reimports.
  • Type checks on PEP-604 union types (int | None) are optimised into separate checks.
  • Assignments to the PEP-604 union type float | None allow any suitable Python number as input and convert it to a Python float automatically.
  • Item type inference was improved for looping over literals.
  • Looping over literal sequences and strings now uses efficient C array looping if possible.
  • Releasing the GIL from an unknown lock state is more efficient.
  • cython.critical_section(PyMutex) now works, as with Python objects.
  • bool(c_int/float/ptr) avoid passing through Python objects.
  • Variables assigned inside of prange loops can now be initialised outside of the loop.
  • Unused exceptions in except clauses are detected in some more cases to avoid their normalisation.
  • Mixed operations on C integers with Python ints use less code and are more streamlined for Py3.12+.
  • Some object constants are now marked as immortal to speed up their reference counting in recent CPython versions. This can be configured with the CYTHON_IMMORTAL_CONSTANTS C macro.
  • Further improvements were made to reduce the size of the resulting extension modules.
  • Several improvements were made in freethreaded Python code.
  • Several improvements were made for the Limited API.
  • Several improvements were made for the GraalPython support.
  • Some GIL-safe C-API wrappers were added to the libc/libcpp declarations.
  • String and number constants use less storage space in the module.
  • The managed dict/weakref support in CPython 3.12+ is used for internal types to benefit from future CPython optimisations here.
  • Using NaN as exception return value is supported.
  • Declarations for C++ condition variables were added.
  • The annotated source HTML page shows alternating +/− markers to open/close lines.
  • cython --embed gained a new option --embed-modules=… to list further extension modules that will be statically linked into the generated extension module, to get them initialised on application start.
  • The setup.py script of Cython now allows passing the desired Limited API version like --cython-limited-api=3.11.
  • Unicode 16.0.0 is used to parse identifiers.

comment:3 by Bruce Dubbs, 11 months ago

Resolution: → fixed
Status: assigned → closed

Fixed at commits

f6d5e40282 Update to libxkbcommon-1.13.0.
6aead197fb Update to cython-3.2.0 (Python module).
f204436e49 Update to docutils-0.22.3 (Python module).
2da4aa68dd Update to udisks-2.11.0.

comment:4 by Bruce Dubbs, 8 months ago

Milestone: 12.5 → 13.0

Milestone renamed

Note: See TracTickets for help on using tickets.