Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLD: require Cython >=3.0.4, drop 0.29.X support #19714

Merged
merged 1 commit into from Dec 20, 2023

Conversation

rgommers
Copy link
Member

This will make maintenance a bit easier, and it's time; NumPy dropped Cython 0.29.X support months ago and this has gone fine.

This also fixes an annoying build warning that shows up twice, namely:

[5/7] Generating 'scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c'
performance hint: /home/rgommers/code/scipy/scipy/_lib/_ccallback_c.pyx:138:82: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

The code is correct and not easy to change. It's only test code as well. The directive to silence the unhelpful hint was introduced in Cython 3.0.4, hence that's used as the new minimum version.

This will make maintenance a bit easier, and it's time; NumPy
dropped Cython 0.29.X support months ago and this has gone fine.

This also fixes an annoying build warning that shows up twice, namely:

```
[5/7] Generating 'scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c'
performance hint: /home/rgommers/code/scipy/scipy/_lib/_ccallback_c.pyx:138:82: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
```

The code is correct and not easy to change. It's only test code as well.
The directive to silence the unhelpful hint was introduced in Cython
3.0.4, hence that's used as the new minimum version.
@rgommers rgommers added scipy._lib maintenance Items related to regular maintenance tasks Cython Issues with the internal Cython code base labels Dec 19, 2023
@rgommers rgommers added this to the 1.13.0 milestone Dec 19, 2023
Copy link
Member

@h-vetinari h-vetinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! :)

Copy link
Contributor

@tylerjereddy tylerjereddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well, we've always tried to bump Cython regularly IIRC

@tylerjereddy tylerjereddy merged commit 309bfd5 into scipy:main Dec 20, 2023
28 checks passed
@rgommers rgommers deleted the cython3-upgrade branch December 20, 2023 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cython Issues with the internal Cython code base maintenance Items related to regular maintenance tasks scipy._lib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants