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

RFC: eliminate some unused deprecated Cython macros #4376

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

neutrinoceros
Copy link
Member

PR Summary

IF and DEF macros are deprecated in Cython 3. While it is not urgent to migrate to long term replacements, here I'm eliminating only occurences that are actually unused.

@neutrinoceros neutrinoceros added the dead code removing internal bits that have no effect label Mar 18, 2023
@neutrinoceros neutrinoceros marked this pull request as ready for review March 18, 2023 14:16
else:
self.refined_ghosts_list._set(mi1_n, mi2_n)

# alternative implementation by Meagan Lang
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for putting this in; my big concern was that pointers wouldn't be retained easily.

@@ -15,8 +15,6 @@ cimport numpy as np
from cython.view cimport array as cvarray
from libc.stdlib cimport free, malloc

DEF Nch = 4
Copy link
Member

Choose a reason for hiding this comment

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

huh, we don't use this anywhere? Maybe we wanted to and never did.

Copy link
Member Author

Choose a reason for hiding this comment

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

this exact line is present in 5 files, only 2 of which actually use it. I suppose it appeared by copy-pasting or just hanged there after the user code was moved to different modules.

@neutrinoceros neutrinoceros merged commit 6f69b2d into yt-project:main Mar 31, 2023
@neutrinoceros neutrinoceros deleted the cython3_depr branch March 31, 2023 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dead code removing internal bits that have no effect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants