On Sat, Feb 4, 2012 at 8:07 AM, Ralf Gommers email@example.com:
On Wed, Dec 28, 2011 at 2:58 PM, Ralf Gommers <firstname.lastname@example.org
I'm having some trouble cleaning up tests to deal with these two deprecations:
DeprecationWarning: Setting NumPy dtype names is deprecated, the dtype will become immutable in a future version DeprecationWarning: DType strings 'O4' and 'O8' are deprecated because they are platform specific. Use 'O' instead
They seem fairly invasive, judged by the test noise in both numpy and scipy. Record arrays rely on setting dtype names. There are tests for picking and the buffer protocol that generate warnings for O4/O8. Can anyone comment on the necessity of these deprecations and how to deal with them?
Anyone? This is important for the 1.7.0 release.
Also, I don't recall this being discussed. If I'm wrong please point me to the discussion, otherwise some discussion/explanation is in order I think.
I've made a pull request for the O4/O8 issue. This one is an obvious bug, and there was no way to fix the bug without breaking backwards compatibility, so I used deprecation as a mechanism to fix it. Read the pull request here:
The names issue is a bit trickier. There has been some back and forth in some tickets, and I recall some discussion on the mailing list, but that may be long ago and without clear resolution. That this should be changed is however very clear to me, because NumPy is violating a definition in the Python documentation of what rules hashable objects should obey. The trouble is that there isn't a convenience API written yet to replace the usage of that mutability. Perhaps the thing to do is comment out the deprecation warning in the source code, and reintroduce it in 1.8 along with a replacement API appropriate for immutable dtypes?
NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion