[issue34481] Different behavior of C and Python impls of datetime.strftime with non-UTF-8-encodable strings

Paul Ganssle report at bugs.python.org
Thu Aug 30 14:08:40 EDT 2018


Paul Ganssle <p.ganssle at gmail.com> added the comment:

@izbyshev That's totally fair and I wouldn't want to make it a condition of merging the existing fixes - I've already made great progress in fixing the time.strftime part as well.

The main reason it relates here is that I generally find the tests to be among the hardest part about writing a good PR, and if we can't make assertions about the behavior of strftime outputs, I think it makes it hard to prevent regressions. I figured if I can solve the problem all the way down the stack in one go, I might as well.

That said, Victor makes an *extremely* good point that this is an outsized effort for the bug it's fixing. No one really *needs* support for unpaired surrogates in their strftime as far as I can tell. The main reason I'm still working on it is that I'm curious to see if it's even possible to fix.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34481>
_______________________________________


More information about the Python-bugs-list mailing list