summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38203: faulthandler.dump_traceback_later() is always available (GH-16249)Victor Stinner2019-09-184-19/+6
| | | | dump_traceback_later() and cancel_dump_traceback_later() functions of the faulthandler module are always available since Python 3.7.
* bpo-38203: regrtest: put a 2 min timeout on Python exit (GH-16250)Victor Stinner2019-09-181-10/+24
|
* bpo-36546: No longer a need to make "data" positional only (GH-16252)Raymond Hettinger2019-09-181-1/+1
|
* bpo-37531: Skip test_regrtest.test_multiprocessing_timeout() on Windows ↵Victor Stinner2019-09-171-0/+2
| | | | | (GH-16247) It is a known and tracked bug: disable the test until it's fixed.
* bpo-38070: Py_FatalError() logs runtime state (GH-16246)Victor Stinner2019-09-172-6/+14
|
* bpo-38191: Turn warnings into errors in NamedTuple() and TypedDict(). (GH-16238)Serhiy Storchaka2019-09-172-85/+12
|
* bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). ↵Serhiy Storchaka2019-09-172-10/+131
| | | | | | | | (GH-16222) This includes such names as "cls", "self", "typename", "_typename", "fields" and "_fields". Passing positional arguments by keyword is deprecated.
* bpo-38187: Fix reference leak in test_tools (GH-16233)Pablo Galindo2019-09-171-0/+3
|
* bpo-38013: make async_generator_athrow object tolerant to throwing ↵Andrew Svetlov2019-09-171-0/+22
| | | | | | | | | | | | exceptions (GH-16070) Even when the helper is not started yet. This behavior follows conventional generator one. There is no reason for `async_generator_athrow` to handle `gen.throw()` differently. https://bugs.python.org/issue38013
* bpo-37828: Fix default mock_name in unittest.mock.assert_called error (GH-16166)Abraham Toriz Cruz2019-09-172-1/+9
| | | | In the format string for assert_called the evaluation order is incorrect and hence for mock's without name, 'None' is printed whereas it should be 'mock' like for other messages. The error message is ("Expected '%s' to have been called." % self._mock_name or 'mock').
* bpo-37531: regrtest main process uses shorter timeout (GH-16220)Victor Stinner2019-09-171-6/+6
| | | | | | When using multiprocesss (-jN), the main process now uses a timeout of 60 seconds instead of the double of the --timeout value. The buildbot server stops a job which does not produce any output in 1200 seconds.
* bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. ↵Serhiy Storchaka2019-09-171-7/+18
| | | | (GH-16190)
* bpo-35379: When exiting IDLE, catch any AttributeError. (GH-16212)Terry Jan Reedy2019-09-172-4/+14
| | | | | One happens when EditorWindow.close is called twice. Printing a traceback, when IDLE is run from a terminal, is useless and annoying.
* bpo-38183: Test_idle ignores user config directory GH-16198)Terry Jan Reedy2019-09-164-35/+42
| | | | | It no longer tries to create or access .idlerc or any files within. Users must run IDLE to discover problems with saving settings.
* Doc: Fix Wikipedia link for functools.lru_cache (GH-16183)amist2019-09-161-1/+1
|
* bpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155)Serhiy Storchaka2019-09-161-7/+21
|
* bpo-38100: Fix spelling error in unittest.mock code (GH-16168)marcoramirezmx2019-09-161-3/+3
|
* bpo-38081: Add more non-fatal error codes for ntpath.realpath (GH-16156)Steve Dower2019-09-161-7/+34
|
* bpo-37206: Unrepresentable default values no longer represented as None. ↵Serhiy Storchaka2019-09-142-7/+7
| | | | | | | (GH-13933) In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values (like in the optional third parameter of getattr). "None" should be used if None is accepted as argument and passing None has the same effect as not passing the argument at all.
* bpo-37953: Fix deprecation warnings in test_typing (GH-16133)Zackery Spytz2019-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | self.assertEquals() is deprecated. ``` ./python -We -m test test_typing Run tests sequentially 0:00:00 load avg: 0.23 [1/1] test_typing test test_typing failed -- Traceback (most recent call last): File "/home/lubuntu2/cpython/Lib/test/test_typing.py", line 2382, in test_forward_equality_gth self.assertEquals(Union[c1, c1_gth], Union[c1]) File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 1390, in deprecated_func warnings.warn( DeprecationWarning: Please use assertEqual instead. test_typing failed == Tests result: FAILURE == 1 test failed: test_typing Total duration: 140 ms Tests result: FAILURE ``` https://bugs.python.org/issue37953
* bpo-38005: Fixed comparing and creating of InterpreterID and ChannelID. ↵Serhiy Storchaka2019-09-131-39/+38
| | | | | | | | | | | | | (GH-15652) * Fix a crash in comparing with float (and maybe other crashes). * They are now never equal to strings and non-integer numbers. * Comparison with a large number no longer raises OverflowError. * Arbitrary exceptions no longer silenced in constructors and comparisons. * TypeError raised in the constructor contains now the name of the type. * Accept only ChannelID and int-like objects in channel functions. * Accept only InterpreterId, int-like objects and str in the InterpreterId constructor. * Accept int-like objects, not just int in interpreter related functions.
* bpo-37953: Fix ForwardRef hash and equality checks (GH-15400)plokmijnuhby2019-09-132-3/+121
| | | | | Ideally if we stick a ForwardRef in a dictionary we would like to reliably be able to get it out again. https://bugs.python.org/issue37953
* Fix typo in test_api.py. (GH-16119)Benjamin Peterson2019-09-131-1/+1
|
* bpo-38122: minor fixes to AsyncMock spec handling (GH-16099)Michael Foord2019-09-131-11/+8
|
* bpo-38092: Reduce overhead when using multiprocessing in a Windows virtual ↵Steve Dower2019-09-132-2/+2
| | | | | environment (GH-16098) https://bugs.python.org/issue38092
* bpo-34706: Preserve subclassing in inspect.Signature.from_callable (GH-16108)Gregory P. Smith2019-09-132-3/+10
| | | | | | | | https://bugs.python.org/issue34706 Specifically in the case of a class that does not override its constructor signature inherited from object. These are Buck Evan @bukzor's changes cherrypicked from GH-9344.
* bpo-37449: Move ensurepip off of pkgutil and to importlib.resources (GH-15109)Joannah Nanjekye2019-09-132-4/+7
| | | | | | Move ensurepip off of pkgutil and to importlib.resources. https://bugs.python.org/issue37449
* bpo-37555: Update _CallList.__contains__ to respect ANY (#14700)Elizabeth Uselton2019-09-133-13/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Flip equality to use mock calls' __eq__ * bpo-37555: Regression test demonstrating assert_has_calls not working with ANY and spec_set Co-authored-by: Neal Finne <neal@nealfinne.com> * Revert "Flip equality to use mock calls' __eq__" This reverts commit 94ddf54c5a8aab7d00d9ab93e1cc5695c28d73e7. * bpo-37555: Add regression tests for mock ANY ordering issues Add regression tests for whether __eq__ is order agnostic on _Call and _CallList, which is useful for comparisons involving ANY, especially if the ANY comparison is to a class not defaulting __eq__ to NotImplemented. Co-authored-by: Neal Finne <neal@nealfinne.com> * bpo-37555: Fix _CallList and _Call order sensitivity _Call and _CallList depend on ordering to correctly process that an object being compared to ANY with __eq__ should return True. This fix updates the comparison to check both a == b and b == a and return True if either condition is met, fixing situations from the tests in the previous two commits where assertEqual would not be commutative if checking _Call or _CallList objects. This seems like a reasonable fix considering that the Python data model specifies that if an object doesn't know how to compare itself to another object it should return NotImplemented, and that on getting NotImplemented from a == b, it should try b == a, implying that good behavior for __eq__ is commutative. This also flips the order of comparison in _CallList's __contains__ method, guaranteeing ANY will be on the left and have it's __eq__ called for equality checking, fixing the interaction between assert_has_calls and ANY. Co-author: Neal Finne <neal@neal.finne.com> * bpo-37555: Ensure _call_matcher returns _Call object * Adding ACK and news entry * bpo-37555: Replacing __eq__ with == to sidestep NotImplemented bool(NotImplemented) returns True, so it's necessary to use == instead of __eq__ in this comparison. * bpo-37555: cleaning up changes unnecessary to the final product * bpo-37555: Fixed call on bound arguments to respect args and kwargs * Revert "bpo-37555: Add regression tests for mock ANY ordering issues" This reverts commit 49c5310ad493c4356dd3bc58c03653cd9466c4fa. * Revert "bpo-37555: cleaning up changes unnecessary to the final product" This reverts commit 18e964ba0126d8964d89842cb95534b63c2d326e. * Revert "bpo-37555: Replacing __eq__ with == to sidestep NotImplemented" This reverts commit f295eaca5bceac6636c0e2b10e6c7d9a8ee8296a. * Revert "bpo-37555: Fix _CallList and _Call order sensitivity" This reverts commit 874fb697b8376fcea130116e56189061f944fde6. * Updated NEWS.d * bpo-37555: Add tests checking every function using _call_matcher both with and without spec * bpo-37555: Ensure all assert methods using _call_matcher are actually passing calls * Remove AnyCompare and use call objects everywhere. * Revert "Remove AnyCompare and use call objects everywhere." This reverts commit 24973c0b32ce7d796a7f4eeaf259832222aae0f5. * Check for exception in assert_any_await
* bpo-37199: Replace the early returns added in c2cda63. (GH-14535)Zackery Spytz2019-09-131-37/+34
|
* bpo-25068: urllib.request.ProxyHandler now lowercases the dict keys (GH-13489)Zackery Spytz2019-09-132-15/+17
|
* bpo-36046: Fix buildbot failures (GH-16091)Gregory P. Smith2019-09-131-3/+17
| | | | Varying user/group/permission check needs on platforms.
* bpo-38153: Normalize hashlib algorithm names (GH-16083)Christian Heimes2019-09-132-11/+30
| | | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-38148: Add slots to asyncio transports (GH-16077)Andrew Svetlov2019-09-132-4/+23
| | | | | | | | * bpo-38148: Add slots to asyncio transports * Update Misc/NEWS.d/next/Library/2019-09-13-08-55-43.bpo-38148.Lnww6D.rst Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
* bpo-12707: deprecate info(), geturl(), getcode() methods in favor of ↵Ashwin Ramaswami2019-09-134-11/+20
| | | | | headers, url, and status properties for HTTPResponse and addinfourl (GH-11447) Co-Authored-By: epicfaace <aramaswamis@gmail.com>
* bpo-12144: Handle cookies with expires attribute in CookieJar.make_cookies ↵Xtreak2019-09-132-2/+10
| | | | | | | | | | | | | | (GH-13921) Handle time comparison for cookies with `expires` attribute when `CookieJar.make_cookies` is called. Co-authored-by: Demian Brecht <demianbrecht@gmail.com> https://bugs.python.org/issue12144 Automerge-Triggered-By: @asvetlov
* bpo-36889: Document Stream class and add docstrings (GH-14488)Xtreak2019-09-131-0/+21
| | | | | | | | | | | * This just copies the docs from `StreamWriter` and `StreamReader`. * Add docstring for asyncio functions. https://bugs.python.org/issue36889 Automerge-Triggered-By: @asvetlov
* bpo-8538: Add support for boolean actions to argparse (GH-11478)Rémi Lapeyre2019-09-132-12/+91
| | | Co-Authored-By: remilapeyre <remi.lapeyre@henki.fr>
* bpo-37785: Fix xgettext warning in argparse (GH-15161)Jakub Kulík2019-09-131-2/+3
|
* bpo-9216: Add usedforsecurity to hashlib constructors (GH-16044)Christian Heimes2019-09-132-2/+14
| | | | | The usedforsecurity keyword only argument added to the hash constructors is useful for FIPS builds and similar restrictive environment with non-technical requirements that legacy algorithms be forbidden by their implementations without being explicitly annotated as not being used for any security related purposes. Linux distros with FIPS support benefit from this being standard rather than making up their own way(s) to do it. Contributed and Signed-off-by: Christian Heimes christian@python.org
* bpo-36046: Add user and group parameters to subprocess (GH-11950)Patrick McLean2019-09-124-13/+262
| | | | | | | | | | | | | | * subprocess: Add user, group and extra_groups paremeters to subprocess.Popen This adds a `user` parameter to the Popen constructor that will call setreuid() in the child before calling exec(). This allows processes running as root to safely drop privileges before running the subprocess without having to use a preexec_fn. This also adds a `group` parameter that will call setregid() in the child process before calling exec(). Finally an `extra_groups` parameter was added that will call setgroups() to set the supplimental groups.
* closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193)Daniel Hahler2019-09-121-1/+1
| | | | | | | The "--" should not be included with long options passed to getopt.getopt. Fixes https://bugs.python.org/issue37803
* bpo-21872: fix lzma library decompresses data incompletely (GH-14048)animalize2019-09-121-0/+163
| | | | | | | * 1. add test case with wrong behavior * 2. fix bug when max_length == -1 * 3. allow b"" as valid input data for decompress_buf() * 4. when max_length >= 0, let needs_input mechanism works * add more asserts to test case
* bpo-36991: Fix incorrect exception escaping ZipFile.extract() (GH-13632)Berker Peksag2019-09-122-0/+12
|
* bpo-37935: Added tests for os.walk(), glob.iglob() and Path.glob() (GH-15956)Serhiy Storchaka2019-09-123-0/+59
| | | | | Test that they do not keep too many file descriptors open for the host OS in a reasonable test scenario. See [bpo-37935](https://bugs.python.org/issue37935).
* bpo-38132: Simplify _hashopenssl code (GH-16023)Christian Heimes2019-09-121-0/+3
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)Andrew Svetlov2019-09-125-91/+147
|
* bpo-9938: Add optional keyword argument exit_on_error to ↵Hai Shi2019-09-122-9/+32
| | | | | | | | | | | | argparse.ArgumentParser (GH-15362) Co-Authored-by: Xuanji Li <xuanji@gmail.com> https://bugs.python.org/issue9938 Automerge-Triggered-By: @matrixise
* bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647)Divij Rajkumar2019-09-122-5/+17
| | | | Fixes https://bugs.python.org/issue38008
* closes bpo-37405: Make socket.getsockname() always return a tuple for ↵bggardner2019-09-121-1/+3
| | | | | AF_CAN. (GH-14392) This fixes a regression from 3.5. In recent releases, `getsockname()` in the AF_CAN case has returned a string.
* bpo-36876: Skip test_check_c_globals for now. (gh-16017)Eric Snow2019-09-121-1/+3
|