cpython/Lib
Paul Ganssle 096329f0b2 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>
2018-08-23 18:06:20 +03:00
..
asyncio bpo-34270: Make it possible to name asyncio tasks (GH-8547) 2018-08-08 17:06:47 -04:00
collections Clarify that example in comment is about fromkeys() (GH-8141) 2018-07-06 08:52:26 -07:00
concurrent bpo-33238: Add InvalidStateError to concurrent.futures. (GH-7056) 2018-05-30 10:15:06 +03:00
ctypes Fixed several assertTrue() that were intended to be assertEqual(). (GH-8191) 2018-07-09 18:25:55 +03:00
curses
dbm bpo-32749: Make dbm.dumb databases more cosistent with other dbm databases. (#5497) 2018-02-05 22:47:31 +02:00
distutils bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464) 2018-07-26 04:23:10 -07:00
email bpo-33476: Fix _header_value_parser when address group is missing final ';' (GH-7484) 2018-07-28 13:55:11 +01:00
encodings bpo-32943: Fix confusing error message for rot13 codec (GH-5869) 2018-03-25 12:09:21 +08:00
ensurepip Improve ensurepip's --help (GH-4686) 2018-05-30 09:45:55 +02:00
html
http bpo-33365: print the header values beside the keys (GH-6611) 2018-06-19 16:20:58 +03:00
idlelib bpo-34047: IDLE: fix mousewheel scrolling direction on macOS (GH-8678) 2018-08-10 09:02:08 +03:00
importlib bpo-33499: Add PYTHONPYCACHEPREFIX env var for alt bytecode cache location. (GH-6834) 2018-06-16 14:40:56 +10:00
json bpo-23493: json: Change sort_keys in Python encoder same to C (GH-8131) 2018-07-07 08:55:03 +09:00
lib2to3 Revert "closes bpo-27494: Fix 2to3 handling of trailing comma after a generator expression (GH-3771)" (#8241) 2018-07-31 09:34:30 +03:00
logging bpo-34415: Updated logging.Formatter docstring. (GH-8811) 2018-08-19 05:14:19 +01:00
msilib bpo-34251: Restore msilib.Win64 to preserve compatibility (GH-8510) 2018-07-28 16:02:56 -05:00
multiprocessing Simplify __all__ in multiprocessing (GH-6856) 2018-07-11 19:22:28 +09:00
pydoc_data Update NEWS, docs, and patchlevel for 3.7.0b1 2018-01-31 17:14:30 -05:00
site-packages
sqlite3 bpo-34041: Allow creating deterministic functions in Connection.create_function() (GH-8086) 2018-07-08 10:09:20 +03:00
test bpo-34454: fix .fromisoformat() methods crashing on inputs with surrogate code points (GH-8862) 2018-08-23 18:06:20 +03:00
tkinter bpo-34189: Fix checking for bugfix Tcl version. (GH-8397) 2018-07-22 21:41:48 +03:00
turtledemo bpo-14117: Make minor tweaks to turtledemo (GH-8002) 2018-06-29 01:10:05 -04:00
unittest bpo-34318: Convert deprecation warnings to errors in assertRaises() etc. (GH-8623) 2018-08-19 10:00:11 +03:00
urllib bpo-21475: Support the Sitemap extension in robotparser (GH-6883) 2018-05-16 10:52:07 -04:00
venv bpo-34011: Update code copying DLLs and init.tcl into venvs. (GH-8253) 2018-07-20 17:07:38 +01:00
wsgiref bpo-9372: Deprecate several __getitem__ methods (GH-8609) 2018-08-11 09:05:04 +03:00
xml bpo-9372: Deprecate several __getitem__ methods (GH-8609) 2018-08-11 09:05:04 +03:00
xmlrpc bpo-33911: Fixed deprecation warning in xmlrpc.server (GH-7847) 2018-07-16 10:46:04 +02:00
__future__.py String annotations [PEP 563] (#4390) 2018-01-26 08:20:18 -08:00
__phello__.foo.py
_bootlocale.py bpo-29240: PEP 540: Add a new UTF-8 Mode (#855) 2017-12-13 12:29:09 +01:00
_collections_abc.py bpo-32467: Let collections.abc.ValuesView inherit from Collection (#5152) 2018-01-11 21:53:49 -08:00
_compat_pickle.py
_compression.py
_dummy_thread.py
_markupbase.py
_osx_support.py
_py_abc.py bpo-33018: Improve issubclass() error checking and message. (GH-5944) 2018-03-22 11:26:06 +00:00
_pydecimal.py bpo-32630: Use contextvars in decimal (GH-5278) 2018-01-27 13:46:46 -05:00
_pyio.py bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918) 2018-06-29 13:14:58 +03:00
_sitebuiltins.py
_strptime.py bpo-33541: Remove unused __pad function (GH-4377) 2018-05-20 13:42:30 -04:00
_threading_local.py Delete a broken threading.local example (#5870) 2018-02-25 10:03:40 -05:00
_weakrefset.py
abc.py bpo-31333: Re-implement ABCMeta in C (#5273) 2018-02-18 12:41:58 +00:00
aifc.py bpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951) 2018-03-18 09:55:53 +02:00
antigravity.py
argparse.py Remove superseded line from argparse.HelpFormatter() (GH-8839) 2018-08-22 23:14:14 +03:00
ast.py bpo-33851: Fix ast.get_docstring() for a node that lacks a docstring. (GH-7682) 2018-06-15 11:05:15 +03:00
asynchat.py
asyncore.py
base64.py bpo-34164: Fix handling of incorrect padding in base64.b32decode(). (GH-8351) 2018-07-24 12:52:51 +03:00
bdb.py Docs: fix some wrong words (GH-6987) 2018-06-02 07:16:19 -07:00
binhex.py
bisect.py
bz2.py
cProfile.py Fix docstring of Profiler class (GH-8651) 2018-08-03 18:09:57 +09:00
calendar.py Closes bpo-28281: Remove year (1-9999) limits on the weekday() function. (#4109) 2017-10-26 15:34:11 -04:00
cgi.py bpo-33843: Remove deprecated stuff in cgi module (GH-7662) 2018-06-19 17:28:50 +09:00
cgitb.py bpo-33311: Do not display parameters displayed in parentheses for module call. (GH-6677) 2018-05-09 12:39:32 +03:00
chunk.py
cmd.py
code.py
codecs.py bpo-32110: codecs.StreamReader.read(n) now returns not more than n (#4499) 2017-11-29 01:30:00 +02:00
codeop.py
colorsys.py
compileall.py closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575) 2017-12-09 10:26:52 -08:00
configparser.py bpo-32108: Don't clear configparser values if key is assigned to itself (GH-7588) 2018-06-12 13:37:51 -07:00
contextlib.py bpo-33786: Fix asynchronous generators to handle GeneratorExit in athrow() (GH-7467) 2018-06-07 20:31:26 -04:00
contextvars.py bpo-32436: Implement PEP 567 (#5027) 2018-01-22 19:11:18 -05:00
copy.py bpo-11572: Make minor improvements to copy module (GH-8208) 2018-07-09 23:14:54 +03:00
copyreg.py
crypt.py bpo-31702: Allow to specify rounds for SHA-2 hashing in crypt.mksalt(). (#4110) 2017-11-16 13:22:51 +02:00
csv.py bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) 2018-02-09 20:00:49 +02:00
dataclasses.py bpo-34213: Allow dataclasses to work with a field named 'object'. (GH-8452) 2018-08-12 07:46:05 -04:00
datetime.py bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385) 2018-07-25 12:54:58 -04:00
decimal.py
difflib.py bpo-33224: PEP 479 fix for difflib.mdiff() (GH-6381) 2018-04-05 11:19:57 -07:00
dis.py bpo-32970: Improve disassembly of the MAKE_FUNCTION instruction. (GH-5937) 2018-03-11 11:07:06 +02:00
doctest.py bpo-25054, bpo-1647489: Added support of splitting on zerowidth patterns. (#4471) 2017-12-04 14:29:05 +02:00
dummy_threading.py
enum.py bpo-33866: enum: Stop using OrderedDict (GH-7698) 2018-06-19 01:14:26 +09:00
filecmp.py
fileinput.py bpo-9372: Deprecate several __getitem__ methods (GH-8609) 2018-08-11 09:05:04 +03:00
fnmatch.py bpo-32775: Fix regular expression warnings in fnmatch. (#5583) 2018-02-09 13:30:19 +02:00
formatter.py
fractions.py
ftplib.py
functools.py bpo-33967: Fix singledispatch raised IndexError when no args (GH-8184) 2018-07-10 16:26:36 +09:00
genericpath.py
getopt.py
getpass.py
gettext.py
glob.py
gzip.py Replace KB unit with KiB (#4293) 2017-11-08 14:44:44 -08:00
hashlib.py bpo-33729: Fix issues with arguments parsing in hashlib. (GH-8346) 2018-07-31 09:50:16 +03:00
heapq.py bpo-34149: Behavior of the min/max with key=None (GH-8328) 2018-07-23 20:58:21 -07:00
hmac.py bpo-33604: Remove Pending from hmac Deprecation warning. (GH-7062) 2018-05-22 15:55:31 -07:00
imaplib.py bpo-18540: Fix EAI_NONAME in imaplib.IMAP4*() (GH-8634) 2018-08-07 05:12:18 +03:00
imghdr.py
imp.py closes bpo-34056: Always return bytes from _HackedGetData.get_data(). (GH-8130) 2018-07-06 20:41:06 -07:00
inspect.py bpo-33582: Remove duplicate space in inspect.formatargspec() deprecation warning (GH-7655) 2018-06-11 23:16:18 -04:00
io.py
ipaddress.py bpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016) 2018-03-21 08:25:13 +08:00
keyword.py bpo-30406: Make async and await proper keywords (#1669) 2017-10-05 23:24:46 -04:00
linecache.py
locale.py Remove mojibake in the locale aliases mapping. (GH-6716) 2018-05-06 10:52:38 +03:00
lzma.py
macpath.py bpo-31802: Fix importing native path module before importing os. (#4017) 2018-01-07 17:54:31 +02:00
mailbox.py
mailcap.py
mimetypes.py bpo-27485: Rename and deprecate undocumented functions in urllib.parse (GH-2205) 2018-04-25 16:51:54 -07:00
modulefinder.py closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575) 2017-12-09 10:26:52 -08:00
netrc.py bpo-28334: netrc() now uses expanduser() to find .netrc file (GH-4537) 2017-11-25 13:37:22 +03:00
nntplib.py
ntpath.py bpo-31047: Fix ntpath.abspath for invalid paths (GH-8544) 2018-07-29 13:47:09 +01:00
nturl2path.py
numbers.py Fix miscellaneous typos (#4275) 2017-11-05 15:37:50 +02:00
opcode.py bpo-33041: Rework compiling an "async for" loop. (#6142) 2018-03-23 14:34:35 +02:00
operator.py
optparse.py
os.py Assume the raw environ is always declared. (GH-8707) 2018-08-07 21:51:12 -07:00
pathlib.py bpo-34333: Fix %-formatting in Path.with_suffix() (GH-8663) 2018-08-11 08:45:06 +03:00
pdb.py bpo-32691: Use mod_spec.parent when running modules with pdb (GH-5474) 2018-02-03 16:40:11 +10:00
pickle.py bpo-11572: Make minor improvements to copy module (GH-8208) 2018-07-09 23:14:54 +03:00
pickletools.py bpo-31993: Do not allocate large temporary buffers in pickle dump. (#4353) 2018-01-06 17:18:54 +02:00
pipes.py
pkgutil.py closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575) 2017-12-09 10:26:52 -08:00
platform.py bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684) 2018-07-09 11:47:45 +03:00
plistlib.py bpo-33908: Remove two superfluous assignments (GH-7116) 2018-06-20 13:07:31 +08:00
poplib.py bpo-32981: Fix catastrophic backtracking vulns (#5955) 2018-03-03 21:33:32 -08:00
posixpath.py bpo-31802: Fix importing native path module before importing os. (#4017) 2018-01-07 17:54:31 +02:00
pprint.py
profile.py time.clock() now emits a DeprecationWarning (GH-4020) 2017-10-17 14:46:45 -07:00
pstats.py Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624) 2018-02-26 16:50:11 +02:00
pty.py
py_compile.py bpo-29708: Setting SOURCE_DATE_EPOCH forces hash-based .pyc files (GH-5200) 2018-01-24 13:26:18 -08:00
pyclbr.py
pydoc.py bpo-940286: Fix pydoc to show cross refs correctly (GH-8390) 2018-07-23 08:37:47 +03:00
queue.py bpo-14976: Reentrant simple queue (#3346) 2018-01-16 00:27:16 +01:00
quopri.py
random.py Minor code refactoring. Compute len() one fewer times on one code path. (GH-8094) 2018-07-04 15:28:20 -07:00
re.py bpo-32338: OrderedDict import is no longer needed in re. (#4891) 2018-03-11 08:38:13 +02:00
reprlib.py
rlcompleter.py
runpy.py
sched.py
secrets.py
selectors.py
shelve.py Fix misleading docsting of shelve.open(). (GH-6427) 2018-04-09 17:16:01 +03:00
shlex.py
shutil.py bpo-33671 / shutil.copyfile: use memoryview() with dynamic size on Windows (#7681) 2018-06-19 08:27:29 -07:00
signal.py bpo-33332: Add signal.valid_signals() (GH-6581) 2018-05-04 13:00:50 +02:00
site.py bpo-19891: Ignore error while writing history file (GH-8483) 2018-08-06 17:28:19 +09:00
smtpd.py
smtplib.py bpo-32727: smtplib's SMTP.send_message behaves differently with from_addr and to_addrs (#5451) 2018-01-30 19:02:51 -05:00
sndhdr.py bpo-31985: Deprecate openfp in aifc, sunau, and wave (#4344) 2017-11-10 11:38:25 -05:00
socket.py bpo-28134: Auto-detect socket values from file descriptor (#1349) 2018-01-29 22:37:58 +01:00
socketserver.py bpo-33540: Fix socketserver.ThreadingMixIn if block_on_close=False (GH-7310) 2018-06-01 14:21:34 +02:00
sre_compile.py bpo-31690: Allow the inline flags "a", "L", and "u" to be used as group flags for RE. (#3885) 2017-10-24 23:31:42 +03:00
sre_constants.py bpo-31690: Allow the inline flags "a", "L", and "u" to be used as group flags for RE. (#3885) 2017-10-24 23:31:42 +03:00
sre_parse.py bpo-30688: Import unicodedata only when needed. (GH-5606) 2018-02-10 08:59:29 +02:00
ssl.py bpo-24334: Remove inaccurate match_hostname call (#6211) 2018-03-24 15:36:50 +01:00
stat.py closes bpo-34353: Add sockets to stat.filemode fallback python implementation. (GH-8703) 2018-08-09 22:12:08 -07:00
statistics.py
string.py bpo-31672: Restore the former behavior when override flags in Template. (#5099) 2018-01-04 19:20:11 +02:00
stringprep.py
struct.py
subprocess.py bpo-34044: subprocess.Popen copies startupinfo (GH-8090) 2018-07-05 22:54:17 +02:00
sunau.py bpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951) 2018-03-18 09:55:53 +02:00
symbol.py bpo-30406: Make async and await proper keywords (#1669) 2017-10-05 23:24:46 -04:00
symtable.py
sysconfig.py bpo-32430: Rename Modules/Setup.dist to Modules/Setup (GH-8229) 2018-07-16 19:03:03 +02:00
tabnanny.py
tarfile.py bpo-34043: Optimize tarfile uncompress performance (GH-8089) 2018-07-06 14:06:00 +09:00
telnetlib.py bpo-30397: Add re.Pattern and re.Match. (#1646) 2017-10-04 20:09:49 +03:00
tempfile.py bpo-27300: Add the errors parameter to tempfile classes. (GH-6696) 2018-05-23 08:07:01 +03:00
textwrap.py
this.py
threading.py bpo-33556: Remove reference to thread module from docstring (GH-6963) 2018-05-18 13:38:36 -05:00
timeit.py bpo-28240: timeit: Update repeat() doc (GH-7419) 2018-06-06 17:55:18 +02:00
token.py bpo-33260: Regenerate token.py after removing ASYNC and AWAIT. (GH-6447) 2018-04-11 19:15:51 +03:00
tokenize.py bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891) 2018-07-06 10:19:08 +03:00
trace.py bpo-31908: Fix output of cover files for trace module command-line tool. (GH-4205) 2018-05-01 06:46:52 +03:00
traceback.py bpo-27910: Update documentation of traceback module (GH-6116) 2018-08-02 19:08:59 +03:00
tracemalloc.py bpo-32121: Add most_recent_first parameter to tracemalloc.Traceback.format (#4534) 2017-11-30 00:05:07 +01:00
tty.py
turtle.py Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624) 2018-02-26 16:50:11 +02:00
types.py bpo-32265: Classify class and static methods of builtin types. (#4776) 2017-12-15 14:13:41 +02:00
typing.py Fix typo in TypeVar docstring (#8142) 2018-07-07 16:41:20 +01:00
uu.py
uuid.py bpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922) 2018-05-20 18:03:25 +03:00
warnings.py bpo-33375: Get filename for warnings from frame.f_code.co_filename (GH-6622) 2018-06-08 12:28:37 -07:00
wave.py bpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951) 2018-03-18 09:55:53 +02:00
weakref.py
webbrowser.py bpo-31014: Fix the webbrowser module. (GH-7267) 2018-07-08 10:22:32 +03:00
xdrlib.py
zipapp.py
zipfile.py bpo-34097: Add support for zipping files older than 1980-01-01 (GH-8270) 2018-08-02 15:04:52 +02:00