-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BUG: fixed conflict with python2.4 due to calling PyErr_WarnEx() in conversion_utils.c #88
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
Conversation
Thanks, that's useful! There are 3 other instances of this in the multiarray sources, so it's probably best to change them all to the macro so no others will learn from bad examples ;-) |
OK, actually none of the others is called with PyExc_DeprecationWarning... In fact the present case specifies a stacklevel of 0 rather than 1, so it's not exactly equivalent to DEPRECATE(msg) (nor the PyErr_Warn() case) either. Not sure if that's an issue - it's not clear to me what a stacklevel of 0 means in this case. |
FWIW that stuff wasn't entirely clear to me either when I wrote it. I figured stack level 0 was what you would want, because the C function call doesn't count as a stack level, so going deeper would just be throwing away useful information. |
Meaning, I guess, e.g. this warning |
Yeah, that message looks fine to me. |
I'll go ahead then and use DEPRECATE(). |
I agree, it does (silly attempt to save a variable). |
That's the compiler's job ;) |
I moved the trailing comment down a line, removed a trailing space, and squashed the commits together before committing as 5cb956e. Thanks for the fix. |
Merge in ~STEPAN.SINDELAR_ORACLE.COM/numpy-hpy from mq/GR-40827 to labs-hpy-port * commit '902ce0f25458d3b7075f2fbc9cb8222c902d3a88': address comments and other few fixes address comments fix bugs Port "_get_sfloat_dtype" to HPy fix bug remove hpy abort fix bug fix bug fix memory leak issue
feat: Add vabdl_s8
import numpy failed; need to use PyErr_Warn() for version<2.5, which is now handled with DEPRECATE macro