]> granicus.if.org Git - python/log
python
5 years agobpo-34519: Add additional aliases for HP Roman 8 (GH-8956) (GH-15945)
Miss Islington (bot) [Wed, 11 Sep 2019 14:13:54 +0000 (07:13 -0700)]
bpo-34519: Add additional aliases for HP Roman 8 (GH-8956) (GH-15945)

* 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.
(cherry picked from commit a828514cc3715ebbc700fefa41c0ef044cbd6741)

Co-authored-by: Michael Osipov <michael.osipov@siemens.com>
5 years agobpo-37305: add MIME type for Web App Manifest (GH-14199) (#15946)
Miss Islington (bot) [Wed, 11 Sep 2019 14:13:31 +0000 (07:13 -0700)]
bpo-37305: add MIME type for Web App Manifest (GH-14199) (#15946)

* bpo-37305: add MIME type for Web App Manifest

Co-authored-by: Filip Š <filip.stamcar@hotmail.com>
5 years agobpo-31163: Added return values to pathlib.Path instance's rename and replace methods...
Miss Islington (bot) [Wed, 11 Sep 2019 14:12:54 +0000 (07:12 -0700)]
bpo-31163: Added return values to pathlib.Path instance's rename and replace methods. (GH-13582) (GH-15944)

* bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.
(cherry picked from commit 088a09af4bdeff52b9dedeb7acd1e82069f37d98)

Co-authored-by: hui shang <shangdahao@gmail.com>
5 years agobpo-33459: Fix "tuple displays" term in Expressions.rst (GH-6760) (GH-15940)
Miss Islington (bot) [Wed, 11 Sep 2019 13:38:17 +0000 (06:38 -0700)]
bpo-33459: Fix "tuple displays" term in Expressions.rst (GH-6760) (GH-15940)

https://bugs.python.org/issue33459

Automerge-Triggered-By: @matrixise
(cherry picked from commit dc269971091710563a0d730a0d4b084901826c15)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
5 years agobpo-33944: note about the intended use of code in .pth files (GH-10131) (GH-15942)
Miss Islington (bot) [Wed, 11 Sep 2019 13:36:50 +0000 (06:36 -0700)]
bpo-33944: note about the intended use of code in .pth files (GH-10131) (GH-15942)

https://bugs.python.org/issue33944
(cherry picked from commit f9b5840fb4497a9e2ba2c1f01ad0dafba04c8496)

Co-authored-by: native-api <ivan_pozdeev@mail.ru>
5 years agobpo-37326: Include libffi license when available (GH-15921)
Miss Islington (bot) [Wed, 11 Sep 2019 13:31:27 +0000 (06:31 -0700)]
bpo-37326: Include libffi license when available (GH-15921)

(cherry picked from commit 8fcaffb048d2359a4c06ed5d8fbbf46d3ae1a472)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years ago[3.8] Doc: Use walrus operator in example. (GH-15934) (GH-15936)
Stéphane Wirtel [Wed, 11 Sep 2019 13:17:48 +0000 (15:17 +0200)]
[3.8] Doc: Use walrus operator in example. (GH-15934) (GH-15936)

(cherry picked from commit e1d455f3a3b82c2e08d5e133bcbab5a181b66cfb)

Co-authored-by: Julien Palard <julien@palard.fr>
5 years agoDoc: Fix typo in fastsearch comments (GH-14608) (GH-15933)
Miss Islington (bot) [Wed, 11 Sep 2019 13:05:49 +0000 (06:05 -0700)]
Doc: Fix typo in fastsearch comments (GH-14608) (GH-15933)

(cherry picked from commit 60bba83b5d9947fb3106325293e3a4e9c9cdea7e)

Co-authored-by: Valentin Haenel <esc@users.noreply.github.com>
5 years agobpo-35649: update http client example (GH-11441) (GH-15930)
Miss Islington (bot) [Wed, 11 Sep 2019 13:02:25 +0000 (06:02 -0700)]
bpo-35649: update http client example (GH-11441) (GH-15930)

(cherry picked from commit 62cf6981425c6a6b136c5e2abef853364f535e9d)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
5 years ago[3.8] bpo-35168: Make shlex.punctuation_chars read-only (GH-11631) (GH-15927)
Vinay Sajip [Wed, 11 Sep 2019 12:39:52 +0000 (13:39 +0100)]
[3.8] bpo-35168: Make shlex.punctuation_chars read-only (GH-11631) (GH-15927)

(cherry picked from commit 972cf5c06a5ba16ad243a442dbb9c15307fbed95)

Co-authored-by: Alex <a.v.shkop@gmail.com>
5 years agoMinor ReST formatting fixes in subprocess docs (GH-14876)
Miss Islington (bot) [Wed, 11 Sep 2019 12:32:16 +0000 (05:32 -0700)]
Minor ReST formatting fixes in subprocess docs (GH-14876)

(cherry picked from commit 1a13efb7e05b545def26f29c954751fdb6b22fa3)

Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
5 years agobpo-38103: fix conflicting labels in the docs. (GH-15906)
Miss Islington (bot) [Wed, 11 Sep 2019 12:28:06 +0000 (05:28 -0700)]
bpo-38103: fix conflicting labels in the docs. (GH-15906)

(cherry picked from commit 2d8d597bb8f882a7677db5a2739df0e617098634)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
5 years agobpo-35603: Add a note on difflib table header interpreted as HTML (GH-11439)
Miss Islington (bot) [Wed, 11 Sep 2019 12:24:55 +0000 (05:24 -0700)]
bpo-35603: Add a note on difflib table header interpreted as HTML (GH-11439)

(cherry picked from commit c78dae8d2b890d487e428dce00c7f600612cce7b)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years agobpo-20504 : in cgi.py, fix bug when a multipart/form-data request has… (GH-10638)
Miss Islington (bot) [Wed, 11 Sep 2019 12:09:23 +0000 (05:09 -0700)]
bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has… (GH-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
(cherry picked from commit 2d7cacacc310b65b43e7e2de89e7722291dea6a4)

Co-authored-by: Pierre Quentel <pierre.quentel@gmail.com>
5 years agobpo-35066: Make trailing percent test more portable. (GH-15907)
Miss Islington (bot) [Wed, 11 Sep 2019 11:47:16 +0000 (04:47 -0700)]
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.
(cherry picked from commit f2173ae38fa49235c3cdc28ae2ca2e19a375a596)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years ago[3.8] bpo-37409: fix relative import with no parent (GH-14956) (GH-15913)
Brett Cannon [Wed, 11 Sep 2019 11:38:22 +0000 (12:38 +0100)]
[3.8] bpo-37409: fix relative import with no parent (GH-14956) (GH-15913)

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..
(cherry picked from commit 92420b3e679959a7d0ce875875601a4cee45231e)

Co-authored-by: Ben Lewis <benjimin@users.noreply.github.com>
5 years agobpo-32972: Document IsolatedAsyncioTestCase of unittest module (GH-15878) (GH-15918)
Miss Islington (bot) [Wed, 11 Sep 2019 11:17:14 +0000 (04:17 -0700)]
bpo-32972: Document IsolatedAsyncioTestCase of unittest module (GH-15878) (GH-15918)

* 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
(cherry picked from commit 6a9fd66f6e4445a418c43c92585b9e06d76df4b1)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years agobpo-28494: install ziptestdata to fix install bot (GH-15902)
Miss Islington (bot) [Wed, 11 Sep 2019 11:09:53 +0000 (04:09 -0700)]
bpo-28494: install ziptestdata to fix install bot (GH-15902)

(cherry picked from commit c37447481ec8f6d0e49d0587ec0de3f9e7d56b28)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 years agobpo-25810: Clarify eval() docs, it does not keywords (GH-15173)
Miss Islington (bot) [Wed, 11 Sep 2019 10:53:16 +0000 (03:53 -0700)]
bpo-25810: Clarify eval() docs, it does not keywords (GH-15173)

(cherry picked from commit 7a0023e8d17566eb32c836b65c33663303a2224f)

Co-authored-by: smokephil <smokephil@gmail.com>
5 years agobpo-37585: Add clarification regarding comparing dict.values() (GH-14954)
Miss Islington (bot) [Wed, 11 Sep 2019 10:46:53 +0000 (03:46 -0700)]
bpo-37585: Add clarification regarding comparing dict.values() (GH-14954)

(cherry picked from commit 6472ece5a0fe82809d3aa0ffb281796fcd252d76)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
5 years agobpo-38081: Fixes ntpath.realpath('NUL') (GH-15899)
Miss Islington (bot) [Wed, 11 Sep 2019 10:43:30 +0000 (03:43 -0700)]
bpo-38081: Fixes ntpath.realpath('NUL') (GH-15899)

(cherry picked from commit 92521fea5d0d4aeb9b6a3c3fdd4654af700ad5c8)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years ago[3.8] bpo-36373: Fix deprecation warnings (GH-15889) (GH-15901)
Andrew Svetlov [Wed, 11 Sep 2019 10:40:36 +0000 (13:40 +0300)]
[3.8] bpo-36373: Fix deprecation warnings (GH-15889) (GH-15901)

https://bugs.python.org/issue36373
(cherry picked from commit 7264e92b718d307cc499b2f10eab7644b00f0499)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agobpo-16438: Doc: confusing text regarding numeric precedence corrected (GH-10521)
Miss Islington (bot) [Wed, 11 Sep 2019 10:39:36 +0000 (03:39 -0700)]
bpo-16438: Doc: confusing text regarding numeric precedence corrected (GH-10521)

(cherry picked from commit 4576b5431bd597df7581fe3c852b315e47e4b230)

Co-authored-by: Anjali <anjali30malik@gmail.com>
5 years ago[3.8] bpo-37936: Systematically distinguish rooted vs. unrooted in .gitignore (GH...
Zachary Ware [Wed, 11 Sep 2019 10:31:12 +0000 (11:31 +0100)]
[3.8] bpo-37936: Systematically distinguish rooted vs. unrooted in .gitignore (GH-15823) (GH-15900)

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.

(cherry picked from commit 455122a0094c8cfdf7e062eccc5e5b5885c75e8b)

Co-authored-by: Greg Price <gnprice@gmail.com>
5 years agobpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490)
Miss Islington (bot) [Wed, 11 Sep 2019 10:05:14 +0000 (03:05 -0700)]
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.
(cherry picked from commit 580d2782f70f8e0bed7ec20abb03d740cb83b5da)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 years agobpo-38034: Fix typo in logging.handlers.rst (GH-15708) (GH-15893)
Miss Islington (bot) [Wed, 11 Sep 2019 06:56:10 +0000 (23:56 -0700)]
bpo-38034: Fix typo in logging.handlers.rst (GH-15708) (GH-15893)

(cherry picked from commit efd5741ae953e50a6654e04cf731da86a1307296)

Co-authored-by: wwuck <301402+wwuck@users.noreply.github.com>
5 years agobpo-28494: Test existing zipfile working behavior. (GH-15853)
Miss Islington (bot) [Tue, 10 Sep 2019 22:57:54 +0000 (15:57 -0700)]
bpo-28494: Test existing zipfile working behavior. (GH-15853)

Add unittests for executables with a zipfile appended to test_zipfile, as zipfile.is_zipfile and zipfile.ZipFile work properly on these today.
(cherry picked from commit 3f4db4a0bab073b768fae958e93288bd5d24eadd)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 years agoRemove unneeded assignment in PyBytes_Concat() (GH-15274)
Miss Islington (bot) [Tue, 10 Sep 2019 17:46:52 +0000 (10:46 -0700)]
Remove unneeded assignment in PyBytes_Concat() (GH-15274)

The `wb.len = -1` assignment is unneeded since its introduction in 161d695fb0455ce52530d4f43a9eac4c738f64bb as `PyObject_GetBuffer` always fills it in.
(cherry picked from commit afdeb189e97033b54cef44a7490d89d2013cb4e5)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
5 years agobpo-37574: Mention helper functions for find_spec documentation (GH-14739)
Miss Islington (bot) [Tue, 10 Sep 2019 17:13:55 +0000 (10:13 -0700)]
bpo-37574: Mention helper functions for find_spec documentation (GH-14739)

(cherry picked from commit 9cbb97b29eac4b23e916a3233f26b60ac69e335b)

Co-authored-by: jdkandersson <51036209+jdkandersson@users.noreply.github.com>
5 years agoDocs: Small tweaks to c-api/introGH-Include_Files (GH-14698)
Miss Islington (bot) [Tue, 10 Sep 2019 16:38:07 +0000 (09:38 -0700)]
Docs: Small tweaks to c-api/introGH-Include_Files (GH-14698)

(cherry picked from commit b6dafe51399f5c6313a00529118a6052b466942f)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
5 years agoCorrect minor grammatical mistake in open docs (GH-15865)
Miss Islington (bot) [Tue, 10 Sep 2019 16:24:06 +0000 (09:24 -0700)]
Correct minor grammatical mistake in open docs (GH-15865)

(cherry picked from commit 05184515f924c3880067aad87940dd466f751585)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
5 years agobpo-38089: Move Azure Pipelines to latest VM versions and make macOS tests optional...
Miss Islington (bot) [Tue, 10 Sep 2019 16:20:16 +0000 (09:20 -0700)]
bpo-38089: Move Azure Pipelines to latest VM versions and make macOS tests optional (GH-15851)

(cherry picked from commit 801f925998cc393260f36f5ac77369fef2373ad1)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agoCorrect info about "f.read(size)". (GH13852)
Miss Islington (bot) [Tue, 10 Sep 2019 16:00:09 +0000 (09:00 -0700)]
Correct info about "f.read(size)". (GH13852)

In text mode, the "size" parameter indicates the number of characters, not bytes.
(cherry picked from commit faff81c05f838b0b7a64bbc8c53c02a9b04bb79d)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
5 years agobpo-37531: Enhance regrtest multiprocess timeout (GH-15345) (GH-15871)
Victor Stinner [Tue, 10 Sep 2019 15:54:51 +0000 (17:54 +0200)]
bpo-37531: Enhance regrtest multiprocess timeout (GH-15345) (GH-15871)

* Write a message when killing a worker process
* Put a timeout on the second popen.communicate() call
  (after killing the process)
* Put a timeout on popen.wait() call
* Catch popen.kill() and popen.wait() exceptions

(cherry picked from commit de2d9eed8bc628533e1628b843cc4c7a5010f6e5)

5 years agobpo-33602: Doc: Remove set and queue references from Data Types (GH-7055) (GH-15875)
Miss Islington (bot) [Tue, 10 Sep 2019 15:42:56 +0000 (08:42 -0700)]
bpo-33602: Doc: Remove set and queue references from Data Types (GH-7055) (GH-15875)

(cherry picked from commit 912108891db52c2067889be1f4ce5713839807cd)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
5 years agoNote regarding + mode truncation applies to both text and binary mode (GH-11314)...
Miss Islington (bot) [Tue, 10 Sep 2019 15:04:56 +0000 (08:04 -0700)]
Note regarding + mode truncation applies to both text and binary mode (GH-11314) (GH-15869)

* Improve doc on open's mode +

* Improve wording

* Address comment from Rémi
(cherry picked from commit c1d8c1cb8e90a54a3daaa7fcdb8d6ca7f08d6a73)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
5 years ago[3.8] bpo-38086: Sync importlib.metadata with importlib_metadata 0.21. (GH-15840...
Jason R. Coombs [Tue, 10 Sep 2019 14:58:29 +0000 (15:58 +0100)]
[3.8] bpo-38086: Sync importlib.metadata with importlib_metadata 0.21. (GH-15840) (#15861)

https://gitlab.com/python-devs/importlib_metadata/-/tags/0.21.
(cherry picked from commit 17499d82702432955d8e442a1871ff276ca64bc5)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 years agobpo-37504: Fix documentation build with texinfo builder (GH-14606)
Miss Islington (bot) [Tue, 10 Sep 2019 14:51:43 +0000 (07:51 -0700)]
bpo-37504: Fix documentation build with texinfo builder (GH-14606)

In the table model used by docutils, the `cols` attribute of `tgroup`
nodes is mandatory, see [1]. It is used in texinfo builder in [2].

[1]: https://www.oasis-open.org/specs/tm9901.htmGH-AEN348
[2]: https://github.com/sphinx-doc/sphinx/blob/v2.1.2/sphinx/writers/texinfo.pyGH-L1129

* Doc: Add texinfo support to the Makefile
(cherry picked from commit c3d679fd398f42a2e489fbe3dab17fac1fb2439c)

Co-authored-by: Dmitry Shachnev <mitya57@users.noreply.github.com>
5 years agoFix subprocess docstring typo (GH-15812)
Miss Islington (bot) [Tue, 10 Sep 2019 14:51:29 +0000 (07:51 -0700)]
Fix subprocess docstring typo (GH-15812)

(cherry picked from commit 182e1d1f849757439f2031504f142fa4e1251611)

Co-authored-by: Matthias <xmatthias@outlook.com>
5 years agobpo-38088: Fixes distutils not finding vcruntime140.dll with only v142 toolset instal...
Miss Islington (bot) [Tue, 10 Sep 2019 14:42:26 +0000 (07:42 -0700)]
bpo-38088: Fixes distutils not finding vcruntime140.dll with only v142 toolset installed (GH-15849)

(cherry picked from commit cd8221152dd235ec5d06e3d9d0d8787645bbac8e)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agoFix calling order of PyEval_InitThreads. (GH-15836)
Miss Islington (bot) [Tue, 10 Sep 2019 14:37:56 +0000 (07:37 -0700)]
Fix calling order of PyEval_InitThreads. (GH-15836)

As described in Doc/c-api/init.rst, PyEval_InitThreads() cannot be called
before Py_Initialize() function.
(cherry picked from commit 9e61066355b4b55c873d56f5f106a22463b56862)

Co-authored-by: Kenta Murata <mrkn@users.noreply.github.com>
5 years agobpo-37913: document that __length_hint__ can return NotImplemented (GH-15383)
Steve Dower [Tue, 10 Sep 2019 14:31:26 +0000 (15:31 +0100)]
bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383)

5 years agobpo-38090: Fix reference leak in ceval.c (GH-15848)
Miss Islington (bot) [Tue, 10 Sep 2019 14:31:07 +0000 (07:31 -0700)]
bpo-38090: Fix reference leak in ceval.c (GH-15848)

(cherry picked from commit a511c7a4961a684db1f8d0ed438822d87d7d3dcf)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-38087: Fix case sensitivity in test_pathlib and test_ntpath (GH-15850)
Steve Dower [Tue, 10 Sep 2019 14:29:28 +0000 (15:29 +0100)]
bpo-38087: Fix case sensitivity in test_pathlib and test_ntpath (GH-15850)

5 years agobpo-38066: Hide internal Stream methods (GH-15762)
Miss Islington (bot) [Tue, 10 Sep 2019 13:44:32 +0000 (06:44 -0700)]
bpo-38066: Hide internal Stream methods (GH-15762)

feed_eof(), feed_data(), set_exception(), and set_transport() are prefixed with underscore now.

https://bugs.python.org/issue38066
(cherry picked from commit 12c122ae958a55c9874ed4c7d7805ceb084411d7)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agobpo-21018: added missing documentation about escaping characters for configparser...
Miss Islington (bot) [Tue, 10 Sep 2019 13:32:56 +0000 (06:32 -0700)]
bpo-21018: added missing documentation about escaping characters for configparser (GH-6137) (GH-15846)

Document how $ and % can be escaped in configparser.
(cherry picked from commit 9a94093189417adddd6b59d6c80cc5544630c8aa)

Co-authored-by: Arun Persaud <arun@nubati.net>
5 years agocloses bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836)
Miss Islington (bot) [Tue, 10 Sep 2019 13:21:57 +0000 (06:21 -0700)]
closes bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836)

(cherry picked from commit 734f1202a50641eb2c4bfbcd5b75247c1dc99a8f)

Co-authored-by: Bernt Røskar Brenna <bernt.brenna@gmail.com>
5 years agobpo-37251: Removes __code__ check from _is_async_obj. (GH-15830)
Miss Islington (bot) [Tue, 10 Sep 2019 13:16:00 +0000 (06:16 -0700)]
bpo-37251: Removes __code__ check from _is_async_obj. (GH-15830)

(cherry picked from commit f1a297acb60b88917712450ebd3cfa707e6efd6b)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
5 years agodocs: Add references to AsyncMock in unittest.mock.patch (GH-13681)
Miss Islington (bot) [Tue, 10 Sep 2019 13:15:19 +0000 (06:15 -0700)]
docs: Add references to AsyncMock in unittest.mock.patch (GH-13681)

Update the docs as patch can now return an AsyncMock if the patched
object is an async function.
(cherry picked from commit f5e7f39d2916ed150e80381faed125f405a11e11)

Co-authored-by: Mario Corchero <mcorcherojim@bloomberg.net>
5 years agobpo-37619: update_one_slot() should not ignore wrapper descriptors for wrong type...
Miss Islington (bot) [Tue, 10 Sep 2019 12:55:12 +0000 (05:55 -0700)]
bpo-37619: update_one_slot() should not ignore wrapper descriptors for wrong type (GH-15838)

(cherry picked from commit 57ea33560662e0f20a3b0334bb20065771edf4da)

Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
5 years agobpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [queue] ...
Miss Islington (bot) [Tue, 10 Sep 2019 12:50:14 +0000 (05:50 -0700)]
bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [queue] (GH-13950)

This PR deprecate explicit loop parameters in all public asyncio APIs

This issues is split to be easier to review.

fourth step: queue.py

https://bugs.python.org/issue36373
(cherry picked from commit 9008be303a89bfab8c3314c6a42330b5523adc8b)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
5 years agobpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [locks] ...
Miss Islington (bot) [Tue, 10 Sep 2019 11:26:54 +0000 (04:26 -0700)]
bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [locks] (GH-13920)

This PR deprecate explicit loop parameters in all public asyncio APIs

This issues is split to be easier to review.

Third step: locks.py

https://bugs.python.org/issue36373
(cherry picked from commit 537877d85d1c27d2c2f5189e39da64a7a0c413d3)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
5 years agobpo-37052: Add examples for mocking async iterators and context managers (GH-14660)
Miss Islington (bot) [Tue, 10 Sep 2019 11:08:52 +0000 (04:08 -0700)]
bpo-37052: Add examples for mocking async iterators and context managers (GH-14660)

Add examples for mocking asynchronous iterators and asynchronous context managers.

https://bugs.python.org/issue37052
(cherry picked from commit c8dfa7333d6317d7cd8c5c7366023f5a668e3f91)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years agoRemove macOS tests from Travis. (GH-15809)
Miss Islington (bot) [Tue, 10 Sep 2019 10:54:48 +0000 (03:54 -0700)]
Remove macOS tests from Travis. (GH-15809)

Azure runs macOS, so we don't need Travis to do it.
(cherry picked from commit e45b217ae0e83cfb367e9769cae59b9a5505f9b4)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years agoFix typo in dict object comment (GH-15814)
Miss Islington (bot) [Tue, 10 Sep 2019 10:13:36 +0000 (03:13 -0700)]
Fix typo in dict object comment (GH-15814)

(cherry picked from commit 359143c68659d165f52320d368667e0eff279dc5)

Co-authored-by: dalgarno <32097481+dalgarno@users.noreply.github.com>
5 years agoRevert "bpo-33418: Add tp_clear for function object (GH-8058)" (GH-15826)
Victor Stinner [Tue, 10 Sep 2019 09:57:31 +0000 (11:57 +0200)]
Revert "bpo-33418: Add tp_clear for function object (GH-8058)" (GH-15826)

This reverts commit 3c452404ae178b742967589a0bb4a5ec768d76e0.

5 years agobpo-35941: Fix performance regression in SSL certificate code (GH-12610)
Steve Dower [Tue, 10 Sep 2019 09:02:04 +0000 (02:02 -0700)]
bpo-35941: Fix performance regression in SSL certificate code (GH-12610)

Accumulate certificates in a set instead of doing a costly list contain
operation. A Windows cert store can easily contain over hundred
certificates. The old code would result in way over 5,000 comparison
operations

Signed-off-by: Christian Heimes <christian@python.org>
5 years agobpo-37662: Documented venv.EnvBuilder.upgrade_dependencies(). (GH-15768)
Miss Islington (bot) [Tue, 10 Sep 2019 07:31:56 +0000 (00:31 -0700)]
bpo-37662: Documented venv.EnvBuilder.upgrade_dependencies(). (GH-15768)

(cherry picked from commit 264e034f990240e2aa379d8484b15b9e70c1fad5)

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
5 years agobpo-37383: Updates docs to reflect AsyncMock call_count after await. (GH-15761)
Miss Islington (bot) [Tue, 10 Sep 2019 07:31:34 +0000 (00:31 -0700)]
bpo-37383: Updates docs to reflect AsyncMock call_count after await. (GH-15761)

* bpo-351428: Updates documentation to reflect AsyncMock call_count after await.

* Adds skip and fixes warning.

* Removes extra >>>.

* Adds ... in front of await mock().
(cherry picked from commit b9f65f01fd761da7799f36d29b54518399d3458e)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
5 years agobpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818)
Miss Islington (bot) [Tue, 10 Sep 2019 03:29:01 +0000 (20:29 -0700)]
bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818)

This only happened when initializing the subprocess to run a module.
This recent bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4.
(cherry picked from commit c59295a1ca304f37ca136dd7efca9e560db27d28)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years ago[3.8] bpo-34293: Fix PDF documentation paper size (GH-8585) (GH-15816)
Zachary Ware [Mon, 9 Sep 2019 22:11:23 +0000 (23:11 +0100)]
[3.8] bpo-34293: Fix PDF documentation paper size (GH-8585) (GH-15816)

The "A4" pdfs were previously the wrong size due to a change in the options in Sphinx 1.5.

See also sphinx-doc/sphinxGH-5235
(cherry picked from commit b5381f669718aa19690f42f3b8bd88f03045b9d2)

Authored-by: Jean-François B <jfbu@free.fr>
5 years agobpo-36502: Update link to UAX GH-44, the Unicode doc on the UCD. (GH-15301)
Miss Islington (bot) [Mon, 9 Sep 2019 18:41:13 +0000 (11:41 -0700)]
bpo-36502: Update link to UAX GH-44, the Unicode doc on the UCD. (GH-15301)

The link we have points to the version from Unicode 6.0.0, dated 2010.
There have been numerous updates to it since then:
  https://www.unicode.org/reports/tr44/GH-Modifications

Change the link to one that points to the current version. Also, use HTTPS.
(cherry picked from commit 64c6ac74e254d31f93fcc74bf02b3daa7d3e3f25)

