]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agobpo-39576: docs: set context for decimal arbitrary precision arithmetic (GH-18594...
Miss Islington (bot) [Fri, 21 Feb 2020 20:36:42 +0000 (12:36 -0800)] 
bpo-39576: docs: set context for decimal arbitrary precision arithmetic (GH-18594) (#18597)

(cherry picked from commit a025d4ca99fb4c652465368e0b4eb03cf4b316b9)

Authored-by: Stefan Krah <skrah@bytereef.org>
5 years agofix(doc): set correct RST syntax for c:function (GH-18589)
Miss Islington (bot) [Fri, 21 Feb 2020 10:54:00 +0000 (02:54 -0800)] 
fix(doc): set correct RST syntax for c:function (GH-18589)

The current content is not rendered since the syntax is not correct.
(cherry picked from commit d4d17fd2cf69e7c8f4cd03fbf2d575370945b952)

Co-authored-by: Julien Danjou <julien@danjou.info>
5 years agobpo-38657: Clarify numeric padding behaviour in string formatting (GH-17036)
Miss Islington (bot) [Fri, 21 Feb 2020 06:06:18 +0000 (22:06 -0800)] 
bpo-38657: Clarify numeric padding behaviour in string formatting (GH-17036)

Make the definition of the width more explicit that it includes any
extra signs added by other options.

https://bugs.python.org/issue38657

Automerge-Triggered-By: @Mariatta
(cherry picked from commit 424e5686d82235e08f8108b8bbe034bc91421689)

Co-authored-by: Pete Wicken <2273100+JamoBox@users.noreply.github.com>
5 years agobpo-39576: Prevent memory error for overly optimistic precisions (GH-18581) (#18584)
Miss Islington (bot) [Fri, 21 Feb 2020 01:16:42 +0000 (17:16 -0800)] 
bpo-39576: Prevent memory error for overly optimistic precisions (GH-18581) (#18584)

(cherry picked from commit 90930e65455f60216f09d175586139242dbba260)

Authored-by: Stefan Krah <skrah@bytereef.org>
5 years agobpo-39184: Fix incorrect return value (GH-18580)
Miss Islington (bot) [Thu, 20 Feb 2020 22:44:47 +0000 (14:44 -0800)] 
bpo-39184: Fix incorrect return value (GH-18580)

https://bugs.python.org/issue39184

Automerge-Triggered-By: @zooba
(cherry picked from commit 6c444d0dab8f06cf304263b34beb299101cef3de)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agoValgrind no longer supports --db-attach=yes. (GH-18568) (#18576)
Miss Islington (bot) [Thu, 20 Feb 2020 18:38:19 +0000 (10:38 -0800)] 
Valgrind no longer supports --db-attach=yes. (GH-18568) (#18576)

(cherry picked from commit c0cb8beb389da3ba67ad31b1ecc95e100b6292ab)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
5 years agoUse the new recommended number of repetitions in the refleak tests. (GH-18569) (...
Miss Islington (bot) [Thu, 20 Feb 2020 18:31:39 +0000 (10:31 -0800)] 
Use the new recommended number of repetitions in the refleak tests. (GH-18569) (#18574)

(cherry picked from commit 1246d892038a693304549f8574e6c2784b91589a)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
5 years agoUpdate runall.bat to the latest Windows build system. (GH-18571) (#18573)
Miss Islington (bot) [Thu, 20 Feb 2020 18:31:11 +0000 (10:31 -0800)] 
Update runall.bat to the latest Windows build system. (GH-18571) (#18573)

(cherry picked from commit 9b833e00e447a3b8b6966686bff701f549c66263)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
5 years agobpo-39572: Document ’total’ flag of TypedDict (GH-18554)
Miss Islington (bot) [Wed, 19 Feb 2020 05:24:51 +0000 (21:24 -0800)] 
bpo-39572: Document ’total’ flag of TypedDict (GH-18554)

(cherry picked from commit ab6423fe2de0ed5f8a0dc86a9c7070229326b0f0)

Co-authored-by: ananthan-123 <ananthakrishnan15.2001@gmail.com>
5 years agobpo-39555: Fix distutils test to handle _d suffix on Windows debug build (GH-18357...
Miss Islington (bot) [Tue, 18 Feb 2020 21:39:19 +0000 (13:39 -0800)] 
bpo-39555: Fix distutils test to handle _d suffix on Windows debug build (GH-18357) (GH-18548)

https://bugs.python.org/issue39555

Co-authored-by: Steve Dower <steve.dower@python.org>
(cherry picked from commit ab0d892288f3058856a8213333e8c3e4ed8a562b)

5 years agobpo-39432: Implement PEP-489 algorithm for non-ascii "PyInit_*" symbol names in distu...
Miss Islington (bot) [Tue, 18 Feb 2020 13:14:43 +0000 (05:14 -0800)] 
bpo-39432: Implement PEP-489 algorithm for non-ascii "PyInit_*" symbol names in distutils (GH-18150) (GH-18546)

Make it export the correct init symbol also on Windows.

https://bugs.python.org/issue39432
(cherry picked from commit 9538bc9185e934bee2bd5ae2cda2b2e92a61906d)

Co-authored-by: Stefan Behnel <stefan_ml@behnel.de>
5 years agoPost 3.8.2rc2
Łukasz Langa [Tue, 18 Feb 2020 12:01:01 +0000 (13:01 +0100)] 
Post 3.8.2rc2

5 years agoMerge tag 'v3.8.2rc2' into 3.8
Łukasz Langa [Tue, 18 Feb 2020 12:00:35 +0000 (13:00 +0100)] 
Merge tag 'v3.8.2rc2' into 3.8

Python 3.8.2rc2

5 years ago[3.8] bpo-39546: argparse: Honor allow_abbrev=False for specified prefix_chars (GH...
Miss Islington (bot) [Tue, 18 Feb 2020 11:14:07 +0000 (03:14 -0800)] 
[3.8] bpo-39546: argparse: Honor allow_abbrev=False for specified prefix_chars (GH-18337) (GH-18543)

When `allow_abbrev` was first added, disabling the abbreviation of
long options broke the grouping of short flags ([bpo-26967](https://bugs.python.org/issue26967)).  As a fix,
b1e4d1b603 (contained in v3.8) ignores `allow_abbrev=False` for a
given argument string if the string does _not_ start with "--"
(i.e. it doesn't look like a long option).

This fix, however, doesn't take into account that long options can
start with alternative characters specified via `prefix_chars`,
introducing a regression: `allow_abbrev=False` has no effect on long
options that start with an alternative prefix character.

The most minimal fix would be to replace the "starts with --" check
with a "starts with two prefix_chars characters".  But
`_get_option_tuples` already distinguishes between long and short
options, so let's instead piggyback off of that check by moving the
`allow_abbrev` condition into `_get_option_tuples`.

https://bugs.python.org/issue39546
(cherry picked from commit 8edfc47baec7ff4cb1b9db83dd35c8ffc1d498a4)

Co-authored-by: Kyle Meyer <kyle@kyleam.com>
https://bugs.python.org/issue39546

Automerge-Triggered-By: @encukou
5 years agobpo-39663: IDLE: Add additional tests for pyparse (GH-18536)
Miss Islington (bot) [Tue, 18 Feb 2020 03:05:39 +0000 (19:05 -0800)] 
bpo-39663: IDLE: Add additional tests for pyparse (GH-18536)

Test when find_good_parse_start should return 0.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit ffda25f6b825f3dee493b6f0746266a4dd6989f0)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
5 years agoPython 3.8.2rc2 v3.8.2rc2
Łukasz Langa [Mon, 17 Feb 2020 22:45:14 +0000 (23:45 +0100)] 
Python 3.8.2rc2

5 years ago[3.8] bpo-39453: Fix contains method of list to hold strong references (GH-18204)
Dong-hee Na [Mon, 17 Feb 2020 09:13:52 +0000 (18:13 +0900)] 
[3.8] bpo-39453: Fix contains method of list to hold strong references (GH-18204)

5 years agobpo-32892: Update the documentation for handling constants in AST. (GH-18514)
Miss Islington (bot) [Mon, 17 Feb 2020 09:09:49 +0000 (01:09 -0800)] 
bpo-32892: Update the documentation for handling constants in AST. (GH-18514)

(cherry picked from commit 85a2eef473a2c9ed3ab9c6ee339891fe99adbbc9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agoRevert "[3.8] bpo-27657: Fix urlparse() with numeric paths (GH-16839)" (GH-18525)
Senthil Kumaran [Sun, 16 Feb 2020 21:47:21 +0000 (13:47 -0800)] 
Revert "[3.8] bpo-27657: Fix urlparse() with numeric paths (GH-16839)" (GH-18525)

This reverts commit 0f3187c1ce3b3ace60f6c1691dfa3d4e744f0384.

The change broke the backwards compatibility of parsing behavior in a
patch release of Python (3.8.1). A decision was taken to revert this
patch in 3.8.2.

In https://bugs.python.org/issue27657 it was decided that the previous
behavior like

>>> urlparse('localhost:8080')
ParseResult(scheme='', netloc='', path='localhost:8080', params='', query='', fragment='')

>>> urlparse('undefined:8080')
ParseResult(scheme='', netloc='', path='undefined:8080', params='', query='', fragment='')

needs to be preserved in patch releases as number of users rely upon it.

Explicitly mention the releases involved with the revert in NEWS.
Adopt the wording suggested by @ned-deily.

5 years ago[3.8] closes bpo-39630: Update pointers to string literals to be const char *. (GH...
Benjamin Peterson [Fri, 14 Feb 2020 05:05:00 +0000 (21:05 -0800)] 
[3.8] closes bpo-39630: Update pointers to string literals to be const char *. (GH-18511)

(cherry picked from commit 7386a70746cf9aaf2d95db75d9201fb124f085df)

Co-authored-by: Andy Lester <andy@petdance.com>
5 years agocloses bpo-39619 Fix os.chroot on HP-UX 11.31 (GH-18495)
Miss Islington (bot) [Fri, 14 Feb 2020 03:27:28 +0000 (19:27 -0800)] 
closes bpo-39619 Fix os.chroot on HP-UX 11.31 (GH-18495)

Setting `-D_XOPEN_SOURCE=700` on HP-UX causes system functions such as chroot to be undefined.  This change stops `_XOPEN_SOURCE` begin set on HP-UX

Co-authored-by: Benjamin Peterson <benjamin@python.org>
(cherry picked from commit a9edf44a2de9b23a1690b36cdfeed7b41ab763bd)

Co-authored-by: Ian Norton <inorton@gmail.com>
5 years agobpo-39545: Document changes in the support of await in f-strings. (GH-18456)
Miss Islington (bot) [Fri, 14 Feb 2020 00:03:59 +0000 (16:03 -0800)] 
bpo-39545: Document changes in the support of await in f-strings. (GH-18456)

https://bugs.python.org/issue39545
(cherry picked from commit f632736023502816f2e6bd714d1b48c81aa2ccc1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years ago[3.8] bpo-39606: allow closing async generators that are already closed (GH-18475...
Miss Islington (bot) [Thu, 13 Feb 2020 08:43:23 +0000 (00:43 -0800)] 
[3.8] bpo-39606: allow closing async generators that are already closed (GH-18475) (GH-18501)

The fix for [bpo-39386](https://bugs.python.org/issue39386) attempted to make it so you couldn't reuse a
agen.aclose() coroutine object. It accidentally also prevented you
from calling aclose() at all on an async generator that was already
closed or exhausted. This commit fixes it so we're only blocking the
actually illegal cases, while allowing the legal cases.

The new tests failed before this patch. Also confirmed that this fixes
the test failures we were seeing in Trio with Python dev builds:
  https://github.com/python-trio/trio/pull/1396

https://bugs.python.org/issue39606
(cherry picked from commit 925dc7fb1d0db85dc137afa4cd14211bf0d67414)

Co-authored-by: Nathaniel J. Smith <njs@pobox.com>
https://bugs.python.org/issue39606

Automerge-Triggered-By: @njsmith
5 years agobpo-39184: Add audit events to functions in `fcntl`, `msvcrt`, `os`, `resource`,...
Steve Dower [Thu, 13 Feb 2020 08:30:27 +0000 (08:30 +0000)] 
bpo-39184: Add audit events to functions in `fcntl`, `msvcrt`, `os`, `resource`,  `shutil`, `signal`, `syslog` (GH-18407)

Co-authored-by: Saiyang Gou <gousaiyang@163.com>
5 years agocloses bpo-39621: Make buf arg to md5_compress be const. (GH-18497)
Miss Islington (bot) [Thu, 13 Feb 2020 05:12:53 +0000 (21:12 -0800)] 
closes bpo-39621: Make buf arg to md5_compress be const. (GH-18497)

(cherry picked from commit 597ebed748d0b0c061f8c108bd98270d103286c1)

Co-authored-by: Andy Lester <andy@petdance.com>
5 years agobpo-39474: Fix AST pos for expressions like (a)(b), (a)[b] and (a).b. (GH-18477)
Miss Islington (bot) [Wed, 12 Feb 2020 20:56:44 +0000 (12:56 -0800)] 
bpo-39474: Fix AST pos for expressions like (a)(b), (a)[b] and (a).b. (GH-18477)

(cherry picked from commit 6e619c48b8e804ece9521453fc8da0640a04d5b1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agobpo-21016: pydoc and trace use sysconfig (GH-18476)
Miss Islington (bot) [Wed, 12 Feb 2020 12:32:52 +0000 (04:32 -0800)] 
bpo-21016: pydoc and trace use sysconfig (GH-18476)

bpo-21016, bpo-1294959: The pydoc and trace modules now use the
sysconfig module to get the path to the Python standard library, to
support uncommon installation path like /usr/lib64/python3.9/ on
Fedora.

Co-Authored-By: Jan Matějek <jmatejek@suse.com>
(cherry picked from commit 4fac7ed43ebf1771a8fe86fdfe7b9991f3be78cd)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-39219: Fix SyntaxError attributes in the tokenizer. (GH-17828)
Miss Islington (bot) [Wed, 12 Feb 2020 10:35:10 +0000 (02:35 -0800)] 
bpo-39219: Fix SyntaxError attributes in the tokenizer. (GH-17828)

* Always set the text attribute.
* Correct the offset attribute for non-ascii sources.
(cherry picked from commit 0cc6b5e559b8303b18fdd56c2befd900fe7b5e35)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agobpo-39605: Remove a cast that causes a warning. (GH-18473)
Miss Islington (bot) [Wed, 12 Feb 2020 03:52:46 +0000 (19:52 -0800)] 
bpo-39605: Remove a cast that causes a warning. (GH-18473)

(cherry picked from commit 95905ce0f41fd42eb1ef60ddb83f057401c3d52f)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years agobpo-39595: Improve zipfile.Path performance (GH-18406) (GH-18472)
Miss Islington (bot) [Wed, 12 Feb 2020 03:21:32 +0000 (19:21 -0800)] 
bpo-39595: Improve zipfile.Path performance (GH-18406) (GH-18472)

* Improve zipfile.Path performance on zipfiles with a large number of entries.

* 📜🤖 Added by blurb_it.

* Add bpo to blurb

* Sync with importlib_metadata 1.5 (6fe70ca)

* Update blurb.

* Remove compatibility code

* Add stubs module, omitted from earlier commit

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit e5bd73632e77dc5ab0cab77e48e94ca5e354be8a)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 years agocloses bpo-39605: Fix some casts to not cast away const. (GH-18453)
Miss Islington (bot) [Wed, 12 Feb 2020 02:47:20 +0000 (18:47 -0800)] 
closes bpo-39605: Fix some casts to not cast away const. (GH-18453)

gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either:

Adding the const to the type cast, as in:

-    return _PyUnicode_FromUCS1((unsigned char*)s, size);
+    return _PyUnicode_FromUCS1((const unsigned char*)s, size);

or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in:

-    PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
+    PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);

These changes will not change code, but they will make it much easier to check for errors in consts
(cherry picked from commit e6be9b59a911626d6597fe148c32f0342bd2bd24)

Co-authored-by: Andy Lester <andy@petdance.com>
5 years agodocs: macos - change "versiona" to "versions" (GH-18467) (GH-18469)
Miss Islington (bot) [Wed, 12 Feb 2020 01:39:33 +0000 (17:39 -0800)] 
docs: macos - change "versiona" to "versions" (GH-18467) (GH-18469)

(cherry picked from commit 029e8401b7741cc0964b5f38d2c2264749dbff6b)

Co-authored-by: @RandyMcMillan <randy.lee.mcmillan@gmail.com>
5 years agobpo-39299: Add more tests for mimetypes and its cli. (GH-17949)
Miss Islington (bot) [Tue, 11 Feb 2020 15:32:40 +0000 (07:32 -0800)] 
bpo-39299: Add more tests for mimetypes and its cli. (GH-17949)

* Add tests for case insensitive check of types and extensions as fallback.
* Add tests for data url with no comma.
* Add tests for read_mime_types.
* Add tests for the mimetypes cli and refactor __main__ code to private function.
* Restore mimetypes.knownfiles value at the end of the test.
(cherry picked from commit d8efc1495194228c3a4cd472200275d6491d8e2d)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
5 years agoPost 3.8.2rc1
Łukasz Langa [Tue, 11 Feb 2020 12:38:43 +0000 (13:38 +0100)] 
Post 3.8.2rc1

5 years agoMerge tag 'v3.8.2rc1' into 3.8
Łukasz Langa [Tue, 11 Feb 2020 12:37:54 +0000 (13:37 +0100)] 
Merge tag 'v3.8.2rc1' into 3.8

Python 3.8.2rc1

5 years agobpo-38374: Remove weakref.ReferenceError from docs (GH-18452)
Miss Islington (bot) [Tue, 11 Feb 2020 07:02:01 +0000 (23:02 -0800)] 
bpo-38374: Remove weakref.ReferenceError from docs (GH-18452)

Reflecting changes to the code, removed weakref.ReferenceError from weakref.rst and exceptions.rst.

Issue submitter provided evidence that the `weakref.ReferenceError` alias for `ReferenceError` was removed from the code in 2007.  Working with @gvanrossum at PyCascades CPython sprint we looked at the code and confirmed that `weakref.ReferenceError` was no longer in `weakref.py`.

Based on that analysis I removed references `weakref.ReferenceError` from the two documents where it was still being referenced: `weakref.rst` and `exceptions.rst`.

https://bugs.python.org/issue38374
(cherry picked from commit 4eb9f4313cfaea6a9611221024a1c54f5662cc37)

Co-authored-by: Roger Hurwitz <rogerhurwitz@gmail.com>
5 years agobpo-39600: Adjust code, add idlelib/NEWS item (GH-18449)
Miss Islington (bot) [Tue, 11 Feb 2020 01:27:31 +0000 (17:27 -0800)] 
bpo-39600: Adjust code, add idlelib/NEWS item (GH-18449)

Complete previous patch.
(cherry picked from commit 96ce22706735779cf8cc46eaaa5ac61359364b5a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-39594: Fix typo in os.times documentation (GH-18443)
Miss Islington (bot) [Mon, 10 Feb 2020 22:57:14 +0000 (14:57 -0800)] 
bpo-39594: Fix typo in os.times documentation (GH-18443)

There was an extra space in the url markup, causing the documentation not rendered properly.

https://bugs.python.org/issue39594
(cherry picked from commit 37c55b2b49a3acb7c56c9f6a5062bc6e4e35bc1c)

Co-authored-by: Roger Hurwitz <rogerhurwitz@gmail.com>
5 years agobpo-13826: Clarify Popen constructor example (GH-18438)
Miss Islington (bot) [Mon, 10 Feb 2020 22:57:06 +0000 (14:57 -0800)] 
bpo-13826: Clarify Popen constructor example (GH-18438)

Clarifies that the use of `shlex.split` is more instructive than
normative, and provides a simpler example.

https://bugs.python.org/issue13826
(cherry picked from commit 95d024d585bd3ed627437a2f0cbc783c8a014c8a)

Co-authored-by: Tim D. Smith <github@tim-smith.us>
5 years agoImprove grammar in the import system reference documentation (GH-18209)
Miss Islington (bot) [Mon, 10 Feb 2020 22:37:46 +0000 (14:37 -0800)] 
Improve grammar in the import system reference documentation (GH-18209)

Replaced the period with a comma.

Automerge-Triggered-By: @Mariatta
(cherry picked from commit d47d0c8e9f2ca0f9f5d1bf0b35006a9a4d5ca684)

Co-authored-by: Bonifacio de Oliveira <bonifacio.segundo@gmail.com>
5 years agobpo-39600, IDLE: Remove duplicated font names (GH-18430)
Miss Islington (bot) [Mon, 10 Feb 2020 21:38:30 +0000 (13:38 -0800)] 
bpo-39600, IDLE: Remove duplicated font names (GH-18430)

In the font configuration window, remove duplicated font names.
(cherry picked from commit ed335cf53b5d4bca9a08c9b83ba684ba17be0f10)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agoIssue3950: Fix docs for default locale used by gettext to match implementation (GH...
Miss Islington (bot) [Mon, 10 Feb 2020 21:24:53 +0000 (13:24 -0800)] 
Issue3950: Fix docs for default locale used by gettext to match implementation (GH-18435)

documentation for default locale directory Doc/library/gettext.rst changed to match gettext implementation line 63.
(cherry picked from commit d68e0a8a165761604e820c8cb4f20abc735e717f)

Co-authored-by: Carl <Carl-Ty@users.noreply.github.com>
5 years agoPython 3.8.2rc1 v3.8.2rc1
Łukasz Langa [Mon, 10 Feb 2020 19:08:24 +0000 (20:08 +0100)] 
Python 3.8.2rc1

5 years agoGrammar fix in tutorial (GH-18425) (GH-18426)
Miss Islington (bot) [Mon, 10 Feb 2020 11:40:15 +0000 (03:40 -0800)] 
Grammar fix in tutorial (GH-18425) (GH-18426)

(cherry picked from commit 3ed4d251587c36c3853daf42602eaad121b59bba)

Co-authored-by: Don Kirkby <donkirkby@users.noreply.github.com>
5 years agobpo-39128: Added happy_eyeballs_delay, interleave to function signature (GH-18315)
Miss Islington (bot) [Mon, 10 Feb 2020 09:54:38 +0000 (01:54 -0800)] 
bpo-39128: Added happy_eyeballs_delay, interleave to function signature (GH-18315)

(cherry picked from commit 5305cc9dbfe8a5a0ab666511f3ba7f026c8983f8)

Co-authored-by: idomic <michael.ido@gmail.com>
5 years agobpo-39590: make deque.__contains__ and deque.count hold strong references (GH-18421...
Miss Islington (bot) [Sun, 9 Feb 2020 08:39:28 +0000 (00:39 -0800)] 
bpo-39590: make deque.__contains__ and deque.count hold strong references (GH-18421) (GH-18423)

(cherry picked from commit c6dedde160a9fce5d049e860f586ad8f93aec822)

Co-authored-by: sweeneyde <36520290+sweeneyde@users.noreply.github.com>
Co-authored-by: sweeneyde <36520290+sweeneyde@users.noreply.github.com>
5 years agoDoc: sys.__unraisablehook__ and bytearray.hex separators are new in 3.8 (GH-17884)
Miss Islington (bot) [Sat, 8 Feb 2020 00:54:06 +0000 (16:54 -0800)] 
Doc: sys.__unraisablehook__ and bytearray.hex separators are new in 3.8 (GH-17884)

Minor fix in documentation:

- `sys.__unraisablehook__` is new in version 3.8
- Optional `sep` and `bytes_per_sep` parameters for `bytearray.hex` is also supported in Python 3.8 (just like `bytes.hex`)
(cherry picked from commit 0edc2c7678266c39a7ceb2df885cb050f887e32b)

Co-authored-by: Saiyang Gou <gousaiyang@163.com>
5 years ago[3.8] bpo-39579: Fix Attribute end_col_offset to point at the current node (GH-18405...
Lysandros Nikolaou [Sat, 8 Feb 2020 00:21:38 +0000 (01:21 +0100)] 
[3.8] bpo-39579: Fix Attribute end_col_offset to point at the current node (GH-18405) (GH-18408)

(cherry picked from commit d2e1098641f98594702ef29049c3c4a3f394786f)

https://bugs.python.org/issue39579

Automerge-Triggered-By: @gvanrossum
5 years agobpo-39534: Doc: Clarify return in finally (GH-18324)
Miss Islington (bot) [Thu, 6 Feb 2020 22:23:04 +0000 (14:23 -0800)] 
bpo-39534: Doc: Clarify return in finally (GH-18324)

(cherry picked from commit 446463f8dbce0556be8020914f37089b63bb8ab6)

Co-authored-by: Julien Palard <julien@palard.fr>
5 years agoFix MinGW library generation command (GH-17917)
Miss Islington (bot) [Thu, 6 Feb 2020 21:54:54 +0000 (13:54 -0800)] 
Fix MinGW library generation command (GH-17917)

To print the exports to stdout, the gendef command requires the option "-". Without this option, no output is generated.
(cherry picked from commit 2545fa87628b4caca519da8aeb0eeef368b9dc0d)

Co-authored-by: Baljak <baljci@hotmail.com>
5 years agobpo-39274: Ensure Fraction.__bool__() returns a bool (GH-18017)
Miss Islington (bot) [Thu, 6 Feb 2020 15:13:38 +0000 (07:13 -0800)] 
bpo-39274: Ensure Fraction.__bool__() returns a bool (GH-18017)

Some numerator types used (specifically NumPy) decides to not
return a Python boolean for the "a != b" operation. Using the equivalent
call to bool() guarantees a bool return also for such types.
(cherry picked from commit 427c84f13f7719e6014a21bd1b81efdc02a046fb)

Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
5 years agobpo-38149: Call sys.audit() only once per call for glob.glob(). (GH-18360)
Miss Islington (bot) [Thu, 6 Feb 2020 08:45:18 +0000 (00:45 -0800)] 
bpo-38149: Call sys.audit() only once per call for glob.glob(). (GH-18360)

(cherry picked from commit 54b4f14712b9350f11c983f1c8ac47a3716958a7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agobpo-39505: delete the redundant '/' in $env:VIRTUAL_ENV (GH-18290) (GH-18359)
Miss Islington (bot) [Wed, 5 Feb 2020 08:39:36 +0000 (00:39 -0800)] 
bpo-39505: delete the redundant '/' in $env:VIRTUAL_ENV (GH-18290) (GH-18359)

(cherry picked from commit 787b6d548c250f36df6d3f3179f60d754c8aa5e3)

Co-authored-by: schwarzichet <15522755+schwarzichet@users.noreply.github.com>
5 years agobpo-39185 Add the d[etailed] and q[uiet] verbosity levels for msbuild (GH-17791)
Miss Islington (bot) [Wed, 5 Feb 2020 00:48:01 +0000 (16:48 -0800)] 
bpo-39185 Add the d[etailed] and q[uiet] verbosity levels for msbuild (GH-17791)

(cherry picked from commit 89ae20b30e4543f379ee647c965eb46200556496)

Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
5 years agobpo-39184: Add audit events to command execution functions in os and pty modules...
Miss Islington (bot) [Wed, 5 Feb 2020 00:32:32 +0000 (16:32 -0800)] 
bpo-39184: Add audit events to command execution functions in os and pty modules (GH-17824)

(cherry picked from commit 95f60010219e142a436fae18e1695cbc45407afe)

Co-authored-by: Saiyang Gou <gousaiyang@163.com>
5 years agocloses bpo-39510: Fix use-after-free in BufferedReader.readinto() (GH-18295)
Miss Islington (bot) [Tue, 4 Feb 2020 21:41:55 +0000 (13:41 -0800)] 
closes bpo-39510: Fix use-after-free in BufferedReader.readinto() (GH-18295)

When called on a closed object, readinto() segfaults on account
of a write to a freed buffer:

    ==220553== Process terminating with default action of signal 11 (SIGSEGV): dumping core
    ==220553==  Access not within mapped region at address 0x2A
    ==220553==    at 0x48408A0: memmove (vg_replace_strmem.c:1272)
    ==220553==    by 0x58DB0C: _buffered_readinto_generic (bufferedio.c:972)
    ==220553==    by 0x58DCBA: _io__Buffered_readinto_impl (bufferedio.c:1053)
    ==220553==    by 0x58DCBA: _io__Buffered_readinto (bufferedio.c.h:253)

Reproducer:

    reader = open ("/dev/zero", "rb")
    _void  = reader.read (42)
    reader.close ()
    reader.readinto (bytearray (42)) GH-GH-GH- BANG!

The problem exists since 2012 when commit dc469454ec added code
to free the read buffer on close().

Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
(cherry picked from commit cb1c0746f277052e45a60d6c436a765e34722821)

Co-authored-by: Philipp Gesang <phg@phi-gamma.net>
5 years agobpo-37224: Improve test__xxsubinterpreters.DestroyTests (GH-18058)
Miss Islington (bot) [Tue, 4 Feb 2020 15:31:19 +0000 (07:31 -0800)] 
bpo-37224: Improve test__xxsubinterpreters.DestroyTests (GH-18058)

Adds an additional assertion check based on a race condition for `test__xxsubinterpreters.DestroyTests.test_still_running` discovered in the bpo issue.

https://bugs.python.org/issue37224
(cherry picked from commit f03a8f8d5001963ad5b5b28dbd95497e9cc15596)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
5 years agoFixes in sorting descriptions (GH-18317)
Miss Islington (bot) [Tue, 4 Feb 2020 00:50:29 +0000 (16:50 -0800)] 
Fixes in sorting descriptions (GH-18317)

Improvements in listsort.txt and a comment in sortperf.py.

Automerge-Triggered-By: @csabella
(cherry picked from commit 24e5ad4689de9adc8e4a7d8c08fe400dcea668e6)

Co-authored-by: Stefan Pochmann <stefan.pochmann@gmail.com>
5 years agobpo-38558: Link to further docs from walrus operator mention in tutorial (GH-16973)
Miss Islington (bot) [Mon, 3 Feb 2020 17:17:17 +0000 (09:17 -0800)] 
bpo-38558: Link to further docs from walrus operator mention in tutorial (GH-16973)

(cherry picked from commit 5807efd4c396d5718325e21f5a14e324a77ff77c)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
5 years agofixes typos in http.client documentation (GH-18300)
Miss Islington (bot) [Mon, 3 Feb 2020 12:07:19 +0000 (04:07 -0800)] 
fixes typos in http.client documentation (GH-18300)

(cherry picked from commit b94737a4af96b29bd4c025724f671e7bc0f6b6f1)

Co-authored-by: James Corbett <james.h.corbett@gmail.com>
5 years agobpo-39450 Stripped whitespace before parsing the docstring in TestCase.shortDescripti...
Miss Islington (bot) [Mon, 3 Feb 2020 08:20:41 +0000 (00:20 -0800)] 
bpo-39450 Stripped whitespace before parsing the docstring in TestCase.shortDescription (GH-18175) (#18323)

(cherry picked from commit 032de7324e30c6b44ef272cea3be205a3d768759)

Co-authored-by: Steve Cirelli <scirelli+git@gmail.com>
5 years ago[3.8] bpo-39492: Fix a reference cycle between reducer_override and a Pickler instanc...
Antoine Pitrou [Sun, 2 Feb 2020 20:22:57 +0000 (21:22 +0100)] 
[3.8] bpo-39492: Fix a reference cycle between reducer_override and a Pickler instance (GH-18266) (#18316)

https://bugs.python.org/issue39492

Automerge-Triggered-By: @pitrou
(cherry picked from commit 0f2f35e)

Co-authored-by: Pierre Glaser <pierreglaser@msn.com>
5 years agobpo-38792: Remove IDLE shell calltip before new prompt. (GH-17150)
Miss Islington (bot) [Fri, 31 Jan 2020 02:14:16 +0000 (18:14 -0800)] 
bpo-38792: Remove IDLE shell calltip before new prompt. (GH-17150)

Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
(cherry picked from commit bfdeaa37b3df7466624c17f9450d2bd1c3d95edf)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-39502: Skip test_zipfile.test_add_file_after_2107() on AIX (GH-18282)
Miss Islington (bot) [Thu, 30 Jan 2020 15:05:08 +0000 (07:05 -0800)] 
bpo-39502: Skip test_zipfile.test_add_file_after_2107() on AIX (GH-18282)

Skip test_zipfile.test_add_file_after_2107() if time.localtime()
fails with OverflowError. It is the case on AIX 6.1 for example.
(cherry picked from commit c232c9110cfefa0935cbf158e35e91746a8a9361)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years ago[3.8] bpo-39401: Avoid unsafe DLL load on Windows 7 and earlier (GH-18231) (GH-18234)
Steve Dower [Thu, 30 Jan 2020 06:18:25 +0000 (17:18 +1100)] 
[3.8] bpo-39401: Avoid unsafe DLL load on Windows 7 and earlier (GH-18231) (GH-18234)

https://bugs.python.org/issue39401

Automerge-Triggered-By: @zooba
5 years agobpo-39493: Fix definition of IO.closed in typing.py (GH-18265)
Miss Islington (bot) [Thu, 30 Jan 2020 05:42:38 +0000 (21:42 -0800)] 
bpo-39493: Fix definition of IO.closed in typing.py (GH-18265)

(cherry picked from commit 2e6569b6692298fcc9aae0df3eb3181adb2a5099)

Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
5 years agobpo-39485: fix corner-case in method-detection of mock (GH-18255)
Miss Islington (bot) [Wed, 29 Jan 2020 16:15:36 +0000 (08:15 -0800)] 
bpo-39485: fix corner-case in method-detection of mock (GH-18255)

Replace check for whether something is a method in the mock module. The
previous version fails on PyPy, because there no method wrappers exist
(everything looks like a regular Python-defined function). Thus the
isinstance(getattr(result, '__get__', None), MethodWrapperTypes) check
returns True for any descriptor, not just methods.

This condition could also return erroneously True in CPython for
C-defined descriptors.

Instead to decide whether something is a method, just check directly
whether it's a function defined on the class. This passes all tests on
CPython and fixes the bug on PyPy.
(cherry picked from commit a327677905956ae0b239ff430a1346dfe265709e)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
5 years agobpo-39460: Fix test_zipfile.test_add_file_after_2107() (GH-18247)
Miss Islington (bot) [Wed, 29 Jan 2020 14:41:49 +0000 (06:41 -0800)] 
bpo-39460: Fix test_zipfile.test_add_file_after_2107() (GH-18247)

XFS filesystem is limited to 32-bit timestamp, but the utimensat()
syscall doesn't fail. Moreover, there is a VFS bug which returns
a cached timestamp which is different than the value on disk.

https://bugzilla.redhat.com/show_bug.cgi?id=1795576
https://bugs.python.org/issue39460GH-msg360952
(cherry picked from commit 3cb49b62e61208efcefbc04414e769fc173f205d)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agoDoc: Fix external links to functional programming tutorial. (GH-18249)
Miss Islington (bot) [Wed, 29 Jan 2020 13:17:40 +0000 (05:17 -0800)] 
Doc: Fix external links to functional programming tutorial. (GH-18249)

(cherry picked from commit 35eac4500a8bd89b087407f59ba337343b22d403)

Co-authored-by: Julien Palard <julien@palard.fr>
5 years agobpo-39153: Clarify C API *SetItem refcounting semantics (GH-18220)
Miss Islington (bot) [Wed, 29 Jan 2020 11:29:35 +0000 (03:29 -0800)] 
bpo-39153: Clarify C API *SetItem refcounting semantics (GH-18220)

Some of the *SetItem methods in the C API steal a reference to the
given value. This annotates the better behaved ones to assure the
reader that these are not the ones with the inconsistent behaviour.

* 📜🤖 Added by blurb_it.

* make docs consistent with signature

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit e1e80002e28e1055f399a20918c49d50d093709e)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
5 years agobpo-39439: Fix multiprocessing spawn path in a venv on Windows (GH-18158)
Miss Islington (bot) [Tue, 28 Jan 2020 10:52:47 +0000 (02:52 -0800)] 
bpo-39439: Fix multiprocessing spawn path in a venv on Windows (GH-18158)

(cherry picked from commit 0be3246d4f9c8eddcd55491901d95b09fe163f15)

Co-authored-by: Adam Meily <ameily@users.noreply.github.com>
5 years agobpo-39287: Doc: Add UTF-8 mode section in using/windows. (GH-17935)
Miss Islington (bot) [Tue, 28 Jan 2020 10:18:09 +0000 (02:18 -0800)] 
bpo-39287: Doc: Add UTF-8 mode section in using/windows. (GH-17935)

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 148610d88a2785751ed435a4e60f07a9f1bc50a6)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
5 years agobpo-39393: Misleading error message on dependent DLL resolution failure (GH-18093)
Miss Islington (bot) [Tue, 28 Jan 2020 10:00:16 +0000 (02:00 -0800)] 
bpo-39393: Misleading error message on dependent DLL resolution failure (GH-18093)

(cherry picked from commit 13c1c3556f2c12d0be2af890fabfbf44280b845c)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-38883: Don't use POSIX `$HOME` in `pathlib.Path.home/expanduser` on Windows ...
Miss Islington (bot) [Tue, 28 Jan 2020 09:59:43 +0000 (01:59 -0800)] 
bpo-38883: Don't use POSIX `$HOME` in `pathlib.Path.home/expanduser` on Windows (GH-17961)

In bpo-36264 os.path.expanduser was changed to ignore HOME on Windows.

Path.expanduser/home still honored HOME despite being documented as behaving the same
as os.path.expanduser. This makes them also ignore HOME so that both implementations
behave the same way again.
(cherry picked from commit c45a2aa9e255b5c7c211faa79f6b23895b64ab27)

Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
5 years agobpo-36018: Minor fixes to the NormalDist() examples and recipes. (GH-18226) (GH-18227)
Miss Islington (bot) [Tue, 28 Jan 2020 03:40:14 +0000 (19:40 -0800)] 
bpo-36018: Minor fixes to the NormalDist() examples and recipes. (GH-18226) (GH-18227)

* Change the source for the SAT data to a primary source.
* Fix typo in the standard deviation
* Clarify that the binomial probabalities are just for the Python room.
(cherry picked from commit 01bf2196d842fc20667c5336e0a7a77eb4fdc25c)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-39392: Turtle overlap fill depends on OS (GH-18223)
Miss Islington (bot) [Mon, 27 Jan 2020 23:47:08 +0000 (15:47 -0800)] 
bpo-39392: Turtle overlap fill depends on OS (GH-18223)

Whether or not overlap regions for self-intersecting polygons
or multiple shapes are filled depends on the operating system graphics,
typeof overlap, and number of overlaps.
(cherry picked from commit 2824c45a0a020f12f27da7e7162e8636c21bf869)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years ago[3.8] bpo-39390 shutil: fix argument types for ignore callback (GH-18122)
mbarkhau [Mon, 27 Jan 2020 23:46:29 +0000 (23:46 +0000)] 
[3.8] bpo-39390 shutil: fix argument types for ignore callback (GH-18122)

5 years agobpo-30780: Add IDLE configdialog tests (GH-3592)
Miss Islington (bot) [Mon, 27 Jan 2020 22:35:08 +0000 (14:35 -0800)] 
bpo-30780: Add IDLE configdialog tests (GH-3592)

Expose dialog buttons to test code and complete their test coverage.
Complete test coverage for highlights and keys tabs.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit dd023ad1619b6f1ab313986e8953eea32c18f50c)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
5 years agoIgnore NEWS snippets in code coverage stats (GH-18194)
Miss Islington (bot) [Mon, 27 Jan 2020 16:27:59 +0000 (08:27 -0800)] 
Ignore NEWS snippets in code coverage stats (GH-18194)

(cherry picked from commit 7023288dc500008609e7a4d12ae710c2093c3fc6)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
5 years ago[3.8] bpo-39082: Allow AsyncMock to correctly patch static/class methods (GH-18190)
Matthew Kokotovich [Sun, 26 Jan 2020 15:30:27 +0000 (09:30 -0600)] 
[3.8] bpo-39082: Allow AsyncMock to correctly patch static/class methods (GH-18190)

(cherry picked from commit 62865f4532094017a9b780b704686ca9734bc329)

Co-authored-by: Matthew Kokotovich <mkokotovich@gmail.com>
5 years agobpo-36018: Add another example for NormalDist() (GH-18191) (GH-18192)
Miss Islington (bot) [Sun, 26 Jan 2020 05:24:13 +0000 (21:24 -0800)] 
bpo-36018: Add another example for NormalDist() (GH-18191) (GH-18192)

5 years agobpo-39234: Doc: `enum.auto()` incrementation value not specified. (GH-17872) (GH...
Miss Islington (bot) [Sat, 25 Jan 2020 19:40:27 +0000 (11:40 -0800)] 
bpo-39234: Doc: `enum.auto()` incrementation value not specified. (GH-17872) (GH-17875)

(cherry picked from commit 2e9012a3e1e316c54e27f51ba5849ba06eab7da2)

Co-authored-by: YoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>
5 years agobpo-36654: Add examples for using tokenize module programmatically (GH-18187)
Miss Islington (bot) [Sat, 25 Jan 2020 19:34:36 +0000 (11:34 -0800)] 
bpo-36654: Add examples for using tokenize module programmatically (GH-18187)

(cherry picked from commit 4b09dc79f4d08d85f2cc945563e9c8ef1e531d7b)

Co-authored-by: Windson yang <wiwindson@outlook.com>
5 years agobpo-15243: Document __prepare__ as classmethod (GH-17124)
Miss Islington (bot) [Sat, 25 Jan 2020 19:04:16 +0000 (11:04 -0800)] 
bpo-15243: Document __prepare__ as classmethod (GH-17124)

(cherry picked from commit 7de617455ed788e6730c40cf854c4b72b0432194)

Co-authored-by: alclarks <57201106+alclarks@users.noreply.github.com>
5 years agoUpdate 3.8.rst (GH-18173) (#18182)
Miss Islington (bot) [Sat, 25 Jan 2020 17:33:36 +0000 (09:33 -0800)] 
Update 3.8.rst (GH-18173) (#18182)

Fixed the name of the contributor (@selik).
(cherry picked from commit 9bfb4a7061a3bc4fc5632bccfdf9ed61f62679f7)

Co-authored-by: fireattack <human.peng@gmail.com>
5 years agobpo-38473: Handle autospecced functions and methods used with attach_mock (GH-16784...
Miss Islington (bot) [Sat, 25 Jan 2020 14:53:08 +0000 (06:53 -0800)] 
bpo-38473: Handle autospecced functions and methods used with attach_mock (GH-16784) (GH-18167)

If an autospecced object is attached using attach_mock the
child would be a function with mock object as attribute from
which signature has to be derived.

(cherry picked from commit 66b00a9d3aacf6ed49412f48743e4913104a2bb3)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
5 years agobpo-39388: IDLE: Fix bug when cancelling out of configdialog (GH-18068)
Miss Islington (bot) [Sat, 25 Jan 2020 09:17:54 +0000 (01:17 -0800)] 
bpo-39388: IDLE: Fix bug when cancelling out of configdialog (GH-18068)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit d0d9fa8c5e30aff71b6d5e8b2673396622f33270)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
5 years agobpo-39430: Fix race condition in lazy imports in tarfile. (GH-18161)
Miss Islington (bot) [Fri, 24 Jan 2020 20:10:42 +0000 (12:10 -0800)] 
bpo-39430: Fix race condition in lazy imports in tarfile. (GH-18161)

Use `from ... import ...` to ensure module is fully loaded before accessing its attributes.
(cherry picked from commit 9017e0bd5e124ae6d2ed94b9e9cacb2e86270980)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agoImprove test coverage for AsyncMock. (GH-17906)
Miss Islington (bot) [Fri, 24 Jan 2020 13:27:04 +0000 (05:27 -0800)] 
Improve test coverage for AsyncMock. (GH-17906)

* Add test for nested async decorator patch.
* Add test for side_effect and wraps with a function.
* Add test for side_effect with an exception in the iterable.
(cherry picked from commit 54f743eb315f00b0ff45e115dde7a5d506034153)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
5 years agobpo-39426: Fix outdated default and highest protocols in docs (GH-18154)
Miss Islington (bot) [Fri, 24 Jan 2020 10:20:35 +0000 (02:20 -0800)] 
bpo-39426: Fix outdated default and highest protocols in docs (GH-18154)

Some portions of the pickle documentation hadn't been updated for the pickle protocol changes in Python 3.8 (new protocol 5, default protocol 4). This PR fixes those docs.

https://bugs.python.org/issue39426
(cherry picked from commit e9652e8d58392f5022759ba06b444ce970eb12db)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
5 years ago[3.8] bpo-35182: fix communicate() crash after child closes its pipes (GH-18117)...
Alex Rebert [Thu, 23 Jan 2020 23:31:29 +0000 (18:31 -0500)] 
[3.8] bpo-35182: fix communicate() crash after child closes its pipes (GH-18117) (GH-18148)

When communicate() is called in a loop, it crashes when the child process
has already closed any piped standard stream, but still continues to be running

Co-authored-by: Andriy Maletsky <andriy.maletsky@gmail.com>.
(cherry picked from commit d3ae95e1e945ed20297e1c38ba43a18b7a868ab6)

Co-authored-by: Alex Rebert <alex@forallsecure.com>
https://bugs.python.org/issue35182

5 years agobpo-39431: Also mention nonlocal in assignment quirk (GH-17375)
Miss Islington (bot) [Thu, 23 Jan 2020 18:22:36 +0000 (10:22 -0800)] 
bpo-39431: Also mention nonlocal in assignment quirk (GH-17375)

(cherry picked from commit 7142df5ea23b4ce0efb72746b4b3b65414e8dcb1)

Co-authored-by: Shanavas M <shanavas.m2@gmail.com>
5 years agobpo-39421: Fix posible crash in heapq with custom comparison operators (GH-18118)
Miss Islington (bot) [Thu, 23 Jan 2020 15:22:25 +0000 (07:22 -0800)] 
bpo-39421: Fix posible crash in heapq with custom comparison operators (GH-18118)

* bpo-39421: Fix posible crash in heapq with custom comparison operators

* fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators

* fixup! fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators
(cherry picked from commit 79f89e6e5a659846d1068e8b1bd8e491ccdef861)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-32989: IDLE - remove unneeded parameter (GH-18138)
Miss Islington (bot) [Thu, 23 Jan 2020 05:13:41 +0000 (21:13 -0800)] 
bpo-32989: IDLE - remove unneeded parameter  (GH-18138)

IDLE does not pass a non-default _synchre in any of its calls to
pyparse.find_good_parse_start.
(cherry picked from commit f9e07e116c32b6dc4561d0bdeb452ccde13b0e7c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-39050: The Help button in IDLE's config menu works again (GH-17611)
Miss Islington (bot) [Thu, 23 Jan 2020 04:13:29 +0000 (20:13 -0800)] 
bpo-39050: The Help button in IDLE's config menu works again (GH-17611)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 2e43b64c94e49f7133b9c26e84c9519935c49063)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-39425: Fix list.count performance regression (GH-18119) (GH-18120)
Miss Islington (bot) [Wed, 22 Jan 2020 18:11:22 +0000 (10:11 -0800)] 
bpo-39425: Fix list.count performance regression (GH-18119) (GH-18120)

https://bugs.python.org/issue39425

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 14d80d0b605d8b148e14458e4c1853a940071462)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
5 years agobpo-39413: os.unsetenv() is not available on Windows (GH-18108)
Victor Stinner [Wed, 22 Jan 2020 12:50:40 +0000 (13:50 +0100)] 
bpo-39413: os.unsetenv() is not available on Windows (GH-18108)

Update os.unsetenv() documentation: it is not available on Windows.

5 years agocloses bpo-39415: Remove unused codes from longobject.c complexobject.c floatobject...
Miss Islington (bot) [Wed, 22 Jan 2020 03:26:34 +0000 (19:26 -0800)] 
closes bpo-39415: Remove unused codes from longobject.c complexobject.c floatobject.c. (GH-18105)

(cherry picked from commit 0d5eac8c327251f8edde5261cee43975d81311f6)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
5 years agoPyLong_AsLongLong() docs should say 'long long' (GH-18082) (GH-18110)
Miss Islington (bot) [Tue, 21 Jan 2020 19:22:21 +0000 (11:22 -0800)] 
PyLong_AsLongLong() docs should say 'long long' (GH-18082) (GH-18110)

(cherry picked from commit 47be7d0108b4021ede111dbd15a095c725be46b7)

Co-authored-by: Keith Erskine <toastie604@gmail.com>
Co-authored-by: Keith Erskine <toastie604@gmail.com>
5 years agoMove test_math tests (GH-18098) (GH-18102)
Victor Stinner [Tue, 21 Jan 2020 14:04:33 +0000 (15:04 +0100)] 
Move test_math tests (GH-18098) (GH-18102)

testPerm() and testComb() belong to MathTests, not to IsCloseTests().

(cherry picked from commit 59e2d26b258c12f18d8d2e789ef741703d6c52d5)