---
title: "cython 3.0.0 Breaking Changes on PyPI | Since.dev"
description: "What each cython release removed, renamed or changed: 369 breaking changes in 3 versions on PyPI, each with its source."
canonical_url: https://since.dev/packages/pypi/cython
last_updated: 2026-12-04
---

# cython breaking changes

cython 3.0.0 (July 17, 2023) is its newest release with breaking changes, 259 of them. The first: Cython 3.0.0 drops support for Pyston 1. Every breaking API change we have recorded in cython on PyPI: 369 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `3.3.2`, released November 25, 2026. [Source repository](https://github.com/cython/cython)

Its 3.0.0 release drops Python 2.6. [Python end of life dates](https://since.dev/calendar/python.md).

- From [0.29](#v-0-29) to [3.0.0](#v-3-0-0): 259 breaking changes in 1 version.
- From [0.28](#v-0-28) to [3.0.0](#v-3-0-0): 317 breaking changes in 2 versions.

## cython 3.0.0 breaking changes

cython 3.0.0, released July 17, 2023: 259 breaking changes.

- **Removed**  

Pyston V1 is no longer supported; Pyston V2 is the supported version. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Removed**  

Cython no longer supports Python 2.6. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Removed** `cpdef`  

Declaring variables with cpdef is no longer allowed, so such code must be changed. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Removed** `from somemodule cimport class.struct.union somename`  

The undocumented syntax with a type modifier was removed; use a plain cimport of the name. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Removed** `np.long_t`  

The np.long_t alias was removed from the NumPy declarations; code using it must change. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Removed** `np.ulong_t`  

The np.ulong_t alias was removed from the NumPy declarations; code using it must change. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Removed** `numpy.pxd`  

Deprecated NumPy API usages were removed from the numpy.pxd declarations. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Removed** `python_*`  

The long deprecated include files were removed from Cython/Includes/Deprecated. Use the libc.\* and cpython.\* pxd modules instead. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Removed** `stdio`  

The long deprecated include files were removed from Cython/Includes/Deprecated. Use the libc.\* and cpython.\* pxd modules instead. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Removed** `stdlib`  

The long deprecated include files were removed from Cython/Includes/Deprecated. Use the libc.\* and cpython.\* pxd modules instead. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Removed** `stl`  

The long deprecated include files were removed from Cython/Includes/Deprecated. Use the libc.\* and cpython.\* pxd modules instead. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

Cython 3.0.0 release [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

Functions without an except declaration now propagate exceptions; add noexcept to keep old non-propagating behavior. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

Annotations are no longer parsed and are kept as strings following PEP 563. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

Arguments annotated with list or extension types no longer allow None; use typing.Optional or a None default. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

Such functions now accept keyword arguments; use the always_allow_keywords(False) directive to reject them. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

Reusing an extension type attribute name as a method name is now a compile error. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

The C property feature was rewritten; C property methods must now be declared inline. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

Tuple types like (int, int) are rejected in Python annotations; use the Python tuple notation instead. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

Using a variable before its declaration now fails to compile, so such code must be reordered. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

Subscripting with integer keys now uses the Mapping protocol before the Sequence protocol, matching Python semantics. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

Python classes without an explicit base are now new-style classes in Python 2 too. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

The cython command line parser was rewritten, so option handling may differ from before. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

Cython now refuses to overwrite output files it did not generate, so wrapper module names may need changing. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed**  

The code except +nogil is rejected as a likely typo for except + nogil; fix the spelling. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed** `__add__`  

Binary operator methods now follow Python's reflected-operator rules; the c_api_binop_methods directive restores the old behavior. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed** `__qualname__`  

Classes compiled for Python 2.x no longer get a \_\_qualname\_\_ attribute. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed** `cython --version`  

The version output moved from stderr to stdout, so scripts reading stderr will see a change. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed** `Cython.Build.BuildExecutable`  

The built program is no longer executed automatically; use cythonrun to run it. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed** `generator_stop`  

Generator StopIteration handling follows PEP 479 by default under language level 3. Code relying on the old behaviour must change. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed** `len`  

len(memoryview), len(char\*) and len(Py_UNICODE\*) now return a signed Py_ssize_t instead of an unsigned size_t. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Behavior changed** `returns`  

For suitable C return types without @exceptval(), exceptions are now propagated by default. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Default changed** `language_level`  

Code without an explicit language level now gets Python 3 semantics with str literals. Set the language_level=2 directive to keep the previous behaviour. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Configuration changed**  

Include files are now searched in sys.path before Cython's own Includes directory, so third-party pxd files can override Cython's. [github.com](https://github.com/cython/cython/blob/3.0.0/CHANGES.rst)
- **Signature changed** `Cython.Build.build_ext`  

Was class old_build_ext(\_build_ext.build_ext); now class build_ext(\_build_ext, object). [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.Build.cythonize`  

Was def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False, force=None, language=None, exclude_failures=False, \*\*options); now def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False... [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.Build.Cythonize.cythonize`  

Was def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False, force=None, language=None, exclude_failures=False, \*\*options); now def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False... [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.Build.Dependencies.Context.find_include_file`  

Was def find_include_file(self, filename, pos); now def find_include_file(self, filename, pos=None, source_file_path=None). [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.Build.Dependencies.Context.find_pxd_file`  

Was def find_pxd_file(self, qualified_name, pos, sys_path=True); now def find_pxd_file(self, qualified_name, pos=None, sys_path=True, source_file_path=None). [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.Build.Dependencies.Context.find_pyx_file`  

Was def find_pyx_file(self, qualified_name, pos); now def find_pyx_file(self, qualified_name, pos=None, source_file_path=None). [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.Build.Dependencies.Context.find_submodule`  

Was def find_submodule(self, name); now def find_submodule(self, name, as_package=False). [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.Build.Dependencies.Context.search_include_directories`  

Was def search_include_directories(self, qualified_name, suffix, pos, include=False, sys_path=False); now def search_include_directories(self, qualified_name, suffix=None, source_pos=None, include=False, sys_path=False... [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.Build.Dependencies.cythonize`  

Was def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False, force=None, language=None, exclude_failures=False, \*\*options); now def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False... [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.Build.Dependencies.cythonize_one`  

Was def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, raise_on_failure=True, embedded_metadata=None, full_module_name=None, progress=''); now def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None... [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.Build.Distutils.build_ext`  

Was class old_build_ext(\_build_ext.build_ext); now class build_ext(\_build_ext, object). [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.Build.Inline.cythonize`  

Was def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False, force=None, language=None, exclude_failures=False, \*\*options); now def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False... [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.Build.IpythonMagic.cythonize`  

Was def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False, force=None, language=None, exclude_failures=False, \*\*options); now def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False... [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.CodeWriter.AsyncIteratorNode`  

Was class AsyncIteratorNode(ExprNode); now class AsyncIteratorNode(ScopedExprNode). [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.CodeWriter.CodeWriter`  

Was class CodeWriter(DeclarationWriter); now class CodeWriter(StatementWriter, ExpressionWriter). [pypi.org](https://pypi.org/project/Cython/3.0.0/)
- **Signature changed** `Cython.CodeWriter.GeneratorExpressionNode.__init__`  

Was def \_\_init\_\_(self, pos, \*\*kw); now def \_\_init\_\_(self, pos, \*args, \*\*kwds). [pypi.org](https://pypi.org/project/Cython/3.0.0/)

And 209 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## cython 0.29 breaking changes

cython 0.29, released October 14, 2018: 58 breaking changes.

- **Behavior changed**  

Cython now emits a warning when no language_level (2, 3 or '3str') is set explicitly, and the default is planned to change in the next major release. Set language_level explicitly to avoid surprises. [github.com](https://github.com/cython/cython/blob/0.29/CHANGES.rst)
- **Behavior changed**  

Raising exceptions from nogil code now automatically acquires the GIL instead of requiring an explicit with gil block. [github.com](https://github.com/cython/cython/blob/0.29/CHANGES.rst)
- **Behavior changed**  

When PEP-489 support is enabled, reloading a module now raises an exception instead of overwriting static module state. [github.com](https://github.com/cython/cython/blob/0.29/CHANGES.rst)
- **Behavior changed**  

Generated modules no longer warn on import when the NumPy array type is larger than at compile time. [github.com](https://github.com/cython/cython/blob/0.29/CHANGES.rst)
- **Behavior changed**  

Exception handling in generators and coroutines under CPython 3.7 was adapted, which changes error reporting and tracebacks for users of 0.28. [github.com](https://github.com/cython/cython/blob/0.29/CHANGES.rst)
- **Signature changed** `Cython.Build.Dependencies.Context.__init__`  

Was def \_\_init\_\_(self, include_directories, compiler_directives, cpp=False, language_level=2, options=None, create_testscope=True); now def \_\_init\_\_(self, include_directories, compiler_directives, cpp=False, language_level=None... [pypi.org](https://pypi.org/project/Cython/0.29/)
- **Signature changed** `Cython.Build.Dependencies.DependencyTree.transitive_fingerprint`  

Was def transitive_fingerprint(self, filename, extra=None); now def transitive_fingerprint(self, filename, module, compilation_options). [pypi.org](https://pypi.org/project/Cython/0.29/)
- **Signature changed** `Cython.Build.Inline.Context.__init__`  

Was def \_\_init\_\_(self, include_directories, compiler_directives, cpp=False, language_level=2, options=None, create_testscope=True); now def \_\_init\_\_(self, include_directories, compiler_directives, cpp=False, language_level=None... [pypi.org](https://pypi.org/project/Cython/0.29/)
- **Signature changed** `Cython.Build.Inline.cython_inline`  

Was def cython_inline(code, get_type=unsafe_type, lib_dir=os.path.join(get_cython_cache_dir(), 'inline'), cython_include_dirs=None, force=False, quiet=False, locals=None, globals=None, \*\*kwds); now def cython_inline(code... [pypi.org](https://pypi.org/project/Cython/0.29/)
- **Signature changed** `Cython.Build.IpythonMagic.cython_inline`  

Was def cython_inline(code, get_type=unsafe_type, lib_dir=os.path.join(get_cython_cache_dir(), 'inline'), cython_include_dirs=None, force=False, quiet=False, locals=None, globals=None, \*\*kwds); now def cython_inline(code... [pypi.org](https://pypi.org/project/Cython/0.29/)

And 48 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## cython 0.28 breaking changes

cython 0.28, released March 13, 2018: 52 breaking changes.

- **Behavior changed** `__richcmp__`  

The first argument of \_\_richcmp\_\_ is now recognised as self with its correct type, which can change code that relied on it being untyped. [github.com](https://github.com/cython/cython/blob/0.28/CHANGES.rst)
- **Signature changed** `Cython.Build.Dependencies.cythonize_one`  

Was def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, raise_on_failure=True, embedded_metadata=None, progress=''); now def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, raise_on_failure=True... [pypi.org](https://pypi.org/project/Cython/0.28/)
- **Signature changed** `Cython.CodeWriter.analyse_type_annotation`  

Was def analyse_type_annotation(annotation, env); now def analyse_type_annotation(annotation, env, assigned_value=None). [pypi.org](https://pypi.org/project/Cython/0.28/)
- **Signature changed** `Cython.CodeWriter.BoolBinopNode.generate_bool_evaluation_code`  

Was def generate_bool_evaluation_code(self, code, final_result_temp, and_label, or_label, end_label, fall_through); now def generate_bool_evaluation_code(self, code, final_result_temp, final_result_type, and_label, or_label, end_label... [pypi.org](https://pypi.org/project/Cython/0.28/)
- **Signature changed** `Cython.CodeWriter.BoolBinopResultNode.generate_bool_evaluation_code`  

Was def generate_bool_evaluation_code(self, code, final_result_temp, and_label, or_label, end_label, fall_through); now def generate_bool_evaluation_code(self, code, final_result_temp, final_result_type, and_label, or_label, end_label... [pypi.org](https://pypi.org/project/Cython/0.28/)
- **Signature changed** `Cython.Compiler.Buffer.ModuleNode.generate_includes`  

Was def generate_includes(self, env, cimported_modules, code); now def generate_includes(self, env, cimported_modules, code, early=True, late=True). [pypi.org](https://pypi.org/project/Cython/0.28/)
- **Signature changed** `Cython.Compiler.Buffer.ModuleNode.generate_type_ready_code`  

Was def generate_type_ready_code(self, env, entry, code); now def generate_type_ready_code(self, entry, code). [pypi.org](https://pypi.org/project/Cython/0.28/)
- **Signature changed** `Cython.Compiler.Builtin.StructOrUnionScope.declare_var`  

Was def declare_var(self, name, type, pos, cname=None, visibility='private', api=0, in_pxd=0, is_cdef=0, allow_pyobject=0); now def declare_var(self, name, type, pos, cname=None, visibility='private', api=0, in_pxd=0, is_cdef=0... [pypi.org](https://pypi.org/project/Cython/0.28/)
- **Signature changed** `Cython.Compiler.Code.GlobalState.get_cached_unbound_method`  

Was def get_cached_unbound_method(self, type_cname, method_name, args_count); now def get_cached_unbound_method(self, type_cname, method_name). [pypi.org](https://pypi.org/project/Cython/0.28/)
- **Signature changed** `Cython.Compiler.CythonScope.CEnumType`  

Was class CEnumType(CType); now class CEnumType(CIntLike, CType). [pypi.org](https://pypi.org/project/Cython/0.28/)

And 42 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