Co-authored-by: Greg Price <gnprice@gmail.com>
5 years agobpo-37649: Fix exec_prefix check (GH-14897)
Miss Islington (bot) [Mon, 9 Sep 2019 17:59:18 +0000 (10:59 -0700)]
bpo-37649: Fix exec_prefix check (GH-14897)

(cherry picked from commit 09090d04ef8d2f4c94157b852d3d530a51e13d22)

Co-authored-by: Orivej Desh <orivej@gmx.fr>
5 years agoFix punctuation in `os.execvpe` docstring. (GH-15051)
Miss Islington (bot) [Mon, 9 Sep 2019 17:44:46 +0000 (10:44 -0700)]
Fix punctuation in `os.execvpe` docstring. (GH-15051)

(cherry picked from commit fb6807b043ab586428225920373e551b0432bc40)

Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
5 years agobpo-35803: Document and test dir=PathLike for tempfile (GH-11644)
Miss Islington (bot) [Mon, 9 Sep 2019 17:31:31 +0000 (10:31 -0700)]
bpo-35803: Document and test dir=PathLike for tempfile (GH-11644)

Co-Authored-By: Ammar Askar <ammar_askar@hotmail.com>
(cherry picked from commit 370138ba9c29595df773cc057d17ea26fb6f21bd)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
5 years agoClarify that shutil's copy functions can accept path-like values (GH-15141)
Miss Islington (bot) [Mon, 9 Sep 2019 17:18:51 +0000 (10:18 -0700)]
Clarify that shutil's copy functions can accept path-like values (GH-15141)

(cherry picked from commit 9488a5289de2ceecdfd2098cd70d215f96c4e745)

Co-authored-by: Boris Verhovsky <boris.verk@gmail.com>
5 years agobpo-38070: visit_decref() calls _PyObject_IsFreed() (GH-15782)
Miss Islington (bot) [Mon, 9 Sep 2019 17:18:09 +0000 (10:18 -0700)]
bpo-38070: visit_decref() calls _PyObject_IsFreed() (GH-15782)

In debug mode, visit_decref() now calls _PyObject_IsFreed() to ensure
that the object is not freed. If it's freed, the program fails with
an assertion error and Python dumps informations about the freed
object.
(cherry picked from commit d91d4de31745fc1ed4c7e6c208917827c9c472b6)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-20490: Improve circular import error message (GH-15308)
Steve Dower [Mon, 9 Sep 2019 16:45:18 +0000 (09:45 -0700)]
bpo-20490: Improve circular import error message (GH-15308)

5 years agobpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641)
Miss Islington (bot) [Mon, 9 Sep 2019 16:24:16 +0000 (09:24 -0700)]
bpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641)

weakref.WeakValueDictionary defines a local remove() function used as
callback for weak references. This function was created with a
closure.  Modify the implementation to avoid the closure.
(cherry picked from commit a2af05a0d3f0da06b8d432f52efa3ecf29038532)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-37876: Tests for ROT-13 codec (GH-15314)
Miss Islington (bot) [Mon, 9 Sep 2019 16:12:01 +0000 (09:12 -0700)]
bpo-37876: Tests for ROT-13 codec (GH-15314)

