-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Deprecate NPY_CHAR #2801
Comments
@rgommers, how do I deprecate it? In the release notes? Should this be then removed from master but kept in the 1.7 branch? How exactly should this be removed from the master branch? Just removing it from the Thanks for any tips here. P.S. Where is the github issue corresponding to the ticket 2228? I was not able to find it. I thought all issues were migrated to github... |
The Trac tickets with numbers higher than 2225 or so don't have Github equivalents. Trac still has to be made read-only, then the last tickets should be migrated. Deprecation should be noted in the release notes. It would also be good to use |
It's extremely difficult to get a compiler warning out of use of an enum. I guess we could exploit the C compiler extensions for deprecations in some complicated way -- maybe give the enum a different name like NPY_CHAR_REAL and then
? If we've already broken this multiple times and the only code that anyone can find that uses it is unmaintained, then maybe we should just remove it... no-one who actually has NPY_CHAR-using code is going to see the warnings anyway, or bother setting |
@njsmith I agree that it's not worth spending a lot of effort on. Deprecating in the release notes for 1.7 and removing it for 1.8 should be OK too. |
@rgommers, can you please review the PR I just sent? |
So after that PR gets merged, the other thing to do is to get a PR to remove NPY_CHAR entirely from master? |
Indeed. Let's give that some time though, usually it's not a good idea to rip something out right after deprecating it. I'll change the Milestone for this issue to 1.8. |
Thanks! |
Time to rip this out of master! |
+1 |
I looked at this but swiftly got confused. (Perhaps because I have no idea what
I suppose we could just remove it and see who screams, but someone here might have a better idea of what would happen if we tried... |
@pearu could you comment on the f2py question above? |
Current f2py users certainly use NPY_CHAR as character array arguments are quite common in Fortran world. To wrap Fortran character arrays, f2py uses NPY_CHAR because at the time of developing f2py, numpy did not have NPY_STRING. Now that NPY_STRING exists, f2py should use it. In fact, it would make wrapping Fortran character arrays to Python much more natural. Currently, f2py users must play a little bit to get hang of how to manage character array arguments. Implementing NPY_STRING support has been in my TODO list for years. Unfortunately due to the lack of time as well as more cumbersome development cycle of numpy [1], I had to postpone this task to future again and again. I'll try to locate some time and update f2py to use NPY_STRING. [1] "It's me, not you". In past it was much easier to fix small bugs or develop some feature in numpy.f2py than nowadays, as committing patches was straightforward with subversion. I use git rarely and each time I spend more time to commit patches (due to my git ignorance) than developing a particular patch. I have two options: learn git or create a svn repo of latest numpy and develop f2py from there. The latter would be quickest for me to get things done. |
@pearu thanks for the explanation. If it helps you get this done, I'm happy to take your svn repo commits or emailed patches and apply them. |
Hi @pearu! I think it's a great investment to learn git. But if you prefer subversion, you can use subversion with github easily: https://github.com/blog/1178-collaborating-on-github-with-subversion |
Thanks, Certik, for the hint. However, the suggested workflow does not work with numpy. For instance, I cannot commit a newly created branch (it appears to be forbidden). I'll look other options.. |
Ok, I was able to get svn working with github using my numpy fork. I'll let you know when its ready for pull. |
Guess we'll probably have to bump this to 1.9. |
@pearu Any progress? |
Moving up to 1.10 blockers. |
Moving up to 1.11. |
is this deprecated yet? if not how to deprecate a numpy feature? i'm aware with django internals only |
@pearu any progress? |
gh-8948 for the deprecation. |
I believe this has been closed by #8948. |
This broke ABI compatibility in 1.6.x. Should be deprecated and removed, see
http://projects.scipy.org/numpy/ticket/2228(dead link)Archive of a sort here
The text was updated successfully, but these errors were encountered: