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: fix compatibility with Cython 3.1 #4948

Merged
merged 4 commits into from
Oct 3, 2024

Conversation

neutrinoceros
Copy link
Member

PR Summary

Close #4044
Following Cython's migration guide

@neutrinoceros neutrinoceros added build related to the build process enhancement Making something better labels Jul 20, 2024
@neutrinoceros neutrinoceros added this to the 4.4.0 milestone Jul 20, 2024
@neutrinoceros neutrinoceros force-pushed the bld/remove_Cython_DEF branch 2 times, most recently from d08d348 to 82994dc Compare July 20, 2024 14:26
@neutrinoceros neutrinoceros changed the title BLD: remove upper bound for Cython (drop deprecated DEF statements) BLD: remove upper bound for Cython (drop deprecated DEF statements) Jul 20, 2024
@neutrinoceros neutrinoceros force-pushed the bld/remove_Cython_DEF branch 3 times, most recently from f9ddcaf to 01b10d7 Compare July 20, 2024 14:49
@neutrinoceros neutrinoceros marked this pull request as ready for review July 20, 2024 15:24
chrishavlin
chrishavlin previously approved these changes Jul 22, 2024

from yt.utilities.lib.fp_utils cimport *

from .oct_container cimport Oct, OctreeContainer

cdef extern from "numpy/npy_math.h":
double NPY_PI
Copy link
Member Author

Choose a reason for hiding this comment

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

To see why this change was needed, see https://cython.readthedocs.io/en/latest/src/changes.html#other-changes

The previously shipped NumPy C-API declarations (cimport numpy) were removed. NumPy has been providing version specific declarations for several versions now. (Github issue #5842)

@neutrinoceros neutrinoceros changed the title BLD: remove upper bound for Cython (drop deprecated DEF statements) BLD: fix compatibility with Cython 3.1 Jul 26, 2024
@neutrinoceros neutrinoceros marked this pull request as ready for review July 26, 2024 10:15
@chrishavlin
Copy link
Contributor

This looks good to me, but since it's been a while and the sph projections touched a lot of cython, I think it'd be nice to merge with main here to double check that we haven't introduced any additional compatibility issues. What do you think?

@neutrinoceros
Copy link
Member Author

rebased on the tip of main !

@chrishavlin chrishavlin merged commit 7956173 into yt-project:main Oct 3, 2024
21 checks passed
@neutrinoceros neutrinoceros deleted the bld/remove_Cython_DEF branch October 3, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build related to the build process enhancement Making something better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BLD: Future incompatibility with Cython 3.1
2 participants