The Rot-13 codec is for educational use but does not have unit tests,
dragging down test coverage. This adds a few very simple tests.
(cherry picked from commit b3b48c81f09d1472010937f1331c5a208a2a2d48)

Co-authored-by: Zeth <theology@gmail.com>
5 years agobpo-38059: Using sys.exit() over exit() in inspect.py (GH-15666)
Miss Islington (bot) [Mon, 9 Sep 2019 15:20:36 +0000 (08:20 -0700)]
bpo-38059: Using sys.exit() over exit() in inspect.py (GH-15666)

Constants added by the site module like exit() "should not be used in programs"
(cherry picked from commit e3c59a75279b0df4e7553d6f0031e202de434e43)

Co-authored-by: Alan Yee <alanyee@users.noreply.github.com>
5 years agobpo-34596: Fallback to a default reason when @unittest.skip is uncalled (GH-9082...
Miss Islington (bot) [Mon, 9 Sep 2019 15:01:15 +0000 (08:01 -0700)]
bpo-34596: Fallback to a default reason when @unittest.skip is uncalled (GH-9082) (#15781)

* bpo-34596: Fallback to a default reason when @unittest.skip is uncalled

* Change default reason to empty string

* Fix rst formatting of NEWS entry
(cherry picked from commit d5fd75c53fad7049fc640c9a6162d35f0c5bea03)

Co-authored-by: Naitree Zhu <Naitreey@gmail.com>
5 years agobpo-36797: Fix a dead link in Doc/distutils/apiref (GH-15700) (GH-15704)
Miss Islington (bot) [Mon, 9 Sep 2019 14:52:34 +0000 (07:52 -0700)]
bpo-36797: Fix a dead link in  Doc/distutils/apiref (GH-15700) (GH-15704)

https://bugs.python.org/issue36797
(cherry picked from commit 2c2b561967c1916855399f809e30ae0ba7e09ae2)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
5 years agobpo-38037: Fix reference counters in signal module (GH-15753)
Miss Islington (bot) [Mon, 9 Sep 2019 14:42:35 +0000 (07:42 -0700)]
bpo-38037: Fix reference counters in signal module (GH-15753)

(cherry picked from commit 77643c486fd22d8030e0d82c13012684b4ab6df1)

Co-authored-by: animalize <animalize@users.noreply.github.com>
5 years agobpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766)
Miss Islington (bot) [Mon, 9 Sep 2019 14:23:37 +0000 (07:23 -0700)]
bpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766)

