]>
granicus.if.org Git - python/log
animalize [Thu, 12 Sep 2019 14:20:37 +0000 (22:20 +0800)]
bpo-21872: fix lzma library decompresses data incompletely (GH-14048)
* 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
Berker Peksag [Thu, 12 Sep 2019 14:13:44 +0000 (17:13 +0300)]
bpo-36991: Fix incorrect exception escaping ZipFile.extract() (GH-13632)
T. Wouters [Thu, 12 Sep 2019 14:05:33 +0000 (07:05 -0700)]
Revert "Fix depth-first-search computation in compile.c (GH-16042)" (GH-16050)
This reverts commit
355f3e1e5caf16198255df573a1f5e8b98b30105 .
bpo-38135
Mark Shannon [Thu, 12 Sep 2019 13:42:23 +0000 (14:42 +0100)]
Fix depth-first-search computation in compile.c (GH-16042)
Christian Heimes [Thu, 12 Sep 2019 13:30:47 +0000 (15:30 +0200)]
bpo-38132: Check EVP_DigestUpdate for error (GH-16041)
Julien Palard [Thu, 12 Sep 2019 13:19:06 +0000 (15:19 +0200)]
Doc: Add -m reference in context of code execution (GH-16045)
Christian Heimes [Thu, 12 Sep 2019 13:13:02 +0000 (15:13 +0200)]
bpo-37363: Document internal audit events (GH-14663)
Three internal cpython events were not documented, yet.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue37363
Serhiy Storchaka [Thu, 12 Sep 2019 12:54:48 +0000 (15:54 +0300)]
bpo-37935: Added tests for os.walk(), glob.iglob() and Path.glob() (GH-15956)
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).
Christian Heimes [Thu, 12 Sep 2019 12:42:07 +0000 (14:42 +0200)]
bpo-38132: Simplify _hashopenssl code (GH-16023)
Signed-off-by: Christian Heimes <christian@python.org>
Andrew Svetlov [Thu, 12 Sep 2019 12:40:40 +0000 (15:40 +0300)]
bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)
Zachary Ware [Thu, 12 Sep 2019 12:35:48 +0000 (13:35 +0100)]
Enhance Py_UNREACHABLE macro (GH-16032)
Brandt Bucher [Thu, 12 Sep 2019 12:11:20 +0000 (05:11 -0700)]
bpo-26868: Fix example usage of PyModule_AddObject. (#15725)
* 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
Windson yang [Thu, 12 Sep 2019 12:10:50 +0000 (20:10 +0800)]
bpo-35325: Doc: imp.find_module() return value documentation discrepancy (GH-11040)
Christian Heimes [Thu, 12 Sep 2019 11:46:37 +0000 (13:46 +0200)]
bpo-38134: Remove PKBDF2_HMAC_fast from _hashopenssl (GH-16028)
Signed-off-by: Christian Heimes <christian@python.org>
Emmanuel Arias [Thu, 12 Sep 2019 11:29:54 +0000 (08:29 -0300)]
bpo-35685: Add examples of unittest.mock.patch.dict usage (GH-11456)
Julien Palard [Thu, 12 Sep 2019 11:23:53 +0000 (13:23 +0200)]
bpo-36675: Remove obsolete code. (GH-16024)
Does no longer work since Sphinx moved the trim_doctest_flag option in
the configuration.
Christian Heimes [Thu, 12 Sep 2019 11:10:05 +0000 (13:10 +0200)]
bpo-32008: Prefer client or TLSv1_2 in examples (GH-5797)
Prefer client or TLSv1_2 in examples
Signed-off-by: Christian Heimes <christian@python.org>
Hai Shi [Thu, 12 Sep 2019 10:56:05 +0000 (05:56 -0500)]
bpo-9938: Add optional keyword argument exit_on_error to argparse.ArgumentParser (GH-15362)
Co-Authored-by: Xuanji Li <xuanji@gmail.com>
https://bugs.python.org/issue9938
Automerge-Triggered-By: @matrixise
Harmandeep Singh [Thu, 12 Sep 2019 10:22:30 +0000 (15:52 +0530)]
bpo-13927: time.ctime and time.asctime return string explantion (GH-11303)
* bpo-13927: time.ctime and time.asctime return string explantion
* Add note explaining that time.ctime and time.asctime returns a space padded date value in case it contains a single digit date
* Reformat linebreaks
Divij Rajkumar [Thu, 12 Sep 2019 10:13:51 +0000 (11:13 +0100)]
bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647)
Fixes https://bugs.python.org/issue38008
Zackery Spytz [Thu, 12 Sep 2019 10:09:32 +0000 (04:09 -0600)]
closes bpo-38127: _ctypes: PyObject_IsSubclass() should be checked for failure. (GH-16011)
An exception may occur during a PyObject_IsSubclass() call.
bggardner [Thu, 12 Sep 2019 10:02:48 +0000 (06:02 -0400)]
closes bpo-37405: Make socket.getsockname() always return a tuple for AF_CAN. (GH-14392)
This fixes a regression from 3.5. In recent releases, `getsockname()` in the AF_CAN case has returned a string.
Eric Snow [Thu, 12 Sep 2019 09:51:00 +0000 (10:51 +0100)]
bpo-36876: Skip test_check_c_globals for now. (gh-16017)
Georgy Frolov [Thu, 12 Sep 2019 09:41:36 +0000 (12:41 +0300)]
Doc: Add example of dict() function with positional and keyword arguments (GH-15220)
Xtreak [Thu, 12 Sep 2019 09:29:36 +0000 (10:29 +0100)]
Fix the ImportWarning regarding __spec__ and __package__ being None (GH-16003)
Jason R. Coombs [Thu, 12 Sep 2019 09:29:11 +0000 (10:29 +0100)]
bpo-38121: Sync importlib.metadata with 0.22 backport (GH-15993)
* bpo-38121: Sync importlib.metadata with 0.22 backport
* 📜🤖 Added by blurb_it.
Zackery Spytz [Thu, 12 Sep 2019 09:27:14 +0000 (03:27 -0600)]
bpo-21120: Exclude Python-ast.h, ast.h and asdl.h from the limited API (#14634)
The PyArena type is not part of the limited API, so these headers
shouldn't be part of it either.
Greg Price [Thu, 12 Sep 2019 09:25:25 +0000 (02:25 -0700)]
closes bpo-37758: Extend unicodedata checksum tests to cover all of Unicode. (GH-15125)
Unicode has grown since Python first gained support for it,
when Unicode itself was still rather new.
This pair of test cases was added in commit
6a20ee7de back in 2000,
and they haven't needed to change much since then. But do change
them to look beyond the Basic Multilingual Plane (range(0x10000))
and cover all 17 planes of Unicode's final form.
This adds about 5 seconds to the test suite's runtime. Mark the
tests as CPU-using accordingly.
Greg Price [Thu, 12 Sep 2019 09:23:43 +0000 (02:23 -0700)]
bpo-37760: Convert from length-18 lists to a dataclass, in makeunicodedata. (GH-15265)
Now the fields have names! Much easier to keep straight as a
reader than the elements of an 18-tuple.
Runs about 10-15% slower: from 10.8s to 12.3s, on my laptop.
Fortunately that's perfectly fine for this maintenance script.
Petr Viktorin [Thu, 12 Sep 2019 09:12:53 +0000 (10:12 +0100)]
bpo-37879: Fix warnings in _testcapimodule (GH-16004)
ewosborne [Thu, 12 Sep 2019 09:03:31 +0000 (05:03 -0400)]
bpo-32820: __format__ method for ipaddress (#5627)
* bits method and test_bits
* Cleaned up assert string
* blurb
* added docstring
* Faster method, per Eric Smith
* redoing as __format__
* added ipv6 method
* test cases and cleanup
* updated news
* cleanup and NEWS.d
* cleaned up old NEWS
* removed cut and paste leftover
* one more cleanup
* moved to regexp, moved away from v4- and v6-specific versions of __format__
* More cleanup, added ipv6 test cases
* more cleanup
* more cleanup
* cleanup
* cleanup
* cleanup per review, part 1
* addressed review comments around help string and regexp matching
* wrapped v6 test strings. contiguous integers: break at 72char. with underscores: break so that it looks clean.
* 's' and '' tests for pv4 and ipv6
* whitespace cleanup
* Remove trailing whitespace
* Remove more trailing whitespace
* Remove an excess blank line
Joannah Nanjekye [Thu, 12 Sep 2019 09:02:59 +0000 (10:02 +0100)]
bpo-18578: Rename and document test.bytecode_helper as test.support.bytecode_helper (GH-15168)
Rename and document test.bytecode_helper as test.support.bytecode_helper
Xtreak [Thu, 12 Sep 2019 08:13:20 +0000 (09:13 +0100)]
bpo-38120: Fix DeprecationWarning in test_random for invalid type of arguments to random.seed. (GH-15987)
Géry Ogam [Thu, 12 Sep 2019 07:41:32 +0000 (09:41 +0200)]
Correct typos in the codecs module documentation (#15135)
Benjamin Peterson [Wed, 11 Sep 2019 23:43:22 +0000 (00:43 +0100)]
closes bpo-38124: Fix bounds check in PyState_AddModule. (GH-16007)
The >=, checking whether a module index was in already in the module-by-index list, needed to be strict.
Also, fold nested ifs into one and fix some bad spacing.
Eric Snow [Wed, 11 Sep 2019 18:49:45 +0000 (19:49 +0100)]
bpo-36876: Add a tool that identifies unsupported global C variables. (#15877)
Björn Meier [Wed, 11 Sep 2019 17:55:02 +0000 (19:55 +0200)]
bpo-36270: Doc: add link to traceback object reference (GH-13119)
Christian Heimes [Wed, 11 Sep 2019 17:48:58 +0000 (19:48 +0200)]
Correct typo in min version test (GH-16000)
Signed-off-by: Christian Heimes <christian@python.org>
Hai Shi [Wed, 11 Sep 2019 17:25:55 +0000 (12:25 -0500)]
bpo-37698: Update doc of PyBuffer_ToContiguous (GH-14992)
https://bugs.python.org/issue37698
Christian Heimes [Wed, 11 Sep 2019 17:24:47 +0000 (19:24 +0200)]
bpo-34001: Fix test_ssl with LibreSSL (GH-13783)
Marc [Wed, 11 Sep 2019 17:17:05 +0000 (10:17 -0700)]
Doc: recursive glob ** follows symlinks to directories (GH-12918)
Dino Viehland [Wed, 11 Sep 2019 17:16:34 +0000 (10:16 -0700)]
bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)
Summary: This mostly migrates Python-ast.c to PEP384 and removes all statics from the whole file. This modifies the generator itself that generates the Python-ast.c. It leaves in the usage of _PyObject_LookupAttr even though it's not fully PEP384 compatible (this could always be shimmed in by anyone who needs it).
Joannah Nanjekye [Wed, 11 Sep 2019 17:12:21 +0000 (18:12 +0100)]
bpo-28724: Add methods send_fds and recv_fds to the socket module (GH-12889)
The socket module now has the socket.send_fds() and socket.recv.fds() functions.
Contributed by Joannah Nanjekye, Shinya Okano (original patch)
and Victor Stinner.
Co-Authored-By: Victor Stinner <vstinner@redhat.com>
Christian Heimes [Wed, 11 Sep 2019 16:45:52 +0000 (18:45 +0200)]
bpo-38117: Test with OpenSSL 1.1.1d (GH-15983)
Signed-off-by: Christian Heimes <christian@python.org>
Hai Shi [Wed, 11 Sep 2019 16:38:47 +0000 (11:38 -0500)]
bpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988)
https://bugs.python.org/issue37750
Automerge-Triggered-By: @matrixise
Steve Dower [Wed, 11 Sep 2019 16:03:37 +0000 (17:03 +0100)]
bpo-32592: Set Windows 8 as the minimum required version for API support (GH-15951)
Xtreak [Wed, 11 Sep 2019 16:02:34 +0000 (17:02 +0100)]
bpo-36528: Remove duplicate re tests. (GH-2689)
Co-Authored-By: Makdon <makdon@makdon.me>
Dong-hee Na [Wed, 11 Sep 2019 16:00:02 +0000 (01:00 +0900)]
bpo-35923: Update the BuiltinImporter to use loader._ORIGIN instead of a hard-coded value (GH-15651)
Julien Palard [Wed, 11 Sep 2019 15:55:22 +0000 (17:55 +0200)]
Doc: Fix missing negation. (GH-14640)
Reported by Hug Capella on docs@.
Automerge-Triggered-By: @matrixise
Dino Viehland [Wed, 11 Sep 2019 15:47:17 +0000 (08:47 -0700)]
bpo-38113: Update Python/ast.c to PEP-384 (GH-15975)
Removes statics for better subinterpreter support and moves to _PyType_Name
https://bugs.python.org/issue38113
Automerge-Triggered-By: @tiran
toonarmycaptain [Wed, 11 Sep 2019 15:37:13 +0000 (10:37 -0500)]
Improve clarity of try-return-finally-return (GH-15677)
Clarify execution in try-return-finally-return case.
Daniel Andrade [Wed, 11 Sep 2019 15:29:44 +0000 (08:29 -0700)]
bpo-34331: Fix incorrectly pluralized abstract class error message. (GH-8670)
Steve Dower [Wed, 11 Sep 2019 15:16:27 +0000 (16:16 +0100)]
bpo-38114: Do not include pip.ini in Nuget package (GH-15964)
Steve Dower [Wed, 11 Sep 2019 15:15:39 +0000 (16:15 +0100)]
bpo-33166: Change os.cpu_count to return active (real) processors (GH-15949)
Jakub KulÃk [Wed, 11 Sep 2019 15:11:57 +0000 (17:11 +0200)]
bpo-38110: Use fdwalk for os.closerange() when available. (GH-15224)
Use fdwalk() on platforms that support it to implement os.closerange().
Lysandros Nikolaou [Wed, 11 Sep 2019 15:08:10 +0000 (18:08 +0300)]
bpo-36182: Update pathlib.Path.write_text() docs (GH-12161)
with the case of an existing file
JunWei Song [Wed, 11 Sep 2019 15:04:12 +0000 (23:04 +0800)]
bpo-36260: Add pitfalls to zipfile module documentation (#13378)
* bpo-36260: Add pitfalls to zipfile module documentation
We saw vulnerability warning description (including zip bomb) in Doc/library/xml.rst file.
This gave us the idea of documentation improvement.
So, we moved a little bit forward :P
And the doc patch can be found (pr).
* fix trailing whitespace
* 📜🤖 Added by blurb_it.
* Reformat text for consistency.
Daniel Abrahamsson [Wed, 11 Sep 2019 14:58:56 +0000 (16:58 +0200)]
bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15330)
Before, running deactivate from a bash shell configured to treat undefined variables as errors (`set -u`) would produce a warning:
```
$ python3 -m venv test
$ source test/bin/activate
(test) $ deactivate
-bash: $1: unbound variable
```
Géry Ogam [Wed, 11 Sep 2019 14:55:13 +0000 (16:55 +0200)]
Improve the io module documentation (GH-15099)
* Update io.rst
* Apply suggestions from code review
Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>
Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>
Steve Dower [Wed, 11 Sep 2019 14:41:21 +0000 (15:41 +0100)]
bpo-36634: Fixes activate.bat when existing values contain double quotes (GH-15924)
Emily Morehouse [Wed, 11 Sep 2019 14:37:12 +0000 (15:37 +0100)]
bpo-35224: Additional documentation for Assignment Expressions (GH-15935)
Add or update assignment expression documentation for:
- FAQ - Design
- Reference - Expressions
- Reference - Lexical Analysis
https://bugs.python.org/issue35224
Automerge-Triggered-By: @matrixise
blhsing [Wed, 11 Sep 2019 14:28:06 +0000 (07:28 -0700)]
bpo-37972: unittest.mock._Call now passes on __getitem__ to the __getattr__ chaining so that call() can be subscriptable (GH-15565)
* bpo-37972: unittest.mock._Call now passes on __getitem__ to the __getattr__ chaining so that call() can be subscriptable
* 📜🤖 Added by blurb_it.
* Update 2019-08-28-21-40-12.bpo-37972.kP-n4L.rst
added name of the contributor
* bpo-37972: made all dunder methods chainable for _Call
* bpo-37972: delegate only attributes of tuple instead to __getattr__
Simon Willison [Wed, 11 Sep 2019 14:25:26 +0000 (09:25 -0500)]
Doc: Indicate locations of parse_qs, parse_qsl, escape (GH-14828)
Since they have been removed from cgi it's useful to remind people where they
can be found instead.
Andrew Scheller [Wed, 11 Sep 2019 14:18:00 +0000 (15:18 +0100)]
Update ftplib.all_errors documentation to match code (#15026)
The documentation doesn't mention the `EOFError` that https://github.com/python/cpython/blob/master/Lib/ftplib.py#L66 includes
Raymond Hettinger [Wed, 11 Sep 2019 14:17:32 +0000 (07:17 -0700)]
bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895)
* bpo-38096: Clean up the "struct sequence" / "named tuple" docs
* Fix remaining occurrences of "struct sequence"
* Repair a user visible docstring
Xtreak [Wed, 11 Sep 2019 14:12:51 +0000 (15:12 +0100)]
bpo-37651: Document CancelledError is now a subclass of BaseException (GH-15950)
https://bugs.python.org/issue37651
Automerge-Triggered-By: @1st1
Anjali Bansal [Wed, 11 Sep 2019 14:09:53 +0000 (19:39 +0530)]
bpo-33187: Document ElementInclude (XInclude) support in ElementTree (GH-8861)
Brennan D Baraban [Wed, 11 Sep 2019 13:59:37 +0000 (06:59 -0700)]
bpo-23460: Fix documentation for decimal string :g formatting (GH-11850)
Joannah Nanjekye [Wed, 11 Sep 2019 13:58:42 +0000 (14:58 +0100)]
bpo-37488 : Document a warning for datetime.utcnow() and utcfromtimestamp() (GH-15773)
https://bugs.python.org/issue37488
Automerge-Triggered-By: @pganssle
Pavel Koneski [Wed, 11 Sep 2019 13:57:33 +0000 (06:57 -0700)]
bpo-36919: make test_source_encoding.test_issue2301 implementation-independent (#13639)
* bpo-36919: make test_issue2301 implementation-independent
Jakub KulÃk [Wed, 11 Sep 2019 13:42:04 +0000 (15:42 +0200)]
closes bpo-37252: Fix devpoll tests. (GH-14017)
Filip Å [Wed, 11 Sep 2019 13:32:04 +0000 (15:32 +0200)]
bpo-37305: add MIME type for Web App Manifest (#14199)
* bpo-37305: add MIME type for Web App Manifest
* bpo-37305: add news entry
* Restore indentation and sort by value
hui shang [Wed, 11 Sep 2019 13:26:49 +0000 (21:26 +0800)]
bpo-31163: Added return values to pathlib.Path instance's rename and replace methods. (GH-13582)
* bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.
native-api [Wed, 11 Sep 2019 13:21:04 +0000 (16:21 +0300)]
bpo-33944: note about the intended use of code in .pth files (GH-10131)
https://bugs.python.org/issue33944
Zachary Ware [Wed, 11 Sep 2019 13:17:53 +0000 (14:17 +0100)]
Turn off AppVeyor CI (GH-15929)
Andre Delfino [Wed, 11 Sep 2019 13:16:11 +0000 (10:16 -0300)]
bpo-33459: Fix "tuple displays" term in Expressions.rst (GH-6760)
https://bugs.python.org/issue33459
Automerge-Triggered-By: @matrixise
Michael Osipov [Wed, 11 Sep 2019 13:08:41 +0000 (15:08 +0200)]
bpo-34519: Add additional aliases for HP Roman 8 (GH-8956)
* bpo-34519: Add additional aliases for HP Roman 8
HP Roman 8 is known under mode aliases than listed in aliases.py.
Patch by Michael Osipov.
Andrew Svetlov [Wed, 11 Sep 2019 13:07:37 +0000 (16:07 +0300)]
bpo-38107: Replace direct future and task contructor calls with factories in asyncio tests (GH-15928)
Géry Ogam [Wed, 11 Sep 2019 13:03:46 +0000 (15:03 +0200)]
bpo-35640: Allow passing PathLike arguments to SimpleHTTPRequestHandler (GH-11398)
Julien Palard [Wed, 11 Sep 2019 13:01:18 +0000 (15:01 +0200)]
Doc: Use walrus operator in example. (GH-15934)
Joannah Nanjekye [Wed, 11 Sep 2019 12:47:39 +0000 (13:47 +0100)]
bpo-35943: Prevent PyImport_GetModule() from returning a partially-initialized module (GH-15057)
Valentin Haenel [Wed, 11 Sep 2019 12:43:29 +0000 (14:43 +0200)]
Doc: Fix typo in fastsearch comments (GH-14608)
Steve Dower [Wed, 11 Sep 2019 12:43:00 +0000 (13:43 +0100)]
bpo-37326: Include libffi license when available (GH-15921)
Ashwin Ramaswami [Wed, 11 Sep 2019 12:41:54 +0000 (05:41 -0700)]
bpo-35649: update http client example (GH-11441)
Tim Hoffmann [Wed, 11 Sep 2019 11:26:31 +0000 (13:26 +0200)]
Minor ReST formatting fixes in subprocess docs (#14876)
Xtreak [Wed, 11 Sep 2019 11:21:31 +0000 (12:21 +0100)]
bpo-35603: Add a note on difflib table header interpreted as HTML (GH-11439)
Pierre Quentel [Wed, 11 Sep 2019 11:05:53 +0000 (13:05 +0200)]
bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has… (#10638)
* bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has no content-length header
* Add Misc/NEWS.d/next file.
* Add rst formatting for NEWS.d/next file
* Reaplce assert by self.assertEqual
Alex [Wed, 11 Sep 2019 11:04:04 +0000 (14:04 +0300)]
bpo-35168: Make shlex.punctuation_chars read-only (#11631)
* bpo-35168: Documentation about shlex.punctuation_chars now states that it should be set in __init__.py
* bpo-35168: Convert shlex.punctuation_chars to read-only property
* Add NEWS.d entry
Xtreak [Wed, 11 Sep 2019 11:02:14 +0000 (12:02 +0100)]
bpo-32972: Document IsolatedAsyncioTestCase of unittest module (GH-15878)
* Document `unittest.IsolatedAsyncioTestCase` API
* Add a simple example with respect to order of evaluation of setup and teardown calls.
https://bugs.python.org/issue32972
Automerge-Triggered-By: @asvetlov
Jeroen Demeyer [Wed, 11 Sep 2019 11:01:01 +0000 (13:01 +0200)]
bpo-37151: remove special case for PyCFunction from PyObject_Call (GH-14684)
bpo-37151: remove special case for PyCFunction from PyObject_Call
Alse, make the undocumented function PyCFunction_Call an alias
of PyObject_Call and deprecate it.
Ezio Melotti [Wed, 11 Sep 2019 10:57:59 +0000 (11:57 +0100)]
bpo-38103: fix conflicting labels in the docs. (GH-15906)
Benjamin Peterson [Wed, 11 Sep 2019 10:50:38 +0000 (11:50 +0100)]
bpo-35066: Make trailing percent test more portable. (GH-15907)
Different libc implementations have different behavior when presented with trailing % in strftime strings. To make test_strftime_trailing_percent more portable, compare the output of datetime.strftime directly to that of time.strftime rather than hardcoding.
Gregory P. Smith [Wed, 11 Sep 2019 10:31:37 +0000 (05:31 -0500)]
bpo-28494: install ziptestdata to fix install bot (GH-15902)
smokephil [Wed, 11 Sep 2019 10:30:04 +0000 (12:30 +0200)]
bpo-25810: Clarify eval() docs, it does not keywords (GH-15173)
Ben Lewis [Wed, 11 Sep 2019 10:09:47 +0000 (20:09 +1000)]
bpo-37409: fix relative import with no parent (#14956)
Relative imports use resolve_name to get the absolute target name,
which first seeks the current module's absolute package name from the globals:
If __package__ (and __spec__.parent) are missing then
import uses __name__, truncating the last segment if
the module is a submodule rather than a package __init__.py
(which it guesses from whether __path__ is defined).
The __name__ attempt should fail if there is no parent package (top level modules),
if __name__ is '__main__' (-m entry points), or both (scripts).
That is, if both __name__ has no subcomponents and the module does not seem
to be a package __init__ module then import should fail.
Kyle Stanley [Wed, 11 Sep 2019 10:01:41 +0000 (06:01 -0400)]
bpo-37585: Add clarification regarding comparing dict.values() (GH-14954)
Anjali [Wed, 11 Sep 2019 09:58:27 +0000 (04:58 -0500)]
bpo-16438: Doc: confusing text regarding numeric precedence corrected (GH-10521)
Steve Dower [Wed, 11 Sep 2019 09:48:36 +0000 (10:48 +0100)]
bpo-38081: Fixes ntpath.realpath('NUL') (GH-15899)
Greg Price [Wed, 11 Sep 2019 09:25:26 +0000 (02:25 -0700)]
bpo-37936: Systematically distinguish rooted vs. unrooted in .gitignore (GH-15823)
A root cause of bpo-37936 is that it's easy to write a .gitignore
rule that's intended to apply to a specific file (e.g., the
`pyconfig.h` generated by `./configure`) but actually applies to all
similarly-named files in the tree (e.g., `PC/pyconfig.h`.)
Specifically, any rule with no non-trailing slashes is applied in an
"unrooted" way, to files anywhere in the tree. This means that if we
write the rules in the most obvious-looking way, then
* for specific files we want to ignore that happen to be in
subdirectories (like `Modules/config.c`), the rule will work
as intended, staying "rooted" to the top of the tree; but
* when a specific file we want to ignore happens to be at the root of
the repo (like `platform`), then the obvious rule (`platform`) will
apply much more broadly than intended: if someone tries to add a
file or directory named `platform` somewhere else in the tree, it
will unexpectedly get ignored.
That's surprising behavior that can make the .gitignore file's
behavior feel finicky and unpredictable.
To avoid it, we can simply always give a rule "rooted" behavior when
that's what's intended, by systematically using leading slashes.
Further, to help make the pattern obvious when looking at the file and
minimize any need for thinking about the syntax when adding new rules:
separate the rules into one group for each type, with brief comments
identifying them.
For most of these rules it's clear whether they're meant to be rooted
or unrooted, but in a handful of cases I've only guessed. In that
case the safer default (the choice that won't hide information) is the
narrower, rooted meaning, with a leading slash. If for some of these
the unrooted meaning is desired after all, it'll be easy to move them
to the unrooted section at the top.
Gregory P. Smith [Wed, 11 Sep 2019 09:23:05 +0000 (04:23 -0500)]
bpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490)
Fixes a possible hang when using a timeout on subprocess.run() while
capturing output. If the child process spawned its own children or otherwise
connected its stdout or stderr handles with another process, we could hang
after the timeout was reached and our child was killed when attempting to read
final output from the pipes.