Nick Coghlan added the comment:

After working through this, I found that the modern base64 API just relies on 
the checks in binascii. All that checks for is:

1. Can the data by exported using PyBUF_SIMPLE?
2. Is it C contiguous?

It completely ignores the number of dimensions and the format information. I 
added tests to at least capture this behaviour, even though it seems a little 
dubious to me.

For the legacy API, I didn't relax the input checks that far - the legacy API 
will still complain if there is more than 1 dimension and if the format code 
isn't one of 'c', 'b' or 'B'. That's already substantially more permissive than 
what it supported in previous versions.

Just running the full test suite now, will push after that finishes.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17839>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to