(cherry picked from commit ef66f31ce21cd759cc0c618c5c42ba6da0a06834)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-37702: Fix SSL's certificate-store leak on Windows (GH-15632)
Steve Dower [Mon, 9 Sep 2019 13:48:22 +0000 (06:48 -0700)]
bpo-37702: Fix SSL's certificate-store leak on Windows (GH-15632)

ssl_collect_certificates function in _ssl.c has a memory leak.
Calling CertOpenStore() and CertAddStoreToCollection(), a store's refcnt gets incremented by 2.
But CertCloseStore() is called only once and the refcnt leaves 1.

5 years agoFix typo in math.prod example (GH-15614)
Miss Islington (bot) [Mon, 9 Sep 2019 13:42:50 +0000 (06:42 -0700)]
Fix typo in math.prod example (GH-15614)

(cherry picked from commit 1a8de82d3a30ecc7ed18a5ad51a0e17417ebfb89)

Co-authored-by: Ashwin Vishnu <9155111+ashwinvis@users.noreply.github.com>
5 years agobpo-37589: Add a few missing dependencies on .h files in the Makefile. (GH-15757)
Miss Islington (bot) [Mon, 9 Sep 2019 13:28:07 +0000 (06:28 -0700)]
bpo-37589: Add a few missing dependencies on .h files in the Makefile. (GH-15757)

