Opened 3 years ago
Closed 2 years ago
#18303 closed enhancement (fixed)
Cython-3.0.10 (Python module) (Wait until PyYAML can use this or archive PyYAML?)
| Reported by: | Bruce Dubbs | Owned by: | Bruce Dubbs |
|---|---|---|---|
| Priority: | normal | Milestone: | 12.2 |
| Component: | BOOK | Version: | git |
| Severity: | medium | Keywords: | |
| Cc: |
Description (last modified by )
New major version.
This version is not compatible with PyYAML-6.
Change History (14)
comment:1 by , 3 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 3 years ago
comment:3 by , 3 years ago
| Description: | modified (diff) |
|---|
comment:4 by , 3 years ago
| Summary: | Cython-3.0.0 (Python module) → Cython-3.0.0 (Python module)(Wait until PyYAML can use this) |
|---|
comment:5 by , 3 years ago
| Milestone: | 11.4 → 99-Waiting |
|---|
comment:6 by , 3 years ago
PyYAML issue: https://github.com/yaml/pyyaml/issues/601
Maybe the fix can arrive for 12.0 or not.
comment:7 by , 3 years ago
| Owner: | changed from to |
|---|---|
| Status: | assigned → new |
follow-up: 10 comment:8 by , 3 years ago
Here's a sed that will get PyYAML-6.0.1 to build with Cython-3:
sed -i 's/Cython.Distutils import build_ext/Cython.Distutils.old_build_ext import old_build_ext/' setup.py
It's a hack but I don't see any movement from the PyYAML team so why hold up updating other packages because of it.
comment:9 by , 2 years ago
| Summary: | Cython-3.0.0 (Python module)(Wait until PyYAML can use this) → Cython-3.0.10 (Python module)(Wait until PyYAML can use this) |
|---|
Now 3.0.10.
comment:10 by , 2 years ago
Replying to Joe Locash:
Here's a sed that will get PyYAML-6.0.1 to build with Cython-3:
sed -i 's/Cython.Distutils import build_ext/Cython.Distutils.old_build_ext import old_build_ext/' setup.pyIt's a hack but I don't see any movement from the PyYAML team so why hold up updating other packages because of it.
For some reason I just noticed this, but I like to play around with sed. Here is an equivalent sed that is a little shorter, but I'm not sure it is more clear.
sed -E '/Distutils /{s/utils/&.old_build_ext/;s/\ (build_ext)/ old_\1/}' \
-i setup.py
It does the same thing, but I have not tested the change for either PyYAML or Cython-3.
comment:12 by , 2 years ago
| Summary: | Cython-3.0.10 (Python module)(Wait until PyYAML can use this) → Cython-3.0.10 (Python module) (Wait until PyYAML can use this or archive PyYAML?) |
|---|
comment:13 by , 2 years ago
| Milestone: | 99-Waiting → 12.2 |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
I'll archive pyyaml and update to Cython-3.0.10.
comment:14 by , 2 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fixed at commit c4a9428ef1.

