summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-37752: Delete redundant Py_CHARMASK in normalizestring() (GH-15095)Jordon Xu2019-09-103-6/+6
|
* bpo-38073: Make pwd module PEP-384 compatible (GH-15790)Dino Viehland2019-09-101-16/+35
| | | | | | | | | | Makes the pwd module PEP-384 compatible https://bugs.python.org/issue38073 Automerge-Triggered-By: @tiran
* bpo-37499: Test various C calling conventions (GH-15776)Petr Viktorin2019-09-101-0/+164
| | | | | | | | | | Add functions with various calling conventions to `_testcapi`, expose them as module-level functions, bound methods, class methods, and static methods, and test calling them and introspecting them through GDB. https://bugs.python.org/issue37499 Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be> Automerge-Triggered-By: @pganssle
* bpo-38069: Convert _posixsubprocess to PEP-384 (GH-15780)Dino Viehland2019-09-101-8/+58
| | | | | | | | | | Summary: Eliminate uses of `_Py_IDENTIFIER` from `_posixsubprocess`, replacing them with interned strings. Also tries to find an existing version of the module, which will allow subinterpreters. https://bugs.python.org/issue38069
* bpo-38071: Make termios PEP-384 compatible (GH-15785)Dino Viehland2019-09-101-20/+47
| | | | Make the termios module PEP-384 compatible.
* bpo-38072: PEP-384 grpmodule (GH-15788)Dino Viehland2019-09-101-19/+40
| | | | Make the grp module PEP-384 compliant.
* Fix calling order of PyEval_InitThreads. (GH-4602)Kenta Murata2019-09-101-1/+1
| | | | As described in Doc/c-api/init.rst, PyEval_InitThreads() cannot be called before Py_Initialize() function.
* bpo-38074: Make zlib extension module PEP-384 compatible (GH-15792)Dino Viehland2019-09-101-73/+86
| | | | Updated zlibmodule.c to be PEP 384 compliant.
* bpo-38076: Make struct module PEP-384 compatible (#15805)Dino Viehland2019-09-101-147/+172
| | | | | | | | | | * PEP-384 _struct * More PEP-384 fixes for _struct Summary: Add a couple of more fixes for `_struct` that were previously missed such as removing `tp_*` accessors and using `PyBytesWriter` instead of calling `PyBytes_FromStringAndSize` with `NULL`. Also added a test to confirm that `iter_unpack` type is still uninstantiable. * 📜🤖 Added by blurb_it.
* bpo-37840: Fix handling of negative indices in bytearray_getitem() (GH-15250)Sergey Fedoseev2019-09-091-0/+13
|
* bpo-35941: Fix performance regression in new code (GH-12610)Christian Heimes2019-09-091-28/+27
| | | | | | | | Accumulate certificates in a set instead of doing a costly list contain operation. A Windows cert store can easily contain over hundred certificates. The old code would result in way over 5,000 comparison operations Signed-off-by: Christian Heimes <christian@python.org>
* bpo-37649: Fix exec_prefix check (GH-14897)Orivej Desh2019-09-091-1/+1
|
* bpo-36279: Ensure os.wait3() rusage is initialized (GH-15111)Zackery Spytz2019-09-091-0/+6
| | | Co-Authored-By: David Wilson <dw@botanicus.net>
* bpo-38070: visit_decref() calls _PyObject_IsFreed() (GH-15782)Victor Stinner2019-09-091-0/+2
| | | | | | In debug mode, visit_decref() now calls _PyObject_IsFreed() to ensure that the object is not freed. If it's freed, the program fails with an assertion error and Python dumps informations about the freed object.
* bpo-38037: Fix reference counters in signal module (GH-15753)animalize2019-09-091-8/+17
|
* bpo-37702: Fix SSL's certificate-store leak on Windows (GH-15632)neonene2019-09-091-0/+1
| | | | | ssl_collect_certificates function in _ssl.c has a memory leak. Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2. But CertCloseStore() is called only once and the refcnt leaves 1.
* bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls ↵Zackery Spytz2019-09-092-2/+5
| | | | | (GH-14462) If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
* bpo-38043: Use `bool` for boolean flags on is_normalized_quickcheck. (GH-15711)Greg Price2019-09-091-11/+11
|
* bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625)Serhiy Storchaka2019-09-091-0/+9
| | | | RuntimeError is now raised in this case.
* Revert "Raise a RuntimeError when tee iterator is consumed from different ↵Serhiy Storchaka2019-09-091-8/+0
| | | | | threads (GH-15567)" (GH-15736) This reverts commit fa220ec7633e9674baccc28dde987f29d7f65141.
* bpo-36946:Fix possible signed integer overflow when handling slices. (GH-15639)HongWeipeng2019-09-081-1/+2
| | | | This is a complement to PR 13375.
* Remove some unused defines in multiprocessing.h. (GH-15661)Sergey Fedoseev2019-09-071-10/+0
| | | | | It looks like they are unused since 87cf220972c9cb400ddcd577962883dcc5dca51a.
* bpo-37878: Remove PyThreadState_DeleteCurrent() function (GH-15315)Joannah Nanjekye2019-09-052-4/+9
| | | | | | | * Rename PyThreadState_DeleteCurrent() to _PyThreadState_DeleteCurrent() * Move it to the internal C API Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>
* bpo-38030: Fix os.stat failures on block devices on Windows (GH-15681)Steve Dower2019-09-041-6/+13
|
* closes bpo-37966: Fully implement the UAX #15 quick-check algorithm. (GH-15558)Greg Price2019-09-041-24/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of the `unicodedata.is_normalized` function is to answer the question `str == unicodedata.normalized(form, str)` more efficiently than writing just that, by using the "quick check" optimization described in the Unicode standard in UAX #15. However, it turns out the code doesn't implement the full algorithm from the standard, and as a result we often miss the optimization and end up having to compute the whole normalized string after all. Implement the standard's algorithm. This greatly speeds up `unicodedata.is_normalized` in many cases where our partial variant of quick-check had been returning MAYBE and the standard algorithm returns NO. At a quick test on my desktop, the existing code takes about 4.4 ms/MB (so 4.4 ns per byte) when the partial quick-check returns MAYBE and it has to do the slow normalize-and-compare: $ build.base/python -m timeit -s 'import unicodedata; s = "\uf900"*500000' \ -- 'unicodedata.is_normalized("NFD", s)' 50 loops, best of 5: 4.39 msec per loop With this patch, it gets the answer instantly (58 ns) on the same 1 MB string: $ build.dev/python -m timeit -s 'import unicodedata; s = "\uf900"*500000' \ -- 'unicodedata.is_normalized("NFD", s)' 5000000 loops, best of 5: 58.2 nsec per loop This restores a small optimization that the original version of this code had for the `unicodedata.normalize` use case. With this, that case is actually faster than in master! $ build.base/python -m timeit -s 'import unicodedata; s = "\u0338"*500000' \ -- 'unicodedata.normalize("NFD", s)' 500 loops, best of 5: 561 usec per loop $ build.dev/python -m timeit -s 'import unicodedata; s = "\u0338"*500000' \ -- 'unicodedata.normalize("NFD", s)' 500 loops, best of 5: 512 usec per loop
* bpo-38020: Fixes crash in os.readlink() on Windows (GH-15663)Steve Dower2019-09-031-2/+2
|
* bpo-37798: Fix _statistics module doc (GH-15546)Dong-hee Na2019-09-031-1/+4
|
* bpo-15999: Clean up of handling boolean arguments. (GH-15610)Serhiy Storchaka2019-09-016-23/+20
| | | | | | * Use the 'p' format unit instead of manually called PyObject_IsTrue(). * Pass boolean value instead 0/1 integers to functions that needs boolean. * Convert some arguments to boolean only once.
* bpo-15999: Always pass bool instead of int to socket.setblocking(). (GH-15621)Serhiy Storchaka2019-09-011-1/+1
|
* bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630)Serhiy Storchaka2019-09-015-22/+28
| | | Only AttributeError should be silenced.
* bpo-36543: Remove old-deprecated ElementTree features. (GH-12707)Serhiy Storchaka2019-09-012-114/+1
| | | | | Remove methods Element.getchildren(), Element.getiterator() and ElementTree.getiterator() and the xml.etree.cElementTree module.
* bpo-37990: fix gc stats (GH-15626)Inada Naoki2019-08-311-2/+3
|
* Fix typos mostly in comments, docs and test names (GH-15209)Min ho Kim2019-08-308-11/+11
|
* bpo-37140: Fix StructUnionType_paramfunc() (GH-15612)Victor Stinner2019-08-301-14/+59
| | | | | | | | | | | | Fix a ctypes regression of Python 3.8. When a ctypes.Structure is passed by copy to a function, ctypes internals created a temporary object which had the side effect of calling the structure finalizer (__del__) twice. The Python semantics requires a finalizer to be called exactly once. Fix ctypes internals to no longer call the finalizer twice. Create a new internal StructParam_Type which is only used by _ctypes_callproc() to call PyMem_Free(ptr) on Py_DECREF(argument). StructUnionType_paramfunc() creates such object.
* bpo-37976: Prevent shadowing of TypeError in zip() (GH-15592)Sergey Fedoseev2019-08-301-4/+0
|
* bpo-37933: Fix faulthandler.cancel_dump_traceback_later() (GH-15440)Thomas A Caswell2019-08-291-0/+5
| | | | Fix faulthandler.cancel_dump_traceback_later() call if cancel_dump_traceback_later() was not called previously.
* bpo-37034: Display argument name on errors with keyword arguments with ↵Rémi Lapeyre2019-08-2939-332/+332
| | | | Argument Clinic. (GH-13593)
* bpo-36833: Add tests for Datetime C API Macros (GH-14842)Joannah Nanjekye2019-08-291-0/+53
| | | | Added tests for PyDateTime_xxx_GET_xxx() macros of the C API of the datetime module.
* bpo-37372: Fix error unpickling datetime.time objects from Python 2 with ↵Justin Blanchard2019-08-291-1/+1
| | | | seconds>=24. (GH-14307)
* bpo-37960: Silence only necessary errors in repr() of buffered and text ↵Serhiy Storchaka2019-08-292-18/+16
| | | | streams. (GH-15543)
* Raise a RuntimeError when tee iterator is consumed from different threads ↵HongWeipeng2019-08-291-0/+8
| | | | (GH-15567)
* closes bpo-37964: add F_GETPATH command to fcntl (GH-15550)Vinay Sharma2019-08-291-0/+3
| | | | | | | https://bugs.python.org/issue37964 Automerge-Triggered-By: @benjaminp
* bpo-37951: Lift subprocess's fork() restriction (GH-15544)Christian Heimes2019-08-271-2/+4
|
* bpo-36205: Fix the rusage implementation of time.process_time() (GH-15538)vrajivk2019-08-271-1/+1
|
* bpo-37798: Minor code formatting and comment clean-ups. (GH-15526)Raymond Hettinger2019-08-261-13/+22
|
* bpo-37055: fix warnings in _blake2 module (GH-14646)Inada Naoki2019-08-263-19/+0
| | | | | | | https://bugs.python.org/issue37055 Automerge-Triggered-By: @tiran
* bpo-37942: Improve argument clinic float converter (GH-15470)Raymond Hettinger2019-08-255-92/+266
|
* bpo-37798: Add C fastpath for statistics.NormalDist.inv_cdf() (GH-15266)Dong-hee Na2019-08-233-0/+173
|
* bpo-37915: Fix comparison between tzinfo objects and timezone objects (GH-15390)Pablo Galindo2019-08-221-1/+2
| | | | | | | https://bugs.python.org/issue37915 Automerge-Triggered-By: @pablogsal
* bpo-37834: Normalise handling of reparse points on Windows (GH-15231)Steve Dower2019-08-213-199/+214
| | | | | | | | | | bpo-37834: Normalise handling of reparse points on Windows * ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed) * nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point) * nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour) * nt.readlink() will read destinations for symlinks and junction points only bpo-1311: os.path.exists('nul') now returns True on Windows * nt.stat('nul').st_mode is now S_IFCHR (previously was an error)