The missing dependencies prevented incremental builds from working when you touched any
of these files. Based on GH-14758 by @vemakereporter.
(cherry picked from commit b4612f5d54aced5bc37f1b85bf50b4cafa2480f0)

Co-authored-by: T. Wouters <thomas@python.org>
5 years agobpo-37283: Ensure command-line and unattend.xml setting override previously detected...
Miss Islington (bot) [Mon, 9 Sep 2019 13:02:42 +0000 (06:02 -0700)]
bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759)

(cherry picked from commit 3a0ddbcdfcbc0f4372905fabf81e093f1b043e99)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-34652 again: Remove lchmod from the default AC_CHECK_FUNCS list. (GH-15758)
Miss Islington (bot) [Mon, 9 Sep 2019 13:01:41 +0000 (06:01 -0700)]
bpo-34652 again: Remove lchmod from the default AC_CHECK_FUNCS list. (GH-15758)

(cherry picked from commit bed04b664729e3e6fcee42daa108936360bac6ea)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years agobpo-37212: Preserve keyword argument order in unittest.mock.call and error messages...
Miss Islington (bot) [Mon, 9 Sep 2019 11:42:43 +0000 (04:42 -0700)]
bpo-37212: Preserve keyword argument order in unittest.mock.call and error messages (GH-14310)

(cherry picked from commit 9d607061c9c888913ae2c18543775cf360d55f27)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years ago[3.8] Doc: Fix PDF build (NoUri). (GH-15739) (GH-15754)
Miss Islington (bot) [Mon, 9 Sep 2019 11:29:10 +0000 (04:29 -0700)]
[3.8] Doc: Fix PDF build (NoUri). (GH-15739) (GH-15754)

(cherry picked from commit 63c98ed2d21d22b46f3517fd7dfd88f0c1521299)

Co-authored-by: Julien Palard <julien@palard.fr>
Automerge-Triggered-By: @JulienPalard
5 years agobpo-36250: ignore ValueError from signal in non-main thread (GH-12251)
Miss Islington (bot) [Mon, 9 Sep 2019 11:25:21 +0000 (04:25 -0700)]
bpo-36250: ignore ValueError from signal in non-main thread (GH-12251)

Authored-By: blueyed <github@thequod.de>
(cherry picked from commit 8d64bfafdffd9f866bb6ac2e5b4c4bdfcb16aea0)

Co-authored-by: Daniel Hahler <github@thequod.de>
5 years agobpo-37705: Improve the implementation of winerror_to_errno() (GH-15623)
Miss Islington (bot) [Mon, 9 Sep 2019 10:37:55 +0000 (03:37 -0700)]
bpo-37705: Improve the implementation of winerror_to_errno() (GH-15623)

winerror_to_errno() is no longer automatically generated.
Do not rely on the old _dosmapperr() function.
Add ERROR_NO_UNICODE_TRANSLATION (1113) -> EILSEQ.
(cherry picked from commit 19052a11314e7be7ba003fd6cdbb5400a5d77d96)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-11953: Extend table of Windows WSA* error codes (GH-15004)
Steve Dower [Mon, 9 Sep 2019 10:36:04 +0000 (03:36 -0700)]
bpo-11953: Extend table of Windows WSA* error codes (GH-15004)

5 years agobpo-37936: Avoid ignoring files that we actually do track. (GH-15451)
Miss Islington (bot) [Mon, 9 Sep 2019 10:25:04 +0000 (03:25 -0700)]
bpo-37936: Avoid ignoring files that we actually do track. (GH-15451)

There were about 14 files that are actually in the repo but that are
covered by the rules in .gitignore.

Git itself takes no notice of what .gitignore says about files that
it's already tracking... but the discrepancy can be confusing to a
human that adds a new file unexpectedly covered by these rules, as
well as to non-Git software that looks at .gitignore but doesn't
implement this wrinkle in its semantics.  (E.g., `rg`.)

Several of these are from rules that apply more broadly than
intended: for example, `Makefile` applies to `Doc/Makefile` and
`Tools/freeze/test/Makefile`, whereas `/Makefile` means only the
`Makefile` at the repo's root.

And the `Modules/Setup` rule simply wasn't updated after 961d54c5c.

https://bugs.python.org/issue37936
(cherry picked from commit 5e5e9515029f70836003a8cfb30433166fcc8db7)

Co-authored-by: Greg Price <gnprice@gmail.com>
5 years agobpo-32587: Make winreg.REG_MULTI_SZ support zero-length strings (GH-13239)
Miss Islington (bot) [Mon, 9 Sep 2019 10:11:00 +0000 (03:11 -0700)]
bpo-32587: Make winreg.REG_MULTI_SZ support zero-length strings (GH-13239)

* bpo-32587: Make winreg.REG_MULTI_SZ support PendingFileRenameOperations

