numpy/numpy — pull request #4257 by juliantaylor (2014-02-03 19:06:18+00:00)
Title: DEP: deprecate tostring in favor of tobytes

tostring returns bytes which are not equal to string, so provide a
tobytes function alias and deprecate tostring.

PyArray_ToString is not yet deprected in this PR, but should probably also be in favor of a more descriptive name.

I'm not sure if we should really deprecate tostring, it would force rdepends to add checks for both names if they want to support older versions without warnings.
We might also want an equivalent frombytes that does not accept strings for symmetry, but currently fromstring seems works for bytes and strings as it can also read formated strings instead of only raw bytes.