3.0.0 (2023-07-17)
Bugs fixed
3.0.0 rc 2 (2023-07-13)
Bugs fixed
3.0.0 rc 1 (2023-07-12)
Features added
Bugs fixed
cpdefenum could lead to invalid switch statements.constqualifier from the item type.bintcould conflict with those of item typeint.cimport cython.cimports…could raise anImportErrorinstead of anAttributeErrorwhen looking up package variable names._PyGC_FINALIZED()C-API macro is no longer used.debugwas resolved.cython.inline()on Windows was resolved.cython --versionnow prints the version to stdout instead of stderr.Other changes
np.ulong_twere removed from the NumPy declarations, synching Cython with upstream NumPy v1.25.0. The aliases were confusing since they could mean different things on different platforms.3.0.0 beta 3 (2023-05-24)
Features added
extern "C"andextern "C++"markers that Cython generates forpublicfunctions can now be controlled by setting the C macroCYTHON_EXTERN_C.inthandling code was adapted to make use of the newPyLonginternals in CPython 3.12.int128is now always supported, although slow if dedicated C-API support is missing (_PyLong_AsByteArray()), specifically in the Limited C-API.@dataclasses.dataclassand@functools.total_orderingdecorators can now be used on extension types. Using the corresponding@cython.*decorator will automatically turn a Python class into an extension type (no need for@cclass).embedsignature.formatwas added to select the format of the docstring embedded signatures betweenpython,cand argumentclinic.@ccalltogether with@cfunc, and applying@cfuncto a@ufunc. Cython also warns now when a directive is applied needlessly.Bugs fixed
PYX_IS_UNSIGNEDwas accidentally duplicated in beta 2 which lead to C compile errors.TypeErrorinstead of aValueErroron creation.qualnameandmodulewere not available inside of class bodies.noexceptwas not automatically applied to function pointer attributes in extern structs.tuple[()]could not be printed.--workingoption could lead to sources not being found.0.29.35release.Other changes
else:clause. This probably has no practical impact.(int, int)are no longer accepted in Python annotations and require the Python notation instead (e.g.tuple[cython.int, cython.int]).except +nogil(declaring a C++ exception handler function callednogil) is now rejected because it is almost certainly a typo fromexcept + nogil.3.0.0 beta 2 (2023-03-27)
Features added
<cmath>,<numbers>andstd::anywere added.Bugs fixed
nogilmemoryview code in 3.0.0b1.Nonedefault arguments for arguments with fused memoryview types could select a different implementation in 3.0 than in 0.29.x. The selection behaviour is generally considered suboptimal but was at least reverted to the old behaviour for now.power operator accidentally added a dependency on the GIL, which was really only required on failures.from cython cimport … as …could lead to imported names not being found in annotations.cimport_from_pyxcould miss some declarations.constusage in internally generated utility code were resolved.language_level=2, imports of modules in packages could return the wrong module in Python 3.typing.Optionalcould fail on tuple types.memoryviewtype generated incorrect C code.depfilegeneration were resolved.3.0.0 beta 1 (2023-02-25)
Features added
exceptdeclaration to the signature. This was a long-standing source of bugs, but can require adding thenoexceptdeclaration to existing functions if exception propagation is really undesired.legacy_implicit_noexcept=Truefor a transition period to keep the previous, unsafe behaviour. This directive will eventually be removed in a later release.@cython.ufuncautomatically generates a (NumPy) ufunc that applies the calculation function to an entire memoryview.power operator now behaves more like in Python by returning the correct complex result if required by math. A newcpowdirective was added to turn on the previous C-like behaviour.*powmethods now support the 2- and 3-argument variants.list[float]) are now better supported.memoryviewis now a known builtin type with optimised properties.cpdef enumnow inherits fromIntFlagto better match both Python and C semantics of enums.PEP-614 <https://peps.python.org/pep-0614/>_: decorators can now be arbitrary Python expressions.cpdefenums can now be pickled.reversed()can now be used together with C++ iteration.complex.his now properly detected.cppclassdefinitions are supported.cpp_localsno longer have to be "assignable".cythonize --helpnow also prints information about the supported environment variables.Bugs fixed
intrejectedlongunder Py2 in the alpha-11 release. They are now ignored again (as always before) whenlanguage_level=2, and accept bothintandlongin Py2 (and onlyintin Py3) otherwise.int(Py_UCS4)returned the code point instead of the parsed digit value.floattype was not inferred on assignments.objectitem type were not supported in Python type declarations.collections.abc.Sequenceby setting thePy_TPFLAGS_SEQUENCEtype flag directly.delfinaliser methods were not always called if they were only inherited.consttypes could not be returned from functions.cdef publicfunctions declared in .pxd files could use an incorrectly mangled C name.cdef publicfunctions used an incorrect linkage declaration in C++.memcpy().matmul,truediv,floordivfailed to type theirselfargument.annotation_typingdirective was missing in pure Python mode.@dataclassdirective was accidentally inherited by methods and subclasses.@dataclassarguments, hashing, inheritance andrepr()were resolved.cpdefenums no longer useOrderedDictbutdictin Python 3.6 and later.init.pypackage modules.impmodule were replaced withimportlib.cythonandcythonizecommands ignored non-existing input files without error.cython.*module names were not reported as errors.kwargsarguments did not show up inlocals().//and\\for finding source files failed on Windows.setup.cfgwas missing from the source distribution.PyConfigAPI instead on CPython versions that support it (3.8+).0.29.33release.Other changes
from somemodule cimport class/struct/union somenamewas removed. The type modifier is not needed here and a plaincimportof the name will do.cdef int a[4]) are now (silently) deprecated in favour of the Java-stylecdef int[4] aform. The latter was always available and the Python type declaration syntax already used it exclusively (a: int[4]).cibuildwheeltool.Tempitamodule no longer contains HTML processing capabilities, which were found to be broken in Python 3.8 and later.cython-mode.elis now maintained in a separate repo: https://github.com/cython/emacs-cython-mode.dev0version suffix for unreleased source installations.See CHANGES.rst for alpha level changes.