* Address review comments.
(cherry picked from commit e223ba13d8d871ee58570dfca4e82a591189cc2f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years ago[3.8] bpo-15817: gdbinit: Document commands after defining them (GH-15021) (#15744)
Zachary Ware [Mon, 9 Sep 2019 09:56:38 +0000 (04:56 -0500)]
[3.8] bpo-15817: gdbinit: Document commands after defining them (GH-15021) (#15744)

The gdb manual[1] says the following for "document":

  The command commandname must already be defined.

[1] https://sourceware.org/gdb/current/onlinedocs/gdb/Define.html

And indeed when trying to use the gdbinit file with gdb 8.3, I get:

  .../cpython/Misc/gdbinit:17: Error in sourced command file:
  Undefined command: "pyo".  Try "help".

Fix this by moving all documentation blocks after the define blocks.

This was introduced in GH-6384.
(cherry picked from commit 1f86fdcfc57270ee569cc58269a4e08afe7608ec)

Authored-by: Florian Bruhin <me@the-compiler.org>
5 years agobpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-14462)
Miss Islington (bot) [Mon, 9 Sep 2019 09:50:30 +0000 (02:50 -0700)]
bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-14462)

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
(cherry picked from commit a6563650c835d50f7302971a5b145e94f9d0dc68)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625)
Miss Islington (bot) [Mon, 9 Sep 2019 09:07:51 +0000 (02:07 -0700)]
bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625)

RuntimeError is now raised in this case.
(cherry picked from commit 526a01467b3277f9fcf7f91e66c23321caa1245d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years ago[3.8] bpo-36018: Address more reviewer feedback (GH-15733) (GH-15734)
Raymond Hettinger [Mon, 9 Sep 2019 01:40:06 +0000 (18:40 -0700)]
[3.8] bpo-36018: Address more reviewer feedback (GH-15733) (GH-15734)

5 years ago[3.8] Correct Roman-numeral example in Unicode HOWTO. (GH-15541). (GH-15728)
Serhiy Storchaka [Sun, 8 Sep 2019 10:17:24 +0000 (13:17 +0300)]
[3.8] Correct Roman-numeral example in Unicode HOWTO. (GH-15541). (GH-15728)

(cherry picked from commit 32a960f8e1015b64b4b955b3d62920c5903d4c6f)

Co-authored-by: Greg Price <gnprice@gmail.com>
5 years agobpo-20806: Reference both times(2) and times(3) and link to MSDN. (GH-15479)
Miss Islington (bot) [Sat, 7 Sep 2019 07:12:34 +0000 (00:12 -0700)]
bpo-20806: Reference both times(2) and times(3) and link to MSDN. (GH-15479)

(cherry picked from commit 3ccdbc33385a849c60a268def578cb06b8d41be6)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
5 years agobpo-38041: Refine IDLE Shell restart lines. (GH-15709)
Miss Islington (bot) [Fri, 6 Sep 2019 18:14:49 +0000 (11:14 -0700)]
bpo-38041: Refine IDLE Shell restart lines.  (GH-15709)

 Restart lines now always start with '=' and never end with ' ' and fill the width of the window unless that would require ending with ' ', which could be wrapped by itself and possible confusing the user.
(cherry picked from commit 38da805d563422cf1bb9cd9be24c73806840fe30)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-37380: subprocess: don't use _active on win (GH-14360) (GH-15707)
Miss Islington (bot) [Fri, 6 Sep 2019 09:14:31 +0000 (02:14 -0700)]
bpo-37380: subprocess: don't use _active on win (GH-14360) (GH-15707)

As noted by @eryksun in [1] and [2], using _cleanup and _active(in
__del__) is not necessary on Windows, since:

> Unlike Unix, a process in Windows doesn't have to be waited on by
> its parent to avoid a zombie. Keeping the handle open will actually
> create a zombie until the next _cleanup() call, which may be never
> if Popen() isn't called again.

This patch simply defines `subprocess._active` as `None`, for which we already
have the proper logic in place in `subprocess.Popen.__del__`, that prevents it
from trying to append the process to the `_active`. This patch also defines
`subprocess._cleanup` as a noop for Windows.

[1] https://bugs.python.org/issue37380GH-msg346333
[2] https://bugs.python.org/issue36067GH-msg336262

Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
(cherry picked from commit 042821ae3cf537e01963c9ec85d1a454d921e826)

Co-authored-by: Ruslan Kuprieiev <kupruser@gmail.com>
5 years agoMore refinements to the statistics docs (GH-15713) (GH-15715)
Miss Islington (bot) [Fri, 6 Sep 2019 06:19:13 +0000 (23:19 -0700)]
More refinements to the statistics docs (GH-15713) (GH-15715)

(cherry picked from commit d8c93aa5d29d3cab537357018d5806a57452a8fe)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agoCorrect minor gramatical mistake in sys.settrace doc (GH-15637)
Miss Islington (bot) [Thu, 5 Sep 2019 11:17:41 +0000 (04:17 -0700)]
Correct minor gramatical mistake in sys.settrace doc (GH-15637)

(cherry picked from commit 3038e87ba848023470f571242a8bb5a206c24430)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
5 years agobpo-36324: Apply review comment from Jake Vanderplas (GH-15695) (GH-15696)
Miss Islington (bot) [Thu, 5 Sep 2019 08:10:40 +0000 (01:10 -0700)]
bpo-36324:  Apply review comment from Jake Vanderplas (GH-15695) (GH-15696)

(cherry picked from commit 9b51570ffd0494c07dafe10c7d2afe865754694c)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-36324: Apply review comments from Allen Downey (GH-15693) (GH-15694)
Miss Islington (bot) [Thu, 5 Sep 2019 07:42:22 +0000 (00:42 -0700)]
bpo-36324:  Apply review comments from Allen Downey (GH-15693) (GH-15694)

(cherry picked from commit e4810b2a6c1d0db1a27ad046831b8fa3b57967a4)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-38026: fix inspect.getattr_static (GH-15676)
Miss Islington (bot) [Thu, 5 Sep 2019 04:25:59 +0000 (21:25 -0700)]
bpo-38026: fix inspect.getattr_static (GH-15676)

It should avoid dynamic lookup including `isinstance`.

This is a regression caused by GH-5351.
(cherry picked from commit 8f9cc8771ffb8d0e21be287eaed42ae06087acca)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>