Fundamentals 4 min read

Cython 3.0 Released: New Features and Improvements

Cython 3.0 has been officially released, offering a more Pythonic syntax, better C/C++ integration, expanded pure‑Python mode, automatic NumPy ufunc generation, Unicode identifiers, and preliminary support for Python's limited API, making it faster, safer, and easier to use.

Python Programming Learning Circle
Python Programming Learning Circle
Python Programming Learning Circle
Cython 3.0 Released: New Features and Improvements

After nearly five years of development, Cython 3.0 has been officially announced.

The release states that Cython 3.0 outperforms all previous versions: it is more Pythonic, integrates better with C and C++, supports more Python implementations and configurations, and introduces many impressive new language features, making it faster, safer, and easier to use.

New language features include:

Python 3 default syntax and semantics

Cython type annotations in pure Python code

Automatic NumPy ufunc generation

Fast @dataclass and @total_ordering extension types

Safe exception propagation from C functions by default

Unicode identifiers in Cython code

Cython 3 modernizes the project by dropping outdated Python 2 support, adding support for newer Python features up to Python 3.12, and expanding the pure‑Python mode, which allows a broader range of Python code to be compiled into optimized C.

The pure‑Python mode enables developers to use existing Python linting and analysis tools, as Cython now offers a syntax fully compatible with standard Python, making most Cython functions appear in pure‑Python mode, including those that call external C libraries.

Another major improvement is enhanced NumPy support: Cython 3 allows direct writing of NumPy ufuncs, enabling simple numerical functions written in Cython to be applied efficiently to NumPy data structures.

The internal architecture of Cython has been redesigned to better align with Python's evolving internals. For example, Python's new "limited API" provides a stable subset of the Python API, and Cython 3 has preliminary support for this API, which will allow extensions built for one Python version to run on future versions without recompilation.

More details can be found in the official announcement: https://cython.readthedocs.io/en/latest/src/changes.html

PerformancepythonCompilationNumPyCythonPure Python mode
Python Programming Learning Circle
Written by

Python Programming Learning Circle

A global community of Chinese Python developers offering technical articles, columns, original video tutorials, and problem sets. Topics include web full‑stack development, web scraping, data analysis, natural language processing, image processing, machine learning, automated testing, DevOps automation, and big data.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.