-
-
Notifications
You must be signed in to change notification settings - Fork 11k
DEP: Remove noprefix.h #12402
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
DEP: Remove noprefix.h #12402
Conversation
Why remove the file? I'd just leave it in indefinitely. |
Its use is managed by |
Are you sure it is managed by I would like to clean up dead code in the codebase.
Some of the macros in this 10 year old file look dangerous in 2018, like assuming |
Yeah, you are right about NPY_API_VERSION. But I still think it is a bad idea to remove it, in retrospect I think it was also a bad idea to remove the numeric compatibility module, which I did for the same reasons as you put forth. The numarray removal went OK, but I suspect that was because STSci was one of the few users, the numeric removal actually had to be delayed a year on account on one user, and we still caught Konrad Hinsen by surprise. |
Maybe we can start with a warning on import? https://stackoverflow.com/questions/3826832/is-there-a-portable-way-to-print-a-message-from-the-c-preprocessor. Or we could even make it an error for 1.16 and see if there are any complaints, we can always fix it in a microversion down the line. Unfortunately, I think few would notice a warning in a C compilation... |
We definitely cannot remove this for 1.17.0, it will break too much. The rationale for this in #12402 (comment) is fair, but I'm afraid we need a longer time scale as well as warnings and actively removing this stuff from at least high-profile code bases like SciPy (already done, thanks @mattip) and Matplotlib. And opening issues on other usage we find with codesearch.com. A deprecation warning in 1.16, and removal in 1.18 seems to be the minimum - 2 releases and 1 year of heads up at least. |
Sounds like we might want to leave this in indefinitely with a warning. We should mention the sed script |
I think the removal in SciPy is breaking wheel builds -- I'm inclined to revert the removal for 1.2.0 |
Thinking about this some more, I've come around to being -1 on removing |
All but two of the hist were false-positives: people who had forked or copied numpy, scipy, or matplotlib into their repos. In any case I will close this for now, maybe we can bring it up again in some future cleanup. |
We have yet another backward-compatible shim of defines to replace
npy_*
with*
, for instancenpy_byte
withbyte
. It was useful during a transition period long ago but should no longer be used since it could cause name conflicts. Will conflict with #12401