diff options
author | Paul Ganssle <pganssle@users.noreply.github.com> | 2018-08-23 15:06:20 (GMT) |
---|---|---|
committer | Tal Einat <taleinat+github@gmail.com> | 2018-08-23 15:06:20 (GMT) |
commit | 096329f0b2bf5e3f0a16363aa631d993ce078737 (patch) | |
tree | 503291191bdb7ecd0d42d02bd8a35b72af468d81 /PC/_findvs.cpp | |
parent | c33bb5d4016fb2fc8f3b6d4b0c14b73b33cdb3cf (diff) | |
download | cpython-096329f0b2bf5e3f0a16363aa631d993ce078737.zip cpython-096329f0b2bf5e3f0a16363aa631d993ce078737.tar.gz cpython-096329f0b2bf5e3f0a16363aa631d993ce078737.tar.bz2 |
bpo-34454: fix .fromisoformat() methods crashing on inputs with surrogate code points (GH-8862)
The current C implementations **crash** if the input includes a surrogate
Unicode code point, which is not possible to encode in UTF-8.
Important notes:
1. It is possible to pass a non-UTF-8 string as a separator to the
`.isoformat()` methods.
2. The pure-Python `datetime.fromisoformat()` implementation accepts
strings with a surrogate as the separator.
In `datetime.fromisoformat()`, in the special case of non-UTF-8 separators,
this implementation will take a performance hit by making a copy of the
input string and replacing the separator with 'T'.
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Co-authored-by: Paul Ganssle <paul@ganssle.io>
Diffstat (limited to 'PC/_findvs.cpp')
0 files changed, 0 insertions, 0 deletions