cpython/Modules
Miss Islington (bot) 18450be94d
bpo-34454: Clean up datetime.fromisoformat surrogate handling (GH-8959)
* Use _PyUnicode_Copy in sanitize_isoformat_str

* Use repr in fromisoformat error message

This reverses commit 67b74a98b2 per Serhiy Storchaka's suggestion:

     I suggested to use %R in the error message because including the raw
     string can be confusing in the case of empty string, or string
     containing trailing whitespaces, invisible or unprintable characters.

We agree that it is better to change both the C and pure Python versions
to use repr.

* Retain non-sanitized dtstr for error printing

This does not create an extra string, it just holds on to a reference to
the original input string for purposes of creating the error message.

* PEP 7 fixes to from_isoformat

* Separate handling of Unicode and other errors

In the initial implementation, errors other than encoding errors would
both raise an error indicating an invalid format, which would not be
true for errors like MemoryError.

* Drop needs_decref from _sanitize_isoformat_str

Instead _sanitize_isoformat_str returns a new reference, even to the
original string.
(cherry picked from commit 3df85404d4)

Co-authored-by: Paul Ganssle <pganssle@users.noreply.github.com>
2018-10-22 15:35:15 -07:00
..
_blake2 [3.7] Fix misleading mentions of tp_size in comments. (GH-9136) 2018-09-10 10:22:55 -07:00
_ctypes [3.7] bpo-34906: Doc: Fix typos (2) (GH-9735) 2018-10-10 15:39:17 +02:00
_decimal [3.7] bpo-34762: Update PyContext* refs to PyObject* in asyncio and decimal (GH-9610) 2018-09-27 15:33:23 -04:00
_io bpo-24658: Fix read/write greater than 2 GiB on macOS (GH-1705) 2018-10-17 23:58:40 -07:00
_multiprocessing
_sha3 [3.7] bpo-34922: Fix integer overflow in the digest() and hexdigest() methods (GH-9751) (GH-9798) 2018-10-11 08:06:36 +03:00
_sqlite bpo-34743: Fix test_database_source_name under SQLite 3.7.9 (GH-9426) 2018-09-20 20:20:32 +03:00
_xxtestfuzz
cjkcodecs bpo-32240: Add the const qualifier to declarations of PyObject* array arguments. (#4746) 2017-12-15 13:11:11 +02:00
clinic bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) (GH-9971) 2018-10-20 01:20:56 +02:00
expat [3.7] bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939) (GH-9940) 2018-10-17 19:06:30 -07:00
README
Setup.dist Delete old expat comment. (GH-9197) 2018-09-11 18:04:33 -07:00
_abc.c [3.7] Fix misleading mentions of tp_size in comments. (GH-9136) 2018-09-10 10:22:55 -07:00
_asynciomodule.c [3.7] Fix a compiler warning added in bpo-34872. (GH-9722). (GH-9726) 2018-10-05 21:58:15 +03:00
_bisectmodule.c
_bz2module.c bpo-33916: Fix bz2 and lzma init when called twice (GH-7843) 2018-06-23 01:53:03 -07:00
_codecsmodule.c
_collectionsmodule.c closes bpo-31608: Fix a crash in methods of a subclass of _collections.deque with a bad __new__(). (GH-3788) 2018-09-11 12:08:10 -07:00
_contextvarsmodule.c bpo-34762: Fix contextvars C API to use PyObject* pointer types. (GH-9473) 2018-09-21 12:48:10 -07:00
_cryptmodule.c
_csv.c bpo-34395: Fix memory leaks caused by incautious usage of PyMem_Resize(). (GH-8756) 2018-08-16 00:53:00 -04:00
_curses_panel.c
_cursesmodule.c correct the typos (#4950) 2017-12-20 23:36:10 +02:00
_datetimemodule.c bpo-34454: Clean up datetime.fromisoformat surrogate handling (GH-8959) 2018-10-22 15:35:15 -07:00
_dbmmodule.c [3.7] bpo-33383: Fix crash in get() of the dbm.ndbm database object. (GH-6630) (GH-6631) 2018-04-29 14:50:26 +03:00
_elementtree.c bpo-35008: Fix possible leaks in Element.__setstate__(). (GH-9924) 2018-10-18 00:17:15 -07:00
_functoolsmodule.c bpo-32422: Reduce lru_cache memory usage (GH-5008) 2017-12-26 02:03:24 +09:00
_gdbmmodule.c bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832) 2018-02-26 06:25:40 -08:00
_hashopenssl.c bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) (GH-9971) 2018-10-20 01:20:56 +02:00
_heapqmodule.c
_json.c bpo-34649: Add missing NULL checks to _encoded_const() (GH-9225) 2018-09-13 00:46:40 +03:00
_localemodule.c bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) 2018-01-15 15:58:02 +01:00
_lsprof.c Fix docstring of Profiler class (GH-8651) 2018-08-03 02:30:49 -07:00
_lzmamodule.c bpo-33916: Fix bz2 and lzma init when called twice (GH-7843) 2018-06-23 01:53:03 -07:00
_math.c
_math.h
_opcode.c
_operator.c
_pickle.c Fix incorrect error handling in _pickle.Unpickler.__init__() (GH-9630) 2018-09-28 23:01:48 -07:00
_posixsubprocess.c bpo-34658: Fix rare subprocess prexec_fn fork error. (GH-9255) 2018-09-13 10:11:00 -07:00
_queuemodule.c [3.7] Fix misleading mentions of tp_size in comments. (GH-9136) 2018-09-10 10:22:55 -07:00
_randommodule.c
_scproxy.c closes bpo-31903: Release the GIL when calling into SystemConfiguration (GH-4178) 2018-09-12 08:37:30 -07:00
_sre.c bpo-32308: Replace empty matches adjacent to a previous non-empty match in re.sub(). (#4846) 2018-01-04 11:06:13 +02:00
_ssl.c bpo-34824: Fix a possible NULL pointer dereference in _ssl.c (GH-9606) (GH-9743) 2018-10-20 01:14:42 +02:00
_ssl_data.h
_stat.c
_struct.c bpo-32240: Add the const qualifier to declarations of PyObject* array arguments. (#4746) 2017-12-15 13:11:11 +02:00
_testbuffer.c Make various internal _testbuffer symbols static. (GH-8160) 2018-07-07 11:37:54 -07:00
_testcapimodule.c Make GenericAlias_Type and Generic_Type static. (GH-8076) 2018-07-03 23:08:57 -07:00
_testimportmultiple.c
_testmultiphase.c Make two PyModuleDef_Slot symbols static in _testmultiphase. (GH-8147) 2018-07-06 21:25:22 -07:00
_threadmodule.c [3.7] Fix misleading mentions of tp_size in comments. (GH-9136) 2018-09-10 10:22:55 -07:00
_tkinter.c
_tracemalloc.c
_uuidmodule.c bpo-32493: Fix uuid.uuid1() on FreeBSD. (GH-7099) 2018-05-24 16:22:59 -07:00
_weakref.c
_winapi.c bpo-34563: Fix for invalid assert on big output of multiprocessing.Process (GH-9027) (GH-9064) 2018-09-04 21:39:54 +02:00
addrinfo.h
arraymodule.c bpo-32571: Avoid raising unneeded AttributeError and silencing it in C code (GH-5222) 2018-01-25 17:49:40 +09:00
atexitmodule.c bpo-31901: atexit callbacks should be run at subinterpreter shutdown (#4611) 2017-12-20 11:17:58 +01:00
audioop.c bpo-33781: audioop: enhance rounding double as int (GH-7447) 2018-06-06 07:33:05 -07:00
binascii.c bpo-34736: improve error message for invalid length b64decode inputs (GH-9563) 2018-09-27 23:12:54 -07:00
cmathmodule.c
config.c.in rename _imp initialization function to follow conventions (#5432) 2018-01-29 11:33:57 -08:00
errnomodule.c
faulthandler.c bpo-32297: Few misspellings found in Python source code comments. (#4803) 2017-12-14 13:04:53 +02:00
fcntlmodule.c
gc_weakref.txt
gcmodule.c bpo-33622: Fix issues with handling errors in the GC. (GH-7078) 2018-05-24 05:39:08 -07:00
getaddrinfo.c bpo-32241: Add the const qualifire to declarations of umodifiable strings. (#4748) 2017-12-12 13:55:04 +02:00
getbuildinfo.c
getnameinfo.c
getpath.c bpo-29240: Fix locale encodings in UTF-8 Mode (#5170) 2018-01-15 10:45:49 +01:00
grpmodule.c [3.7] bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098) (GH-9104) 2018-09-09 13:27:31 +02:00
hashlib.h
hashtable.c
hashtable.h
itertoolsmodule.c bpo-32571: Avoid raising unneeded AttributeError and silencing it in C code (GH-5222) 2018-01-25 17:49:40 +09:00
ld_so_aix.in
main.c bpo-34783: Fix Py_Main() (GH-9526) 2018-09-24 05:03:01 -07:00
makesetup bpo-32232: by default, Setup modules are no longer built with -DPy_BUILD_CORE (GH-6489) 2018-04-20 08:39:18 -07:00
makexp_aix
mathmodule.c
md5module.c bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) (GH-9971) 2018-10-20 01:20:56 +02:00
mmapmodule.c [3.7] Fix misleading mentions of tp_size in comments. (GH-9136) 2018-09-10 10:22:55 -07:00
nismodule.c
ossaudiodev.c [3.7] Fix misleading mentions of tp_size in comments. (GH-9136) 2018-09-10 10:22:55 -07:00
overlapped.c bpo-32622: Native sendfile on windows (GH-5565) 2018-02-25 09:10:58 -08:00
parsermodule.c bpo-33308: Fix a crash in the parser module when convert an ST object. (GH-6519) 2018-04-18 22:10:36 -07:00
posixmodule.c bpo-32890, os: Use errno instead of GetLastError() in execve() and truncate() (GH-5784) 2018-10-19 17:46:25 -07:00
posixmodule.h
pwdmodule.c [3.7] bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098) (GH-9104) 2018-09-09 13:27:31 +02:00
pyexpat.c Fix several reference counting bugs in pyexpat.c. (GH-9955) 2018-10-19 00:16:25 -07:00
readline.c bpo-13631: Fix the order of initialization for readline libedit on macOS. (GH-6915) (GH-6928) 2018-05-17 03:27:33 -04:00
resource.c
rotatingtree.c
rotatingtree.h
selectmodule.c bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8024) 2018-06-30 16:03:19 +03:00
sha1module.c bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) (GH-9971) 2018-10-20 01:20:56 +02:00
sha256module.c bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) (GH-9971) 2018-10-20 01:20:56 +02:00
sha512module.c bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) (GH-9971) 2018-10-20 01:20:56 +02:00
signalmodule.c bpo-30654: Do not reset SIGINT handler to SIG_DFL in finisignal (GH-7146) (GH-7306) 2018-06-01 12:50:24 +02:00
socketmodule.c [3.7] closes bpo-25041: Document AF_PACKET socket address format. (GH-9207) 2018-09-11 18:46:36 -07:00
socketmodule.h closes bpo-34555: Fix incorrectly nested test for HAVE_LINUX_VM_SOCKETS_H (GH-9016) 2018-09-01 18:30:44 -04:00
spwdmodule.c
sre.h
sre_constants.h
sre_lib.h
symtablemodule.c
syslogmodule.c
termios.c bpo-32660: Solaris should support constants like termios' FIONREAD (#5328) 2018-01-28 14:00:48 +01:00
testcapi_long.h
timemodule.c closes bpo-35025: Properly guard the `CLOCK_GETTIME` et al macros in timemodule.c. (GH-9961) 2018-10-20 17:41:38 -07:00
tkappinit.c
tkinter.h
unicodedata.c bpo-29456: Fix bugs in unicodedata.normalize: u1176, u11a7 and u11c3 (GH-1958) 2018-06-15 05:21:55 -07:00
unicodedata_db.h update to Unicode 11.0.0 (closes bpo-33778) (GH-7439) (GH-7470) 2018-06-07 03:36:22 -04:00
unicodename_db.h update to Unicode 11.0.0 (closes bpo-33778) (GH-7439) (GH-7470) 2018-06-07 03:36:22 -04:00
winreparse.h
xxlimited.c bpo-33644: Fix signatures of tp_finalize handlers in testing code. (GH-7111) 2018-05-26 01:33:23 -07:00
xxmodule.c
xxsubtype.c bpo-33253: Fix xxsubtype.bench() to accept correct str signature. (GH-6439) 2018-04-09 23:00:57 -07:00
zipimport.c bpo-32248 - Implement `ResourceReader` and `get_resource_reader()` for zipimport (#5248) 2018-01-24 15:36:21 -05:00
zlibmodule.c bpo-32969: Expose some missing constants in zlib and fix the doc (GH-5988) 2018-03-06 21:26:19 -08:00

README

Source files for standard library extension modules,
and former extension modules that are now builtin modules.