summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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-133-2/+3
| | | | | environment (GH-16098) https://bugs.python.org/issue38092
* bpo-34706: Preserve subclassing in inspect.Signature.from_callable (GH-16108)Gregory P. Smith2019-09-133-3/+11
| | | | | | | | 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-133-4/+9
| | | | | | 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-135-13/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
|
* Run autoreconf. (GH-16106)Benjamin Peterson2019-09-131-60/+30
|
* bpo-25068: urllib.request.ProxyHandler now lowercases the dict keys (GH-13489)Zackery Spytz2019-09-133-15/+19
|
* bpo-36046: Fix buildbot failures (GH-16091)Gregory P. Smith2019-09-131-3/+17
| | | | Varying user/group/permission check needs on platforms.
* closes bpo-36002: Use AC_PATH_TOOL to find llvm-profdata and llvm-ar. (GH-14998)Doyle Rowland2019-09-132-2/+4
|
* Adjust code ownership so @gpshead don't get asyncio subprocess PRs. (GH-16100)Gregory P. Smith2019-09-131-1/+3
|
* bpo-26468: Doc: improve the documentation of shutil.copy2 when it can fail. ↵Windson yang2019-09-131-1/+2
| | | | (GH-13765)
* bpo-38153: Normalize hashlib algorithm names (GH-16083)Christian Heimes2019-09-134-32/+179
| | | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-29986: Doc: Delete tip to raise TypeError from tp_richcompare. (GH-16095)Julien Palard2019-09-131-6/+0
|
* Doc: Improve consistency of os.path.normcase with other os.path functions ↵Kexuan Sun2019-09-131-2/+0
| | | | (GH-14004)
* bpo-38148: Add slots to asyncio transports (GH-16077)Andrew Svetlov2019-09-133-4/+24
| | | | | | | | * 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-137-26/+84
| | | | | 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-133-2/+12
| | | | | | | | | | | | | | (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-133-11/+225
| | | | | | | | | | | * 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-134-15/+109
| | | Co-Authored-By: remilapeyre <remi.lapeyre@henki.fr>
* bpo-38075: Port _randommodule.c to PEP-384 (GH-15798)Dino Viehland2019-09-132-57/+93
| | | | | | | | | | - Migrate `Random_Type` to `PyType_FromSpec` - To simulate an old use of `PyLong_Type.tp_as_number->nb_absolute`, I added code to the module init function to stash `int.__abs__` for later use. Ideally we'd use `PyType_GetSlot()` instead, but it doesn't currently work for static types in CPython, and implementing it just for this case doesn't seem worth it. - Do exact check for long and dispatch to PyNumber_Absolute, use vector call when not exact.
* bpo-37785: Fix xgettext warning in argparse (GH-15161)Jakub Kulík2019-09-132-2/+4
|
* Doc: Add example snippet for str.isupper() (GH-14681)Kishore Vancheeshwaran2019-09-131-0/+10
|
* bpo-9216: Add usedforsecurity to hashlib constructors (GH-16044)Christian Heimes2019-09-1320-165/+495
| | | | | 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
* Cut disused recode_encoding logic in _PyBytes_DecodeEscape. (GH-16013)Greg Price2019-09-124-63/+8
| | | | | | | | | | | | | | | | | | | | | All call sites pass NULL for `recode_encoding`, so this path is completely untested. That's been true since before Python 3.0. It adds significant complexity to this logic, so it's best to take it out. All call sites now have a literal NULL, and that's been true since commit 768921cf3 eliminated a conditional (`foo ? bar : NULL`) at the call site in Python/ast.c where we're parsing a bytes literal. But even before then, that condition `foo` had been a constant since unadorned string literals started meaning Unicode, in commit 572dbf8f1 aka v3.0a1~1035 . The `unicode` parameter is already unused, so mark it as unused too. The code that acted on it was also taken out before Python 3.0, in commit 8d30cc014 aka v3.0a1~1031 . The function (PyBytes_DecodeEscape) is exposed in the API, but it's never been documented.
* Move Eric's TODO file into his directory. (GH-16072)Benjamin Peterson2019-09-121-0/+0
|
* bpo-38133: Allow py.exe launcher to locate installations from the Microsoft ↵Steve Dower2019-09-122-101/+211
| | | | Store (GH-16025)
* bpo-36046: Add user and group parameters to subprocess (GH-11950)Patrick McLean2019-09-127-19/+426
| | | | | | | | | | | | | | * 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.
* Emphasize the need to always call PySequence_Fast. (GH-11140)Matti Picus2019-09-121-7/+14
|
* bpo-36876: Fix the globals checker tool. (gh-16058)Eric Snow2019-09-123-18/+1123
|
* closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193)Daniel Hahler2019-09-122-1/+2
| | | | | | | The "--" should not be included with long options passed to getopt.getopt. Fixes https://bugs.python.org/issue37803
* bpo-37908: Add an example of ArgumentParser.exit() (GH-15455)Hai Shi2019-09-121-1/+8
| | | Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
* bpo-38096: Complete the "structseq" and "named tuple" cleanup (GH-16010)Raymond Hettinger2019-09-122-3/+9
|
* bpo-37802: Slightly improve perfomance of PyLong_FromUnsigned*() (GH-15192)Sergey Fedoseev2019-09-122-77/+45
|
* bpo-38138: Fix memory leak introduced by interned strings (GH-16053)Dino Viehland2019-09-121-0/+1
| | | | | | | | | | | Interned string needs to be decref'd https://bugs.python.org/issue38138 Automerge-Triggered-By: @matrixise
* bpo-38137: Re-add OpenSSL 1.0.2 compat (GH-16051)Christian Heimes2019-09-121-0/+6
| | | | | | | | | | The defines are required for OpenSSL 1.0.2 and LibreSSL. https://bugs.python.org/issue38134 Automerge-Triggered-By: @tiran
* bpo-21872: fix lzma library decompresses data incompletely (GH-14048)animalize2019-09-123-6/+188
| | | | | | | * 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-123-0/+14
|
* Revert "Fix depth-first-search computation in compile.c (GH-16042)" (GH-16050)T. Wouters2019-09-121-24/+30
| | | | | This reverts commit 355f3e1e5caf16198255df573a1f5e8b98b30105. bpo-38135
* Fix depth-first-search computation in compile.c (GH-16042)Mark Shannon2019-09-121-30/+24
|
* bpo-38132: Check EVP_DigestUpdate for error (GH-16041)Christian Heimes2019-09-121-6/+16
|
* Doc: Add -m reference in context of code execution (GH-16045)Julien Palard2019-09-121-1/+3
|
* bpo-37363: Document internal audit events (GH-14663)Christian Heimes2019-09-121-1/+6
| | | | | | | | | Three internal cpython events were not documented, yet. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue37363
* 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-124-122/+391
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)Andrew Svetlov2019-09-127-101/+178
|
* Enhance Py_UNREACHABLE macro (GH-16032)Zachary Ware2019-09-121-0/+26
|
* bpo-26868: Fix example usage of PyModule_AddObject. (#15725)Brandt Bucher2019-09-129-13/+74
| | | | | | | | | | | | | | | | * Add a note to the PyModule_AddObject docs. * Correct example usages of PyModule_AddObject. * Whitespace. * Clean up wording. * 📜🤖 Added by blurb_it. * First code review. * Add < 0 in the tests with PyModule_AddObject
* bpo-35325: Doc: imp.find_module() return value documentation discrepancy ↵Windson yang2019-09-121-6/+5
| | | | | | (GH-11040)
* bpo-38134: Remove PKBDF2_HMAC_fast from _hashopenssl (GH-16028)Christian Heimes2019-09-123-123/+3
| | | Signed-off-by: Christian Heimes <christian@python.org>