-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Fix invalid typestring size #2797
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
Awesome, thanks for working on this. I believe this should be a regular DEPRECATE, not DEPRECATE_FUTUREWARNING (since the new behaviour in the future will be an exception, not silently altered results). Needs a test. |
Your tests are failing. |
if (temp != NULL) { | ||
if (temp->elsize != itemsize) { | ||
if (DEPRECATE(msg) < 0) { | ||
return -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing a Py_DECREF(temp)
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops...good catch :)
There are test failures here. |
@jayvius, would you have time to finish this? This issue is a blocker for the 1.7 release. |
Yes, I'm working on addressing all the issues with this pull request by On Sun, Dec 16, 2012 at 2:18 PM, Ondřej Čertík notifications@github.comwrote:
|
Thanks! I really appreciate your help on this. |
After this goes into 1.7 you might want to consider moving the deprecation tests into the new test_deprecation.py module. |
I know there are other deprecation tests scattered about too, e.g. for the
|
Anyone know why 'g12' type would throw a warning on my Macbook but fail to throw a warning on the Travis build server? It seems like 12 shouldn't be a valid size for 'g' regardless of platform. |
Don't know why the warning doesn't show up on Python <2.7, but on 2.7 and 3.x it looks like the test will fail anyway unless you run it with |
It seems to make it through the tests just fine though on 2.7 and 3.x until On Mon, Dec 17, 2012 at 1:59 PM, Ralf Gommers notifications@github.comwrote:
|
Ah yes, because in Note though that this only works in the maintenance branches, in master it's |
Thanks Jay for fixing it. Tests still fail, so we need to figure out how to tests this, so that tests don't fail, before we can merge this. |
Yeah, sorry about letting this one linger. I still can't figure out why the On Thu, Dec 20, 2012 at 6:36 PM, Ondřej Čertík notifications@github.comwrote:
|
Naw, go for it. Just remember to get rid of the debug logging again before On Fri, Dec 21, 2012 at 3:33 PM, Jay Bourque notifications@github.comwrote:
|
Revert to pre numpy 1.7 behavior where invalid typestring size was ignored and isplay deprecate warning. This warning should eventually be changed to an error in future numpy versions.
- Refactor unit tests for invalid dtypes so that each test is on a separate line. This will make it easier to figure out which typestring is failing the unit test. - Add Py_DECREF for temp variable
Add check to see if 12 bytes is a valid size for a long double
Weird...apparently a long double on Travis is 12 bytes. I didn't think that size was all that common. That issue should be fixed, but now the python 3.1 build is failing on Travis due to an issue with nose. Any ideas? |
Travis just dropped support for 3.1... and it looks like instead of, say, for example, not running builds on unsupported python versions, they're just running the build directly against their system py2.7. Which fails because our build script assumes a virtualenv, not a system python. In short you can ignore this. |
@certik - backport away. |
Revert to pre numpy 1.7 behavior where invalid typestring size was ignored and display future deprecate warning. This warning should eventually be changed to an error in future numpy versions.
Fix for #294