summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-21263: Skip test_gdb when python has been compiled with LLVM clang ↵Lysandros Nikolaou2018-11-041-0/+5
| | | | (GH-10318)
* bpo-34969: Add --fast, --best on the gzip CLI (GH-9833)Stéphane Wirtel2018-11-032-7/+52
|
* bpo-33578: Fix getstate/setstate for CJK decoder (GH-10290)Christopher Thorne2018-11-021-0/+4
| | | | Previous version was casting to Py_ssize_t incorrectly and exhibited unexpected behavior on big-endian systems.
* bpo-33578: Add getstate/setstate for CJK codec (GH-6984)Christopher Thorne2018-11-012-0/+141
| | | | | | | | This implements getstate and setstate for the cjkcodecs multibyte incremental encoders/decoders, primarily to fix issues with seek/tell. The encoder getstate/setstate is slightly tricky as the "state" is pending bytes + MultibyteCodec_State but only an integer can be returned. The approach I've taken is to encode this data into a long, similar to how .tell() encodes a "cookie_type" as a long. https://bugs.python.org/issue33578
* bpo-35128: Fix spacing issues in warning.warn() messages. (GH-10268)Pablo Aguiar2018-11-015-6/+6
|
* bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. ↵Xiang Zhang2018-10-311-0/+10
| | | | | | (GH-10217) _io.IncrementalNewlineDecoder's initializer possibly assigns out-of-range value to the bitwise struct field.
* bpo-33138: Change standard error message for non-pickleable and non-copyable ↵Serhiy Storchaka2018-10-313-10/+12
| | | | types. (GH-6239)
* bpo-31680: Add curses.ncurses_version. (GH-4217)Serhiy Storchaka2018-10-301-3/+19
| | | | Use curses.ncurses_version for conditionally skipping a test.
* bpo-33237: Improve AttributeError message for partially initialized module. ↵Serhiy Storchaka2018-10-303-0/+17
| | | | (GH-6398)
* bpo-34876: Change the lineno of the AST for decorated function and class. ↵Serhiy Storchaka2018-10-302-2/+58
| | | | | | | (GH-9731) It was overridden by the lineno of the first decorator. Now it is the lineno of 'def' or 'class'.
* bpo-35031: Fix test_start_tls_server_1 on FreeBSD buildbots (GH-10011)Pablo Galindo2018-10-291-0/+7
| | | Some FreeBSD buildbots fail to run this test as the eof was not being received by the server if the size is not big enough. This behaviour only appears if the client is using TLS1.3.
* bpo-34945: Buffer output in test suite only when creating junit file (GH-10204)Pablo Galindo2018-10-292-14/+16
| | | | | | | | | | | After commit d0f49d2f5085ca68e3dc8725f1fb1c9674bfb5ed, the output of the test suite is always buffered as the test output needs to be included in the JUnit file in same cases (as when a test fails). This has the consequence that printing or using debuggers (like pdb) in the test suite does not result in a good user experience anymore. This commit modifies the test suite runner so it only captures the test output when the JUnit file is requested to fix the regression so prints and debuggers are usable again.
* bpo-34160: Preserve user specified order of Element attributes in html. ↵Serhiy Storchaka2018-10-292-9/+5
| | | | (GH-10190)
* bpo-33331: Clean modules in the reversed order in PyImport_Cleanup(). (GH-6565)Serhiy Storchaka2018-10-291-56/+62
| | | | | | Modules imported last are now cleared first at interpreter shutdown. A newly imported module is moved to the end of sys.modules, behind modules on which it depends.
* bpo-35097: Add IDLE doc subsection explaining editor windows. (#10206)Terry Jan Reedy2018-10-291-0/+17
| | | Topics include opening, title and status bar, .py* extension, and running.
* bpo-35047, unittest.mock: Better error messages on assert_called_xxx ↵Petter Strandmark2018-10-282-8/+58
| | | | | | | failures (GH-10090) unittest.mock now includes mock calls in exception messages if assert_not_called, assert_called_once, or assert_called_once_with fails.
* Issue 35093: Document the IDLE document viewer in the IDLE doc. (#10195)Terry Jan Reedy2018-10-281-10/+20
| | | Add a paragraph in "Help and preferences", "Help sources" subsection.
* bpo-33234 Improve list() pre-sizing for inputs with known lengths (GH-9846)Pablo Galindo2018-10-281-0/+9
| | | | | | | | | | | | The list() constructor isn't taking full advantage of known input lengths or length hints. This commit makes the constructor pre-size and not over-allocate when the input size is known (the input collection implements __len__). One on the main advantages is that this provides 12% difference in memory savings due to the difference between overallocating and allocating exactly the input size. For efficiency purposes and to avoid a performance regression for small generators and collections, the size of the input object is calculated using __len__ and not __length_hint__, as the later is considerably slower.
* Fix yet one error in checking Tcl version. (GH-10189)Serhiy Storchaka2018-10-281-1/+1
|
* bpo-34160: Preserve user specified order of Element attributes (GH-10163)Raymond Hettinger2018-10-282-1/+21
|
* Fix checking for bugfix Tcl version. (GH-10185)Serhiy Storchaka2018-10-281-1/+1
|
* bpo-1529353: Explain Shell text squeezing in the IDLE doc. (#10169)Terry Jan Reedy2018-10-281-2/+19
|
* bpo-32892: Support subclasses of base types in isinstance checks for AST ↵Serhiy Storchaka2018-10-282-1/+5
| | | | | | | constants. (GH-9934) Some projects (e.g. Chameleon) create ast.Str containing an instance of the str subclass.
* bpo-35088: Update idlelib.help.copy_string docstring (#10164)Terry Jan Reedy2018-10-281-17/+17
| | | We now use git and backporting instead of hg and forward merging.
* bpo-35087: Update idlelib help files for the current doc build. (GH-10162)Terry Jan Reedy2018-10-282-78/+98
| | | There is only one trivial change to idle.rst. Nearly all the changes to help.html are the elimination of chapter and section numbers on headers due to changes in the build system. help.py no longer requires header numbering.
* bpo-34751: improved hash function for tuples (GH-9471)jdemeyer2018-10-281-18/+93
|
* bpo-35067: Remove _distutils_findvs and use vswhere.exe instead. (GH-10095)Steve Dower2018-10-271-32/+32
|
* bpo-33710: Deprecate l*gettext() and related functions in the gettext ↵Serhiy Storchaka2018-10-272-64/+193
| | | | | | module. (GH-10139) They return encoded bytes and are Python 2 artifacts.
* bpo-35024: Remove redundant and possibly incorrect verbose message after ↵Quentin Agren2018-10-261-1/+0
| | | | | | | | | writing '.pyc' (GH-9998) Since `SourceFileLoader.set_data()` catches exceptions raised by `_write_atomic()` and logs an informative message consequently, always logging successful outcome in 'SourceLoader.get_code()' seems redundant. https://bugs.python.org/issue35024
* bpo-34789: make xml.sax.make_parser accept iterables of all types (GH-9576)Andrés Delfino2018-10-262-4/+32
|
* bpo-35017, socketserver: don't accept request after shutdown (GH-9952)Denis Ledoux2018-10-261-0/+3
| | | | | | | | | | | | | | Prior to this revision, after the shutdown of a `BaseServer`, the server accepted a last single request if it was sent between the server socket polling and the polling timeout. This can be problematic for instance for a server restart for which you do not want to interrupt the service, by not closing the listening socket during the restart. One request failed because of this behavior. Note that only one request failed, following requests were not accepted, as expected.
* bpo-34890: Make iscoroutinefunction, isgeneratorfunction and ↵Pablo Galindo2018-10-264-12/+46
| | | | | | | | | | | isasyncgenfunction work with functools.partial (GH-9903) inspect.isfunction() processes both inspect.isfunction(func) and inspect.isfunction(partial(func, arg)) correctly but some other functions in the inspect module (iscoroutinefunction, isgeneratorfunction and isasyncgenfunction) lack this functionality. This commits adds a new check in the mentioned functions in the inspect module so they can work correctly with arbitrarily nested partial functions.
* bpo-9263: _Py_NegativeRefcount() use _PyObject_AssertFailed() (GH-10109)Victor Stinner2018-10-261-2/+3
| | | | _Py_NegativeRefcount() now uses _PyObject_AssertFailed() to dump the object to help debugging.
* bpo-35022: unittest.mock.MagicMock now also supports __fspath__ (GH-9960)Max Bélanger2018-10-252-0/+12
| | | | The MagicMock class supports many magic methods, but not __fspath__. To ease testing with modules such as os.path, this function is now supported by default.
* bpo-9263: Dump Python object on GC assertion failure (GH-10062)Victor Stinner2018-10-251-3/+66
| | | | | | | | | | | | | | | | | | | | | | | Changes: * Add _PyObject_AssertFailed() function. * Add _PyObject_ASSERT() and _PyObject_ASSERT_WITH_MSG() macros. * gc_decref(): replace assert() with _PyObject_ASSERT_WITH_MSG() to dump the faulty object if the assertion fails. _PyObject_AssertFailed() calls: * _PyMem_DumpTraceback(): try to log the traceback where the object memory has been allocated if tracemalloc is enabled. * _PyObject_Dump(): log repr(obj). * Py_FatalError(): log the current Python traceback. _PyObject_AssertFailed() uses _PyObject_IsFreed() heuristic to check if the object memory has been freed by a debug hook on Python memory allocators. Initial patch written by David Malcolm. Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
* bpo-35059: Add Py_STATIC_INLINE() macro (GH-10093)Victor Stinner2018-10-251-0/+17
| | | | | | | | | * Add Py_STATIC_INLINE() macro to declare a "static inline" function. If the compiler supports it, try to always inline the function even if no optimization level was specified. * Modify pydtrace.h to use Py_STATIC_INLINE() when WITH_DTRACE is not defined. * Add an unit test on Py_DECREF() to make sure that _Py_NegativeRefcount() reports the correct filename.
* bpo-31047: Fix ntpath.abspath to trim ending separator (GH-10082)Tim Graham2018-10-252-1/+3
| | | Regression in b0bf51b32240369ccb736dc32ff82bb96f375402.
* bpo-32321: Add pure Python fallback for functools.reduce (GH-8548)madman-bob2018-10-252-36/+78
|
* bpo-35053: Enhance tracemalloc to trace free lists (GH-10063)Victor Stinner2018-10-251-0/+20
| | | | | | | | | | | | tracemalloc now tries to update the traceback when an object is reused from a "free list" (optimization for faster object creation, used by the builtin list type for example). Changes: * Add _PyTraceMalloc_NewReference() function which tries to update the Python traceback of a Python object. * _Py_NewReference() now calls _PyTraceMalloc_NewReference(). * Add an unit test.
* importlib: Fix typo in SourceLoader.path_stats docstring (GH-10052)Quentin2018-10-251-3/+4
|
* turtledemo/penrose.py: remove unused clock() calls (GH-10033)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-10-241-3/+0
| | | Actually time calculations were remove in commit 891a1f8.
* bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523)Zsolt Cserna2018-10-231-5/+11
| | | | | | | | | | Fix the documentation of copy2, as it does not copy file ownership (user and group), only mode, mtime, atime and flags. The original text was confusing to developers as it suggested that this command is the same as 'cp -p', but according to cp(1), '-p' copies file ownership as well. Clarify which metadata is copied by shutil.copystat in its docstring.
* bpo-35028: cgi: Fix max_num_fields off by one error (GH-9973)matthewbelisle-wf2018-10-232-18/+24
| | | https://bugs.python.org/issue35028
* bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042)Josh Snyder2018-10-231-2/+2
|
* bpo-34482: test datetime classes' handling of non-UTF-8-encodable strings ↵Alexey Izbyshev2018-10-231-0/+40
| | | | (GH-8878)
* bpo-34454: Clean up datetime.fromisoformat surrogate handling (GH-8959)Paul Ganssle2018-10-222-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* bpo-29843: raise AttributeError if given negative _length_ (GH-10029)Tal Einat2018-10-221-5/+19
| | | | | | | | Raise ValueError OverflowError in case of a negative _length_ in a ctypes.Array subclass. Also raise TypeError instead of AttributeError for non-integer _length_. Co-authored-by: Oren Milman <orenmn@gmail.com>
* bpo-34984: Improve error messages for bytes and bytearray constructors. ↵Serhiy Storchaka2018-10-211-0/+2
| | | | (GH-9874)
* bpo-34973: Fix crash in bytes constructor. (GH-9841)Serhiy Storchaka2018-10-211-0/+17
| | | Constructing bytes from mutating list could cause a crash.
* bpo-8525: help() on a type now shows builtin subclasses (GH-5066)Sanyam Khurana2018-10-212-0/+136
| | | | | For builtin types with builtin subclasses, help() on the type now shows up to 4 of the subclasses. This partially replaces the exception hierarchy information previously displayed in Python 2.7.