Alexey Izbyshev <izbys...@ispras.ru> added the comment:

I will be glad to rebase my PR and remove the try/except from the test if you 
remove the dependency of separator searching code on PyUnicode_AsUTF8AndSize() 
as you suggest. Or we can go the other way and merge mine first -- whatever you 
prefer.

Note that technically a difference between C and Python implementation of 
fromisoformat() will still remain: if a part of the input string before or 
after the separator contains surrogates, the C code will throw a 
UnicodeEncodeError while the Python code -- ValueError. But since the former 
error is a subclass of the latter, I guess it's OK, what do you think?

Also, note that the other discovered C/Python impl difference (for strftime, 
handled by another try/catch in tests) won't go away, of course, unless someone 
is ready to fix that as well.

----------

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

Reply via email to