[Cython] Cython 0.29 – or 29.0 ?

Stefan Behnel stefan_ml at behnel.de
Fri Aug 17 05:44:50 EDT 2018


Robert Bradshaw schrieb am 16.08.2018 um 00:48:
> If we're going to ditch the 0.x, I'd go for 1.0 as well. I'm a huge fan of
> semantic versioning.

I'm ok with it, just fear that it might become excessive for Cython (ok,
I'm the one who proposed jumping to 29.0, but...). Basically, any time we
add something to Includes/ or anything to the language, we'd have to
increase the minor version, and any time we fix something that might break
some person's code, we'd have to increase the major version? Some changes
are simply not important enough to merit shouting out the breakage that
almost no-one would otherwise notice. And unless we're adding new syntax
that was an error before, almost any change in the compiler bears a tiny
risk of breaking something for someone.


> The primary reasons we kept the 0.x scheme were that
> 
> * We wanted full compatibility with CPython (we're nearly there, or at
> least it's safe to say the differences are on par with those between
> different versions and implementations of Python), and

I've half-heartedly considered it done for years. The rest are bugs, and we
have enough of those, also enough that are worse than incomplete Python
semantics. The list of Python related tickets in github is short:

https://github.com/cython/cython/issues?q=is%3Aissue+is%3Aopen+label%3A%22Python+Semantics%22

and the most relevant one is certainly #1159, which hasn't seen much
attention in years:

https://github.com/cython/cython/issues/1159


> * We wanted the flexibility to possibly jettison archaic features of the
> language or otherwise clean things up.
> 
> It's worth revisiting to see if either of these are still relevant (*and*
> likely to be worked on in the near future).

It's true that Cython often offers more than one way to do something, also
in terms of syntax. There is a certain level of perpetual request for
static typing in PEP-489 notation (which is supported), but I don't see it
completely replace Cython's own efficient syntax any time soon, it's not a
clear champion.

We can think about dropping some of the redundant pure Python syntax when
we switch to Py3-by-default, maybe next year. But even then, we'd have to
keep the Py2-mode around in order to support existing code bases.

Hej, that gives us an alternative for the versioning switch. We could
release Cython 3.0 when we change the default language level (and require
users to select "language_level=2" for legacy code). Definitely a breaking
change that merits inceasing the major version, and 3.0 seems very suitable.

Stefan


More information about the cython-devel mailing list