summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix idlelib.help comments (GH-15669)Terry Jan Reedy2019-09-051-24/+25
|
* bpo-38030: Fix os.stat failures on block devices on Windows (GH-15681)Steve Dower2019-09-043-6/+22
|
* bpo-36030: Fix a possible segfault in PyTuple_New() (GH-15670)Zackery Spytz2019-09-041-0/+3
|
* Fix grammar in asyncio-dev.rst (GH-15672)Roger Iyengar2019-09-041-1/+1
| | | Automerge-Triggered-By: @ned-deily
* closes bpo-37966: Fully implement the UAX #15 quick-check algorithm. (GH-15558)Greg Price2019-09-044-26/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-38022: IDLE: upgrade help.html to sphinx 2.x HTML5 output (GH-15664)Tal Einat2019-09-032-167/+229
| | | | | The HTML5 output from Sphinx 2.x adds '<p>' tags within list elements. Using a new prevtag attribute, ignore these instead of emitting unwanted '\n\n'. Also stop looking for 'first' classes on tags (no longer present) and fix the bug of double-spacing instead of single spacing after <pre> blocks.
* bpo-38020: Fixes crash in os.readlink() on Windows (GH-15663)Steve Dower2019-09-032-2/+4
|
* bpo-37798: Fix _statistics module doc (GH-15546)Dong-hee Na2019-09-031-1/+4
|
* bpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634)Tal Einat2019-09-034-48/+68
| | | | Extending the hover delay in test_tooltip should avoid spurious test_idle failures. One longer delay instead of two shorter delays results in a net speedup.
* Enforce PEP 257 conventions in ftplib.py (GH-15604)Alan Yee2019-09-031-8/+5
| | | | | -`"""` over `'''` -no blank line either before or after the docstring. -place the closing quotes on a line by themselves
* bpo-36853: Fix suspicious.py to actually print the unused rules (#13579)Anthony Sottile2019-09-021-11/+14
| | | | | | * Fix suspicious.py to actually print the unused rules * Fix the other `self.warn` calls
* bpo-38010 Sync importlib.metadata with importlib_metadata 0.20. (GH-15646)Jason R. Coombs2019-09-024-3/+25
| | | Sync importlib.metadata with importlib_metadata 0.20.
* bpo-15999: Clean up of handling boolean arguments. (GH-15610)Serhiy Storchaka2019-09-0121-78/+69
| | | | | | * 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-017-18/+18
|
* bpo-15999: Always pass bool instead of int to the expat parser. (GH-15622)Serhiy Storchaka2019-09-015-36/+36
|
* bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630)Serhiy Storchaka2019-09-0114-127/+134
| | | Only AttributeError should be silenced.
* bpo-36543: Remove old-deprecated ElementTree features. (GH-12707)Serhiy Storchaka2019-09-017-213/+19
| | | | | Remove methods Element.getchildren(), Element.getiterator() and ElementTree.getiterator() and the xml.etree.cElementTree module.
* bpo-37764: Fix infinite loop when parsing unstructured email headers. (GH-15239)Ashwin Ramaswami2019-08-315-3/+55
| | | | | | | | | | | | Fixes a case in which email._header_value_parser.get_unstructured hangs the system for some invalid headers. This covers the cases in which the header contains either: - a case without trailing whitespace - an invalid encoded word https://bugs.python.org/issue37764 This fix should also be backported to 3.7 and 3.8 https://bugs.python.org/issue37764
* bpo-37977: Warn more strongly and clearly about pickle security (GH-15595)Daniel Pope2019-08-312-4/+19
|
* bpo-37990: fix gc stats (GH-15626)Inada Naoki2019-08-311-2/+3
|
* bpo-37781: use "z" for PY_FORMAT_SIZE_T (GH-15156)Inada Naoki2019-08-301-13/+6
| | | MSVC 2015 supports %zd / %zu. "z" is portable enough nowadays.
* Fix typos mostly in comments, docs and test names (GH-15209)Min ho Kim2019-08-3046-60/+60
|
* IDLE: Fix 2 typos found by Min ho Kim. (GH-15617)Terry Jan Reedy2019-08-302-2/+2
|
* bpo-37140: Fix StructUnionType_paramfunc() (GH-15612)Victor Stinner2019-08-303-20/+109
| | | | | | | | | | | | 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-304-8/+24
|
* Steven Bethard designated a new maintainer for argparse (GH-15605)Raymond Hettinger2019-08-301-0/+1
|
* bpo-37834: Prevent shutil.rmtree exception (GH-15602)Ned Deily2019-08-292-1/+3
| | | | when built on non-Windows system without fd system call support, like older versions of macOS.
* bpo-37933: Fix faulthandler.cancel_dump_traceback_later() (GH-15440)Thomas A Caswell2019-08-292-0/+16
| | | | Fix faulthandler.cancel_dump_traceback_later() call if cancel_dump_traceback_later() was not called previously.
* bpo-8425: Fast path for set inplace difference when the second set is large ↵Raymond Hettinger2019-08-292-1/+20
| | | | (GH-15590)
* bpo-37034: Display argument name on errors with keyword arguments with ↵Rémi Lapeyre2019-08-2962-553/+623
| | | | Argument Clinic. (GH-13593)
* bpo-37979: Add alternative to fromisoformat in documentation (GH-15596)Paul Ganssle2019-08-292-1/+5
| | | | | | | | | | | | | | | | Adds a link to `dateutil.parser.isoparse` in the documentation. It would be nice to set up intersphinx for things like this, but I think we can leave that for a separate PR. CC: @pitrou [bpo-37979](https://bugs.python.org/issue37979) https://bugs.python.org/issue37979 Automerge-Triggered-By: @pitrou
* bpo-37947: Avoid double-decrement in symtable recursion counting (GH-15593)Nick Coghlan2019-08-291-4/+14
| | | | | | | | | With `symtable_visit_expr` now correctly adjusting the recursion depth for named expressions, `symtable_handle_namedexpr` should be leaving it alone. Also adds a new check to `PySymtable_BuildObject` that raises `SystemError` if a successful first symbol analysis pass fails to keep the stack depth accounting clean.
* bpo-36833: Add tests for Datetime C API Macros (GH-14842)Joannah Nanjekye2019-08-293-0/+114
| | | | Added tests for PyDateTime_xxx_GET_xxx() macros of the C API of the datetime module.
* bpo-10978: Semaphores can release multiple threads at a time (GH-15588)Raymond Hettinger2019-08-294-13/+56
|
* bpo-36743: __get__ is sometimes called without the owner argument (#12992)Raymond Hettinger2019-08-295-13/+24
|
* bpo-16468: Clarify which objects can be passed to "choices" in argparse ↵Raymond Hettinger2019-08-291-3/+2
| | | | (GH-15566)
* bpo-23674: Clarify ambiguities in super() docs (#15564)Raymond Hettinger2019-08-291-3/+10
|
* bpo-37372: Fix error unpickling datetime.time objects from Python 2 with ↵Justin Blanchard2019-08-294-10/+22
| | | | seconds>=24. (GH-14307)
* bpo-37950: Fix ast.dump() when call with incompletely initialized node. ↵Serhiy Storchaka2019-08-294-19/+59
| | | | (GH-15510)
* bpo-37960: Silence only necessary errors in repr() of buffered and text ↵Serhiy Storchaka2019-08-294-22/+22
| | | | streams. (GH-15543)
* bpo-35946: Improve assert_called_with documentation (GH-11796)Rémi Lapeyre2019-08-292-3/+3
|
* bpo-36871: Ensure method signature is used when asserting mock calls to a ↵Xtreak2019-08-293-1/+86
| | | | | | | | | | | | | | | | method (GH13261) * Fix call_matcher for mock when using methods * Add NEWS entry * Use None check and convert doctest to unittest * Use better name for mock in tests. Handle _SpecState when the attribute was not accessed and add tests. * Use reset_mock instead of reinitialization. Change inner class constructor signature for check * Reword comment regarding call object lookup logic
* bpo-25777: Wording describes a lookup, not a call (GH-15573)Raymond Hettinger2019-08-291-1/+1
|
* bpo-36167: fix an incorrect capitalization (GH-14482)avinassh2019-08-291-1/+1
|
* bpo-37964: Make sure test works if TESTFN is in a non-ASCII directory. ↵Benjamin Peterson2019-08-291-3/+3
| | | | (GH-15568)
* bpo-18378: Recognize "UTF-8" as a valid name in locale._parse_localename ↵Ronald Oussoren2019-08-293-0/+41
| | | | (GH-14736)
* Raise a RuntimeError when tee iterator is consumed from different threads ↵HongWeipeng2019-08-293-1/+12
| | | | (GH-15567)
* closes bpo-37964: add F_GETPATH command to fcntl (GH-15550)Vinay Sharma2019-08-294-0/+14
| | | | | | | https://bugs.python.org/issue37964 Automerge-Triggered-By: @benjaminp
* bpo-23878: Remove an unneeded fseek() call in _Py_FindEnvConfigValue() ↵Zackery Spytz2019-08-281-1/+0
| | | | (GH-15424)
* closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. ↵Anonymous Maarten2019-08-282-1/+3
| | | | | | | | | | | | (GH-15560) https://bugs.python.org/issue37965 https://bugs.python.org/issue37965 Automerge-Triggered-By: @benjaminp