Cython 3.0 beta 1 is released

966 views
Skip to first unread message

Stefan Behnel

unread,
Feb 26, 2023, 5:32:04 AM2/26/23
to Cython-users, Cython-devel
Hi all,

Cython 3.0 has left the alpha status – the first beta release is available
from PyPI.

The changes in this release are huge – and the full list of improvements
compared to the 0.29.x release series is entirely incredible. Cython 3.0 is
better than any other Cython release before, in all aspects. It's much more
Python, integrates better with C++, supports more Python implementations
and configurations, provides many great new language features –
it's faster, safer and easier to use. It's simply better.

https://cython.readthedocs.io/en/latest/src/changes.html#beta-1-2023-02-25

The development of the Cython 3.0 release series started all the way back
in 2018, with the first branch commit happening on October 27, 2018.

https://github.com/cython/cython/commit/c2de8efb67f80bff59975641aac387d652324e4e

List of Milestones along the way, and a long list of contributors:
https://github.com/cython/cython/issues/4022#issuecomment-1404305257

Thank you to everyone who contributed. Especially to David Woods, who
contributed a tremendous amount of changes, both fixes and new features.
Thank you, David!

A couple of people have also joined in an effort to make the documentation
reflect what this great new Cython has to offer. Thank you all, our users
will love you for your help.

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

https://cython.readthedocs.io/en/latest/

Now, go and give it a try. We've taken great care to make the transition
from Cython 0.29.x as smooth as possible, which was not easy given the
large amount of changes, including some well-motivated breaking changes. We
wanted to let all users benefit from this new release.

Let us know how it works for you, and tell others about it. :)

Have fun,
Stefan

Jérôme Kieffer

unread,
Feb 26, 2023, 12:07:00 PM2/26/23
to cython...@googlegroups.com
Hi Stefan,

Thanks a lot for coordinating all those contributions! that's a tremendous amount of work.

Last week we were trolling Cython for having the longest alpha stage development ever ... I am glad it is over.
I just checked Cython3b1 on the packages I am maintaining (FabIO and pyFAI) and I confirm you it works great !!!

Also, thanks a lot to all the contributors.

Cheers,

Jerome

Zhang David

unread,
Feb 27, 2023, 3:05:08 AM2/27/23
to cython...@googlegroups.com
Thank you Stefan and everybody! This is very exciting! 

I moved to b1, and ran into the issue below: 

I start to see a lot of warning msgs: 
"The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython."

...b/c I used to declare functions as: 

cdef void foo(self) nogil except *

I've tried changing it to: cdef void foo(self) except * nogil - this compiles, but my Pycharm is complaining about it and the entire pyx file is red lined.

What would be the best recommended way to modify this? Should I try drop except since the new b1 release seems to propagate errors by default? 

Thanks!

--

---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cython-users/20230226180657.123efdeb%40antarctica.fournet.lan.

Stefan Behnel

unread,
Feb 27, 2023, 3:16:33 AM2/27/23
to cython...@googlegroups.com
Zhang David schrieb am 27.02.23 um 01:27:
> Thank you Stefan and everybody! This is very exciting!
>
> I moved to b1, and ran into the issue below:
>
> I start to see a lot of warning msgs:
> "The keyword 'nogil' should appear at the end of the function signature
> line. Placing it before 'except' or 'noexcept' will be disallowed in a
> future version of Cython."
>
> ...b/c I used to declare functions as:
>
> cdef void foo(self) nogil except *
>
> I've tried changing it to: cdef void foo(self) except * nogil - this
> compiles, but my Pycharm is complaining about it and the entire pyx file is
> red lined.

Please submit a bug report on their side. They track Cython issues under
the "Cython" subsystem.

https://youtrack.jetbrains.com/issues/PY?q=%23Cython%20


> What would be the best recommended way to modify this? Should I try drop
> except since the new b1 release seems to propagate errors by default?

You can do that, if you switch to Cython 3.0 completely. You don't need to
specify "except *" for a "void" function any more.

0.29.x still has the old semantics (although it now also supports the new
'nogil' position), so if you need to support both Cython series, then the
best way is to reorder the two modifiers and live with the PyCharm
complains for now.

Or you live with the Cython warnings. It still works as before, it just
warns that the old position will go away at some point.

Stefan

Zhang David

unread,
Feb 27, 2023, 12:55:50 PM2/27/23
to cython...@googlegroups.com
Thank you - I created an issue tkt here for Pycharm users to track here: https://youtrack.jetbrains.com/issue/PY-59249/Latest-Cython-3.0.0b1-except-noexcept-legal-syntax-red-lined

--

---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.

Clément Robert

unread,
Mar 16, 2023, 5:58:35 AM3/16/23
to cython-users
Hi,
What are the plans for following releases ? Are you guys planning on making more betas before 3.0.0 final ? If so, what would be the expected interval between two betas, and when do you expect the final release to be ready ?
I haven't been able to find any information about this, sorry if I missed it !
Thanks for your continued effort on Cython, much appreciated !
Clément

Stefan Behnel

unread,
Mar 27, 2023, 10:41:14 AM3/27/23
to Cython-users, Cython-devel
Hi everyone,

we received a lot of feedback for our first beta release (thanks you,
everyone!) and were able to (hopefully) resolve all blockers that prevented
some of you from making good use of it.

Let's hear what you think about the second beta. It's up on PyPI.

https://cython.readthedocs.io/en/latest/src/changes.html#beta-2-2023-03-26

Have fun,
Stefan



Stefan Behnel schrieb am 26.02.23 um 11:31:

Zhang David

unread,
Mar 27, 2023, 12:35:10 PM3/27/23
to cython...@googlegroups.com
This is great to hear!! Can't wait to try it out.

Will conda/conda-forge pick up the latest b2 release soon? 

--

---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages