]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agobpo-40993: Don't run Travis CI coverage on PRs (GH-20916)
Miss Islington (bot) [Tue, 16 Jun 2020 15:47:16 +0000 (08:47 -0700)] 
bpo-40993: Don't run Travis CI coverage on PRs (GH-20916)

C and Python coverage jobs of Travis CI are no longer run on pull
requests, only on branches like master.
(cherry picked from commit fc710ee266e9461fdba9933ec6004318db588820)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-40985: Show correct SyntaxError text when last line has a LINECONT (GH-20888)
Miss Islington (bot) [Tue, 16 Jun 2020 00:46:44 +0000 (17:46 -0700)] 
bpo-40985: Show correct SyntaxError text when last line has a LINECONT (GH-20888)

When a file ends with a line that contains a line continuation character
the text of the emitted SyntaxError is empty, contrary to the old
parser, where the error text contained the text of the last line.
(cherry picked from commit 113e2b0a07c72c0d5e3489076afb14f6b3ad1049)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
5 years agobpo-38488: Upgrade bundled versions of pip & setuptools (GH-20491)
Miss Islington (bot) [Mon, 15 Jun 2020 20:39:49 +0000 (13:39 -0700)] 
bpo-38488: Upgrade bundled versions of pip & setuptools (GH-20491)

(cherry picked from commit 5f79f46612c351bde78a41c5264c42db21008868)

Co-authored-by: Xavier Fernandez <xav.fernandez@gmail.com>
5 years agobpo-36020: Remove snprintf macro in pyerrors.h (GH-20889)
Miss Islington (bot) [Mon, 15 Jun 2020 20:20:10 +0000 (13:20 -0700)] 
bpo-36020: Remove snprintf macro in pyerrors.h (GH-20889)

On Windows, GH-include "pyerrors.h" no longer defines "snprintf" and
"vsnprintf" macros.

PyOS_snprintf() and PyOS_vsnprintf() should be used to get portable
behavior.

Replace snprintf() calls with PyOS_snprintf() and replace vsnprintf()
calls with PyOS_vsnprintf().
(cherry picked from commit e822e37946f27c09953bb5733acf3b07c2db690f)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-40448: ensurepip: Do not use cache (GH-19812)
Miss Islington (bot) [Mon, 15 Jun 2020 17:48:44 +0000 (10:48 -0700)] 
bpo-40448: ensurepip: Do not use cache (GH-19812)

ensurepip optionally installs or upgrades 'pip' and 'setuptools' using
the version of those modules bundled with Python.  The internal PIP
installation routine by default temporarily uses its cache, if it
exists.  This is undesirable as Python builds and installations may be
independent of the user running the build, whilst PIP cache location
is dependent on the user's environment and outside of the build
environment.

At the same time, there's no value in using the cache while installing
bundled modules.

This change disables PIP caching when used in ensurepip.
(cherry picked from commit 4a3a682b12f93a03888e8b59f439bc5fe30d6055)

Co-authored-by: Krzysztof Konopko <kkonopko@users.noreply.github.com>
5 years agobpo-37556 Extend help to include latest overrides (GH-14701)
Miss Islington (bot) [Mon, 15 Jun 2020 16:56:40 +0000 (09:56 -0700)] 
bpo-37556 Extend help to include latest overrides (GH-14701)

Modify the help in cpython/PC/launcher.c to show users that "latest" can be overridden by shebang, PY_PYTHON[n] or py.ini files. Also show that script [args] is optional by enclosing in square brackets.

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

Co-authored-by: Steve (Gadget) Barnes <gadgetsteve@live.co.uk>
5 years agobpo-34226: fix cgi.parse_multipart without content_length (GH-8530)
Miss Islington (bot) [Mon, 15 Jun 2020 15:51:30 +0000 (08:51 -0700)] 
bpo-34226: fix cgi.parse_multipart without content_length (GH-8530)

In Python 3.7 the behavior of parse_multipart changed requiring CONTENT-LENGTH
header, this fix remove this header as required and fix FieldStorage
read_lines_to_outerboundary, by not using limit when it's negative,
since by default it's -1 if not content-length and keeps substracting what
was read from the file object.

Also added a test case for this problem.
(cherry picked from commit d8cf3514dd4682419a66f6e834bb384ee34afc95)

Co-authored-by: roger <rogerduran@gmail.com>
5 years agobpo-40910: PyConfig_Clear() clears _orig_argv (GH-20886)
Miss Islington (bot) [Mon, 15 Jun 2020 15:19:06 +0000 (08:19 -0700)] 
bpo-40910: PyConfig_Clear() clears _orig_argv (GH-20886)

bpo-40910, bpo-40953: PyConfig_Clear() clears _orig_argv.
(cherry picked from commit e2d47a0568c6da9229580829917fd6aa702133b3)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years ago[3.9] Improve readability and style in parser files (GH-20884) (GH-20885)
Pablo Galindo [Mon, 15 Jun 2020 14:08:00 +0000 (15:08 +0100)] 
[3.9] Improve readability and style in parser files (GH-20884) (GH-20885)

(cherry picked from commit fb61c42)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years ago[3.9] Include soft keywords in keyword.py (GH-20877). (GH-20880)
Pablo Galindo [Mon, 15 Jun 2020 03:31:05 +0000 (04:31 +0100)] 
[3.9] Include soft keywords in keyword.py (GH-20877). (GH-20880)

(cherry picked from commit 78319e373d57cd4da67660f888aa7092efbd6f24)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years ago[3.9] bpo-40924: Remove protocol for supplying Traversable objects from loaders ...
Jason R. Coombs [Sun, 14 Jun 2020 12:12:20 +0000 (08:12 -0400)] 
[3.9] bpo-40924: Remove protocol for supplying Traversable objects from loaders (GH-20820)

Remove protocol that loaders can present a files method as found in importlib_resources 1.3-1.6 (added in Python 3.8b1).

5 years agobpo-30064: Fix slow asyncio sock test (GH-20868)
Miss Islington (bot) [Sun, 14 Jun 2020 08:08:08 +0000 (01:08 -0700)] 
bpo-30064: Fix slow asyncio sock test (GH-20868)

Using a log2n way to fill a much smaller buffer, and receiving in a cleaner way with EOF.

The failing test was reproducible using the following command thanks to @aeros :

```bash
./python -m test test_asyncio.test_sock_lowlevel --match test_sock_client_racing -j100 -F -v
```

According to test results, we may still need to bump the timeout:

https://github.com/python/cpython/blob/5aad027db9618f22f6fa2274e05dd50f928d2ed7/Lib/test/test_asyncio/test_sock_lowlevel.pyGH-L256-L257
(cherry picked from commit 8f04a84755babe516ebb5304904ea7c15b865c80)

Co-authored-by: Fantix King <fantix.king@gmail.com>
5 years agoSome reformatting (suggested by Black) and minor factoring. (GH-20865) (GH-20866)
Miss Islington (bot) [Sun, 14 Jun 2020 02:53:32 +0000 (19:53 -0700)] 
Some reformatting (suggested by Black) and minor factoring. (GH-20865) (GH-20866)

5 years agobpo-40855: Fix ignored mu and xbar parameters (GH-20835) (#GH-20862)
Miss Islington (bot) [Sat, 13 Jun 2020 23:56:15 +0000 (16:56 -0700)] 
bpo-40855: Fix ignored mu and xbar parameters (GH-20835) (#GH-20862)

5 years ago[3.9] bpo-37674: Tweak imp module deprecation note in the docs (GH-20480) (GH-20859)
Miss Islington (bot) [Sat, 13 Jun 2020 20:55:38 +0000 (13:55 -0700)] 
[3.9] bpo-37674: Tweak imp module deprecation note in the docs (GH-20480) (GH-20859)

(cherry picked from commit dea3223740127ac13f984c1d38f127ab6701af44)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Automerge-Triggered-By: @brettcannon
5 years agoMinor code clean-ups (GH-20838) (GH-20858)
Miss Islington (bot) [Sat, 13 Jun 2020 17:23:48 +0000 (10:23 -0700)] 
Minor code clean-ups (GH-20838) (GH-20858)

5 years agobpo-40957: Fix refleak in _Py_fopen_obj() (GH-20827)
Miss Islington (bot) [Sat, 13 Jun 2020 16:18:52 +0000 (09:18 -0700)] 
bpo-40957: Fix refleak in _Py_fopen_obj() (GH-20827)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 9672912e8f90374fd31b37ca0fb7cefbc6f4c555)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-40834: Fix truncate when sending str object with channel (GH-20555)
Miss Islington (bot) [Sat, 13 Jun 2020 12:44:38 +0000 (05:44 -0700)] 
bpo-40834: Fix truncate when sending str object with channel (GH-20555)

(cherry picked from commit 29c117202e386bad1d66ae336e2fefa1a1809ee0)

Co-authored-by: An Long <aisk@users.noreply.github.com>
5 years agobpo-40164: Update Windows OpenSSL to 1.1.1g (GH-20834)
Miss Islington (bot) [Fri, 12 Jun 2020 21:06:52 +0000 (14:06 -0700)] 
bpo-40164: Update Windows OpenSSL to 1.1.1g (GH-20834)

(cherry picked from commit 80d827c3cb041ae72b9b0572981c50bdd1fe2cab)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
5 years agobpo-40964: disable remote IMAP tests (GH-20836)
Christian Heimes [Fri, 12 Jun 2020 18:54:03 +0000 (20:54 +0200)] 
bpo-40964: disable remote IMAP tests (GH-20836)

Remote host cyrus.andrew.cmu.edu is blocking incoming connections and is
causing test suite to fail.

Signed-off-by: Christian Heimes <christian@python.org>
5 years agobpo-40955: Fix memory leak in subprocess module (GH-20825)
Miss Islington (bot) [Fri, 12 Jun 2020 17:02:45 +0000 (10:02 -0700)] 
bpo-40955: Fix memory leak in subprocess module (GH-20825)

```
Direct leak of 8 byte(s) in 1 object(s) allocated from:
    GH-0 0x7f008bf19667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
    GH-1 0x7f007a0bee4a in subprocess_fork_exec /home/heimes/dev/python/cpython/Modules/_posixsubprocess.c:774
    GH-2 0xe0305b in cfunction_call Objects/methodobject.c:546
```

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 0d3350daa8123a3e16d4a534b6e873eb12c10d7c)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agoUpdate lexical_analysis.rst (GH-17508)
Miss Islington (bot) [Fri, 12 Jun 2020 13:01:20 +0000 (06:01 -0700)] 
Update lexical_analysis.rst (GH-17508)

Use Sphinx role markup for `str.format`.

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

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
5 years ago[3.9] bpo-40939: Fix test_keyword for the old parser (GH-20814)
Pablo Galindo [Thu, 11 Jun 2020 18:29:13 +0000 (19:29 +0100)] 
[3.9] bpo-40939: Fix test_keyword for the old parser (GH-20814)

5 years agobpo-40947: getpath.c uses PyConfig.platlibdir (GH-20807) (GH-20813)
Victor Stinner [Thu, 11 Jun 2020 16:27:00 +0000 (18:27 +0200)] 
bpo-40947: getpath.c uses PyConfig.platlibdir (GH-20807) (GH-20813)

Followup of bpo-40854, there is one remaining usage of PLATLIBDIR
which should be replaced by config->platlibdir.

test_sys checks that sys.platlibdir attribute exists and is a string.

Update Makefile: getpath.c and sysmodule.c no longer need PLATLIBDIR
macro, PyConfig.platlibdir member is used instead.

Co-authored-by: Sandro Mani <manisandro@gmail.com>
(cherry picked from commit d72b9644a3e6eec83be48b1ebc2ec6ca776134d3)

5 years agobpo-34401: Fix test_gdb for HP GDB version string (GH-20804)
Miss Islington (bot) [Thu, 11 Jun 2020 14:08:29 +0000 (07:08 -0700)] 
bpo-34401: Fix test_gdb for HP GDB version string (GH-20804)

The GDB provided by HPE on HP-UX contains a modified version string. Therefore
the tests fail. Adapt the regex to match that string.

Patch by Michael Osipov.

Co-Authored-by: Michael Osipov <michael.osipov@siemens.com>
(cherry picked from commit b2dca49ca3769cb60713f5c2b43e5d5bbdc1f9c7)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-40939: Generate keyword.py using the new parser (GH-20800)
Miss Islington (bot) [Thu, 11 Jun 2020 13:02:37 +0000 (06:02 -0700)] 
bpo-40939: Generate keyword.py using the new parser (GH-20800)

(cherry picked from commit 9727694f08cad4b019d2939224e3416312b1c0e1)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
5 years agoCollections module reformatting and minor code refactoring (GH-20772) (GH-20798)
Miss Islington (bot) [Thu, 11 Jun 2020 07:08:27 +0000 (00:08 -0700)] 
Collections module reformatting and minor code refactoring (GH-20772) (GH-20798)

5 years agobpo-40847: Consider a line with only a LINECONT a blank line (GH-20769)
Miss Islington (bot) [Thu, 11 Jun 2020 00:14:16 +0000 (17:14 -0700)] 
bpo-40847: Consider a line with only a LINECONT a blank line (GH-20769)

A line with only a line continuation character should be considered
a blank line at tokenizer level so that only a single NEWLINE token
gets emitted. The old parser was working around the issue, but the
new parser threw a `SyntaxError` for valid input. For example,
an empty line following a line continuation character was interpreted
as a `SyntaxError`.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 896f4cf63f9ab93e30572d879a5719d5aa2499fb)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
5 years agobpo-40895: Update weakref documentation to remove old warnings (GH-20687)
Miss Islington (bot) [Wed, 10 Jun 2020 20:33:59 +0000 (13:33 -0700)] 
bpo-40895: Update weakref documentation to remove old warnings (GH-20687)

The doccumentation at https://docs.python.org/3.10/library/weakref.html cautions that the `WeakKeyDictionary` and `WeakValueDictionary` are susceptible to the problem of dictionary mutation during iteration.

These notes present the user with a problem that has no easy solution.

I dug into the implementation and found that fortunately, Antoine Pitrou already addressed this challenge (10 years ago!) by introducing an `_IterationGuard` context manager to the implementation, which delays mutation while an iteration is in progress.

I asked for confirmation and @pitrou agreed that these notes could be removed:
https://github.com/python/cpython/commit/c1baa601e2b558deb690edfdf334fceee3b03327GH-commitcomment-39514438
(cherry picked from commit 1642c0ef750f96664a98cadb09301d492098d2fb)

Co-authored-by: Daniel Fortunov <asqui@users.noreply.github.com>
5 years agobpo-40927: Fix test_binhex when run twice (GH-20764) (GH-20789)
Victor Stinner [Wed, 10 Jun 2020 18:17:13 +0000 (20:17 +0200)] 
bpo-40927: Fix test_binhex when run twice (GH-20764) (GH-20789)

test_binhex now uses import_fresh_module() to ensure that it raises
DeprecationWarning each time.

(cherry picked from commit 9c24e2e4c10705d95258558348417a28007dac66)

5 years agobpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779) (GH-20785)
Victor Stinner [Wed, 10 Jun 2020 17:24:56 +0000 (19:24 +0200)] 
bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779) (GH-20785)

test_repl.test_close_stdin() now calls
support.suppress_msvcrt_asserts() to fix the test on Windows.

* Move suppress_msvcrt_asserts() from test.libregrtest.setup to
  test.support. Make its verbose parameter optional: verbose=False by
  default.
* SuppressCrashReport now uses SetErrorMode() of the msvcrt module,
  rather than using ctypes.
* Remove also an unused variable (deadline) in wait_process().

(cherry picked from commit f6e58aefde2e57e4cb11ea7743955da53a3f1e80)

5 years agobpo-40703: Let PyType_FromSpec() set "type.__module__" only if it is not set yet...
Miss Islington (bot) [Wed, 10 Jun 2020 16:43:10 +0000 (09:43 -0700)] 
bpo-40703: Let PyType_FromSpec() set "type.__module__" only if it is not set yet. (GH-20273) (GH-20782)

(cherry picked from commit 24b8bad6d30ae4fb37ee686a073adfa5308659f9)

5 years agobpo-36543: Revert "bpo-36543: Remove the xml.etree.cElementTree module." (GH-20117...
Miss Islington (bot) [Wed, 10 Jun 2020 16:01:25 +0000 (09:01 -0700)] 
bpo-36543: Revert "bpo-36543: Remove the xml.etree.cElementTree module." (GH-20117) (GH-20780)

* Revert "bpo-36543: Remove the xml.etree.cElementTree module. (GH-19108)"

This reverts commit b33e52511a59c6da7132c226b7f7489b092a33eb.
(cherry picked from commit ec88e1bca81a167e6d5c0ac635e22f84298cb1df)

5 years agoRaise specialised syntax error for invalid lambda parameters (GH-20776)
Miss Islington (bot) [Wed, 10 Jun 2020 13:24:41 +0000 (06:24 -0700)] 
Raise specialised syntax error for invalid lambda parameters (GH-20776)

(cherry picked from commit c6483c989694cfa328dabd45eb191440da54bc68)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years ago[3.9] bpo-34003: Re-add versionchanged entry in csv docs (GH-20657) (GH-20770)
Miss Islington (bot) [Wed, 10 Jun 2020 01:26:36 +0000 (18:26 -0700)] 
[3.9] bpo-34003: Re-add versionchanged entry in csv docs (GH-20657) (GH-20770)

Follow-up to GH-8014
(cherry picked from commit 7aed0524d4129766a6032326949ef7f91f6f6dfc)

Co-authored-by: Éric Araujo <merwok@netwok.org>
Automerge-Triggered-By: @merwok
5 years agoPost 3.9.0b3
Łukasz Langa [Tue, 9 Jun 2020 21:35:14 +0000 (23:35 +0200)] 
Post 3.9.0b3

5 years agoPython 3.9.0b3 v3.9.0b3
Łukasz Langa [Tue, 9 Jun 2020 18:52:10 +0000 (20:52 +0200)] 
Python 3.9.0b3

5 years ago[3.9] bpo-40924: Revert "bpo-39791 native hooks for importlib.resources.files (GH...
Łukasz Langa [Tue, 9 Jun 2020 17:50:01 +0000 (19:50 +0200)] 
[3.9] bpo-40924: Revert "bpo-39791 native hooks for importlib.resources.files (GH-20576)" (#20760)

This reverts commit 9cf1be46e3692d565461afd3afa326d124d743dd due to
https://bugs.python.org/issue40924.

5 years agobpo-40684: Fix make install for platlibdir=lib64 (GH-20736)
Miss Islington (bot) [Tue, 9 Jun 2020 13:54:54 +0000 (06:54 -0700)] 
bpo-40684: Fix make install for platlibdir=lib64 (GH-20736)

"make install" now uses the PLATLIBDIR variable for the destination
lib-dynload/ directory when ./configure --with-platlibdir is used.

Update --with-platlibdir comment in configure.
(cherry picked from commit 51ae31e5b93b986e57a7e18e25f981a6ffcdefb7)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agoRemove reference to 3.7 and 3.8 backports. (GH-20754) (#20755)
Miss Islington (bot) [Tue, 9 Jun 2020 08:35:58 +0000 (01:35 -0700)] 
Remove reference to 3.7 and 3.8 backports. (GH-20754) (#20755)

(cherry picked from commit 323188360d61875bd68688ef41711bade298af50)

Authored-by: Stefan Krah <skrah@bytereef.org>
5 years agoPost 3.9.0b2
Łukasz Langa [Tue, 9 Jun 2020 00:23:35 +0000 (02:23 +0200)] 
Post 3.9.0b2

5 years agoMerge tag 'v3.9.0b2' into 3.9
Łukasz Langa [Tue, 9 Jun 2020 00:23:22 +0000 (02:23 +0200)] 
Merge tag 'v3.9.0b2' into 3.9

Python 3.9.0b2

5 years agoMinor improvement to the namedtuple implementation (GH-20741) (GH-20742)
Miss Islington (bot) [Mon, 8 Jun 2020 20:25:48 +0000 (13:25 -0700)] 
Minor improvement to the namedtuple implementation (GH-20741) (GH-20742)

5 years agobpo-24914: mention Python supports multiple paradigms in the FAQ (GH-20658) (GH-20737)
Miss Islington (bot) [Mon, 8 Jun 2020 18:53:36 +0000 (11:53 -0700)] 
bpo-24914: mention Python supports multiple paradigms in the FAQ (GH-20658) (GH-20737)

(cherry picked from commit 3ab3475c42c8ee5580f4ea1aeda73ebc8e5d5478)

Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Brett Cannon <brett@python.org>
5 years agoPython 3.9.0b2 v3.9.0b2
Łukasz Langa [Mon, 8 Jun 2020 18:41:34 +0000 (20:41 +0200)] 
Python 3.9.0b2

5 years agoAdd multicore support to deccheck.py. (GH-20731)
Miss Islington (bot) [Mon, 8 Jun 2020 17:55:13 +0000 (10:55 -0700)] 
Add multicore support to deccheck.py. (GH-20731)

(cherry picked from commit 951d680d56d8c32556437a86f6b42f221635b97f)

Authored-by: Stefan Krah <skrah@bytereef.org>
5 years agoRemove deleted libmpdec header from the Visual Studio build machinery. (GH-20730)
Miss Islington (bot) [Mon, 8 Jun 2020 17:51:06 +0000 (10:51 -0700)] 
Remove deleted libmpdec header from the Visual Studio build machinery. (GH-20730)

(cherry picked from commit 0c59f440f4c9dca658e6b18db14b67b750e25a87)

Authored-by: Stefan Krah <skrah@bytereef.org>
5 years agobpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var (GH-20605...
Victor Stinner [Mon, 8 Jun 2020 17:36:13 +0000 (19:36 +0200)] 
bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var (GH-20605) (GH-20725)

(cherry picked from commit 8f023a2f664f902a3d0b7a6f64d63afc0d1c15ae)

Co-authored-by: Sandro Mani <manisandro@gmail.com>
5 years agobpo-40861: Enable optimizations when building liblzma (GH-20724)
Miss Islington (bot) [Mon, 8 Jun 2020 17:09:01 +0000 (10:09 -0700)] 
bpo-40861: Enable optimizations when building liblzma (GH-20724)

(cherry picked from commit 3a3a30c5a4622e18be9f7e4a239dc9e0d7c8054c)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-40910: Export Py_GetArgcArgv() function (GH-20721) (GH-20723)
Victor Stinner [Mon, 8 Jun 2020 16:44:50 +0000 (18:44 +0200)] 
bpo-40910: Export Py_GetArgcArgv() function (GH-20721) (GH-20723)

Export explicitly the Py_GetArgcArgv() function to the C API and
document the function. Previously, it was exported implicitly which
no longer works since Python is built with -fvisibility=hidden.

* Add PyConfig._orig_argv member.
* Py_InitializeFromConfig() no longer calls _PyConfig_Write() twice.
* PyConfig_Read() no longer initializes Py_GetArgcArgv(): it is now
  _PyConfig_Write() responsibility.
* _PyConfig_Write() result type becomes PyStatus instead of void.
* Write an unit test on Py_GetArgcArgv().

(cherry picked from commit e81f6e687d0f04a45f2389d0b43fafd6d8491624)

5 years agobpo-33187: Document 3.9 changes to xml.etree.ElementInclude.include (GH-20438)
Miss Islington (bot) [Mon, 8 Jun 2020 14:47:46 +0000 (07:47 -0700)] 
bpo-33187: Document 3.9 changes to xml.etree.ElementInclude.include (GH-20438)

Looks like the merging of bpo-33187 and bpo-20928 was racy, resulting in
this change going undocumented.
(cherry picked from commit 301f0d4ff9b6bd60599eea0612904f65a92e6dd9)

Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
5 years agoUpdate macOS installer welcome files for 3.9.0 beta (GH-20719)
Ned Deily [Mon, 8 Jun 2020 12:47:27 +0000 (08:47 -0400)] 
Update macOS installer welcome files for 3.9.0 beta (GH-20719)

5 years ago[3.9] Remove PEG-specific syntax error check in the old parser (GH-20717)
Pablo Galindo [Mon, 8 Jun 2020 10:27:58 +0000 (11:27 +0100)] 
[3.9] Remove PEG-specific syntax error check in the old parser (GH-20717)

5 years agobpo-40903: Handle multiple '=' in invalid assignment rules in the PEG parser (GH...
Miss Islington (bot) [Mon, 8 Jun 2020 09:22:06 +0000 (02:22 -0700)] 
bpo-40903: Handle multiple '=' in invalid assignment rules in the PEG parser (GH-20697)

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 9f495908c5bd3645ed1af82d7bae6782720dab77)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agoallow macOS installer builds to package pre-built html docs (GH-20715)
Miss Islington (bot) [Mon, 8 Jun 2020 08:11:43 +0000 (01:11 -0700)] 
allow macOS installer builds to package pre-built html docs (GH-20715)

build-installer now looks in its directory of source tarballs
for a suitable html tarball of the same version.  If so, it
will unpack and use it rather than rebuilding the html format
documentation set from the source repo.  This is intended as
a speedup for test builds of the installer.  Files names must
be in the same format as produced by the docs build for download,
for example, `python-3.9.0b1-docs-html.tar.bz2`.
(cherry picked from commit 63fc55b2eab0331465605a49bfd28a1bcb997f92)

Co-authored-by: Ned Deily <nad@python.org>
5 years agoDeny eval() direct access to builtins (GH-20713) (GH-20714)
Miss Islington (bot) [Mon, 8 Jun 2020 07:19:27 +0000 (00:19 -0700)] 
Deny eval() direct access to builtins (GH-20713) (GH-20714)

5 years agobpo-22021: Update root_dir and base_dir documentation in shutil (GH-10367)
Miss Islington (bot) [Mon, 8 Jun 2020 05:08:14 +0000 (22:08 -0700)] 
bpo-22021: Update root_dir and base_dir documentation in shutil (GH-10367)

Also added an example in shutil in order to make more clear how they are to be used.

Initially reported by Weinan Li on bpo.
(cherry picked from commit 7633371dace67aaa21eb4b86f889441571ec4167)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
5 years agobpo-40741: Update macOS installer to use SQLite 3.32.2. (GH-20705)
Miss Islington (bot) [Mon, 8 Jun 2020 02:43:11 +0000 (19:43 -0700)] 
bpo-40741: Update macOS installer to use SQLite 3.32.2. (GH-20705)

(cherry picked from commit 37eed5a9ee7c802e7151ee9939ed604032886639)

Co-authored-by: Ned Deily <nad@python.org>
5 years agobpo-39791 native hooks for importlib.resources.files (GH-20576)
Miss Islington (bot) [Mon, 8 Jun 2020 01:30:08 +0000 (18:30 -0700)] 
bpo-39791 native hooks for importlib.resources.files (GH-20576)

* Provide native .files support on SourceFileLoader.

* Add native importlib.resources.files() support to zipimporter. Remove fallback support.

* make regen-all

* 📜🤖 Added by blurb_it.

* Move 'files' into the ResourceReader so it can carry the relevant module name context.

* Create 'importlib.readers' module and add FileReader to it.

* Add zip reader and rely on it for a TraversableResources object on zipimporter.

* Remove TraversableAdapter, no longer needed.

* Update blurb.

* Replace backslashes with forward slashes.

* Incorporate changes from importlib_metadata 2.0, finalizing the interface for extension via get_resource_reader.

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

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 years agobpo-40904: Fix segfault in the new parser with f-string containing yield statements...
Miss Islington (bot) [Mon, 8 Jun 2020 01:08:53 +0000 (18:08 -0700)] 
bpo-40904: Fix segfault in the new parser with f-string containing yield statements with no value (GH-20701)

(cherry picked from commit 972ab0327675e695373fc6272d5ac24e187579ad)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-39791: Support file systems that cannot support non-ascii filenames (skipping...
Miss Islington (bot) [Sun, 7 Jun 2020 15:17:45 +0000 (08:17 -0700)] 
bpo-39791: Support file systems that cannot support non-ascii filenames (skipping tests in that case). (GH-20681)

(cherry picked from commit 2efe18bf277dd0f38a1d248ae6bdd30947c26880)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 years agobpo-40724: Fix return type of test helper function heapctypewithbuffer_releasebuffer...
Miss Islington (bot) [Sun, 7 Jun 2020 07:28:03 +0000 (00:28 -0700)] 
bpo-40724: Fix return type of test helper function heapctypewithbuffer_releasebuffer() (GH-20685) (GH-20690)

(cherry picked from commit b8867e5d5aca33511942632b5f4e359b9245b2fa)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
5 years agobpo-40724: Support setting buffer slots from type specs (GH-20648) (GH-20683)
Miss Islington (bot) [Sun, 7 Jun 2020 07:06:40 +0000 (00:06 -0700)] 
bpo-40724: Support setting buffer slots from type specs (GH-20648) (GH-20683)

This is not part of the limited API but makes the buffer slots available for type specs.
(cherry picked from commit f7c4e236429606e1c982cacf24e10fc86ef4462f)

5 years agobpo-40870: Invalidate usage of some constants with ast.Name (GH-20649)
Miss Islington (bot) [Sat, 6 Jun 2020 17:04:38 +0000 (10:04 -0700)] 
bpo-40870: Invalidate usage of some constants with ast.Name (GH-20649)

(cherry picked from commit 68874a8502da440a1dc4746cf73262648b870aee)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
5 years agoRefactor scripts in Tools/peg_generator/scripts (GH-20401)
Miss Islington (bot) [Sat, 6 Jun 2020 04:41:12 +0000 (21:41 -0700)] 
Refactor scripts in Tools/peg_generator/scripts (GH-20401)

(cherry picked from commit ba6fd87e41dceb01dcdacc57c722aca12cde42a9)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
5 years agobpo-40862: Raise TypeError when const is given to argparse.BooleanOptionalAction...
Miss Islington (bot) [Sat, 6 Jun 2020 02:31:18 +0000 (19:31 -0700)] 
bpo-40862: Raise TypeError when const is given to argparse.BooleanOptionalAction (GH-20623) (GH-20664)

5 years agobpo-40880: Fix invalid read in newline_in_string in pegen.c (GH-20666)
Miss Islington (bot) [Sat, 6 Jun 2020 00:13:14 +0000 (17:13 -0700)] 
bpo-40880: Fix invalid read in newline_in_string in pegen.c (GH-20666)

* bpo-40880: Fix invalid read in newline_in_string in pegen.c

* Update Parser/pegen/pegen.c

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* Add NEWS entry

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
(cherry picked from commit 2e6593db0086004a1ca7f7049218ff9573d473c2)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-40883: Fix memory leak in fstring_compile_expr in parse_string.c (GH-20667)
Miss Islington (bot) [Sat, 6 Jun 2020 00:10:57 +0000 (17:10 -0700)] 
bpo-40883: Fix memory leak in fstring_compile_expr in parse_string.c (GH-20667)

(cherry picked from commit a54096e30523534e8eebb8dc1011b4536ed237a8)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-39791: Refresh importlib.metadata from importlib_metadata 1.6.1. (GH-20659) ...
Miss Islington (bot) [Fri, 5 Jun 2020 21:46:24 +0000 (14:46 -0700)] 
bpo-39791: Refresh importlib.metadata from importlib_metadata 1.6.1. (GH-20659) (GH-20661)

* Refresh importlib.metadata from importlib_metadata 1.6.1.

* 📜🤖 Added by blurb_it.

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

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 years agoFix missing FloatOperation in EXTRA_FUNCTIONALITY path. (GH-20655) (#20660)
Miss Islington (bot) [Fri, 5 Jun 2020 20:22:49 +0000 (13:22 -0700)] 
Fix missing FloatOperation in EXTRA_FUNCTIONALITY path. (GH-20655) (#20660)

(cherry picked from commit 5fe1df1886e2e53b04bf76ef916857271d3c8f20)

Authored-by: Stefan Krah <skrah@bytereef.org>
5 years agobpo-40874: Update to libmpdec-2.5.0 (GH-20652)
Miss Islington (bot) [Fri, 5 Jun 2020 19:41:17 +0000 (12:41 -0700)] 
bpo-40874: Update to libmpdec-2.5.0 (GH-20652)

(cherry picked from commit 087d612efebe7c64e5f079b07e0454111859830e)

Authored-by: Stefan Krah <skrah@bytereef.org>
5 years agobpo-40807: Show warnings once from codeop._maybe_compile (GH-20486)
Miss Islington (bot) [Thu, 4 Jun 2020 23:59:44 +0000 (16:59 -0700)] 
bpo-40807: Show warnings once from codeop._maybe_compile (GH-20486)

* bpo-40807: Show warnings once from codeop._maybe_compile

* Move catch_warnings

* news

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

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
5 years agobpo-40865: Remove unused insint() macro from hash modules (GH-20627)
Miss Islington (bot) [Thu, 4 Jun 2020 20:27:23 +0000 (13:27 -0700)] 
bpo-40865: Remove unused insint() macro from hash modules (GH-20627)

Automerge-Triggered-By: @tiran
(cherry picked from commit 6ed578f6dbffdec94f62cc2e36d626fc195678d7)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
5 years agoFix spacing in docs for tarfile (GH-20629)
Miss Islington (bot) [Thu, 4 Jun 2020 20:19:33 +0000 (13:19 -0700)] 
Fix spacing in docs for tarfile (GH-20629)

Before
```
content.txt is 42 bytes in size and isa regular file.
folder is 420 bytes in size and isa directory.
magic is 4200 bytes in size and issomething else.
```

After:
```
content.txt is 42 bytes in size and is a regular file.
folder is 420 bytes in size and is a directory.
magic is 4200 bytes in size and is something else.
```

Automerge-Triggered-By: @orsenthil
(cherry picked from commit 7a280197f4162e5fcdde6f34701a9fa6e669190d)

Co-authored-by: Harsha Laxman <HarshaLaxman@users.noreply.github.com>
5 years agobpo-17258: Add requires_hashdigest to multiprocessing tests (GH-20412)
Miss Islington (bot) [Thu, 4 Jun 2020 17:22:36 +0000 (10:22 -0700)] 
bpo-17258: Add requires_hashdigest to multiprocessing tests (GH-20412)

Skip some :mod:`multiprocessing` tests when MD5 hash digest is blocked.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit b022e5cffbd3ff51ae361cf80f2a3b660be8b1ee)

Co-authored-by: Christian Heimes <christian@python.org>
5 years ago[3.9] bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578) (GH-20618)
Victor Stinner [Wed, 3 Jun 2020 18:16:39 +0000 (20:16 +0200)] 
[3.9] bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578) (GH-20618)

* bpo-40826: Add _Py_EnsureTstateNotNULL() macro (GH-20571)

Add _Py_EnsureTstateNotNULL(tstate) macro: call Py_FatalError() if
tstate is NULL, the error message contains the current function name.

(cherry picked from commit 3026cad59b87751a9215111776cac8e819458fce)

* bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578)

PyOS_InterruptOccurred() now fails with a fatal error if it is called
with the GIL released.

(cherry picked from commit cbe129692293251e7fbcea9ff0d822824d90c140)

5 years ago[3.9] bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20613)
Victor Stinner [Wed, 3 Jun 2020 15:49:25 +0000 (17:49 +0200)] 
[3.9] bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20613)

* bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20579)

Fix GIL usage in PyOS_Readline(): lock the GIL to set an exception.

Pass tstate to my_fgets() and _PyOS_WindowsConsoleReadline(). Cleanup
these functions.

(cherry picked from commit c353764fd564e401cf47a5d9efab18c72c60014e)

* bpo-40826: Add _PyOS_InterruptOccurred(tstate) function (GH-20599)

my_fgets() now calls _PyOS_InterruptOccurred(tstate) to check for
pending signals, rather calling PyOS_InterruptOccurred().

my_fgets() is called with the GIL released, whereas
PyOS_InterruptOccurred() must be called with the GIL held.

test_repl: use text=True and avoid SuppressCrashReport in
test_multiline_string_parsing().

Fix my_fgets() on Windows: fgets(fp) does crash if fileno(fp) is closed.

(cherry picked from commit fa7ab6aa0f9a4f695e5525db5a113cd21fa93787)

5 years agoUpdate error message in _zoneinfo.py to use f-string (GH-20577)
Miss Islington (bot) [Wed, 3 Jun 2020 15:09:49 +0000 (08:09 -0700)] 
Update error message in _zoneinfo.py to use f-string (GH-20577)

Inline with the rest of the file, updated error message to use f-string.
(cherry picked from commit 5b9fbbabacca0378755fd9cadc4a7cc01a71eaef)

Co-authored-by: aboddie <64019758+aboddie@users.noreply.github.com>
5 years agobpo-40767: Allow pure Wayland to get default XDG web browser (GH-20382)
Miss Islington (bot) [Wed, 3 Jun 2020 13:04:29 +0000 (06:04 -0700)] 
bpo-40767: Allow pure Wayland to get default XDG web browser (GH-20382)

Would be nice to backport to python 3.7+. I don't think it's worth the hassle to backport this all the way down to 3.10. But I'll let the maintainers decide.

This is hard to test because the test setup already includes this [environment variable](https://github.com/python/cpython/blob/master/Lib/test/pythoninfo.pyGH-L292)

Let me know if something doesn't match the PR guidelines. This is my first PR in the python source code.
(cherry picked from commit c822efeda9a0afe87cf3429724732fc8e19a01fb)

Co-authored-by: Jeremy Attali <jeremy.attali@gmail.com>
5 years ago[3.9] Fix MSVC warnings in pythonrun.c (GH-20587) (GH-20592)
Ammar Askar [Wed, 3 Jun 2020 07:34:55 +0000 (07:34 +0000)] 
[3.9] Fix MSVC warnings in pythonrun.c (GH-20587) (GH-20592)

(cherry picked from commit 90d297012b3848454)

5 years agobpo-40241: What's New in Python 3.9: opaque PyGC_Head (GH-20586)
Miss Islington (bot) [Tue, 2 Jun 2020 10:09:28 +0000 (03:09 -0700)] 
bpo-40241: What's New in Python 3.9: opaque PyGC_Head (GH-20586)

(cherry picked from commit 337d3103a2344e1fec75985e85fabcbdedac7d26)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-40244: Remove XLC's support from the noreturn flag (GH-20588)
Miss Islington (bot) [Tue, 2 Jun 2020 08:39:55 +0000 (01:39 -0700)] 
bpo-40244: Remove XLC's support from the noreturn flag (GH-20588)

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 033d10bd21d962a59c6c4fc503092046baa451a1)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
5 years agoEnsure correct version of Sphinx is used for Windows builds (GH-20582)
Miss Islington (bot) [Mon, 1 Jun 2020 21:24:10 +0000 (14:24 -0700)] 
Ensure correct version of Sphinx is used for Windows builds (GH-20582)

(cherry picked from commit fe5dd78182dbf4937bcc2b113ca7526bfad0192b)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years ago[3.9] bpo-40630: Add tracemalloc.reset_peak (GH-20102) (GH-20545)
Huon Wilson [Mon, 1 Jun 2020 17:26:22 +0000 (03:26 +1000)] 
[3.9] bpo-40630: Add tracemalloc.reset_peak (GH-20102) (GH-20545)

* bpo-40630: Add tracemalloc.reset_peak (GH-20102, cherrypick 8b62644)

The reset_peak function sets the peak memory size to the current size,
representing a resetting of that metric. This allows for recording the
peak of specific sections of code, ignoring other code that may have
had a higher peak (since the most recent `tracemalloc.start()` or
tracemalloc.clear_traces()` call).

* Adjust docs to point to 3.9

5 years agoMake sure that keyword arguments are merged into the arguments dictionary when dict...
Miss Islington (bot) [Mon, 1 Jun 2020 16:07:32 +0000 (09:07 -0700)] 
Make sure that keyword arguments are merged into the arguments dictionary when dict unpacking and keyword arguments are interleaved. (GH-20553) (GH-20569)

(cherry picked from commit db64f12e4deda2abbafb6d2bd5c06762fca991ff)

Co-authored-by: Mark Shannon <mark@hotpy.org>
5 years agobpo-40831: Remove an incorrect statement in the Windows docs (GH-20570)
Miss Islington (bot) [Mon, 1 Jun 2020 15:53:27 +0000 (08:53 -0700)] 
bpo-40831: Remove an incorrect statement in the Windows docs (GH-20570)

(cherry picked from commit c8966667bbdb284c3780ef6cec8a3870935a6bb7)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-30008: Fix OpenSSL no-deprecated compilation (GH-20397)
Miss Islington (bot) [Mon, 1 Jun 2020 07:18:39 +0000 (00:18 -0700)] 
bpo-30008: Fix OpenSSL no-deprecated compilation (GH-20397)

Fix :mod:`ssl`` code to be compatible with OpenSSL 1.1.x builds that use
``no-deprecated`` and ``--api=1.1.0``.

Note: Tests assume full OpenSSL API and fail with limited API.

Signed-off-by: Christian Heimes <christian@python.org>
Co-authored-by: Mark Wright <gienah@gentoo.org>
(cherry picked from commit a871f692b4a2e6c7d45579693e787edc0af1a02c)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-17005: Move topological sort functionality to its own module (GH-20558)
Miss Islington (bot) [Mon, 1 Jun 2020 00:01:37 +0000 (17:01 -0700)] 
bpo-17005: Move topological sort functionality to its own module (GH-20558)

The topological sort functionality that was introduced initially in the
functools module has been moved to a new graphlib module to
better accommodate the new tools and keep the original scope of the
functools module.
(cherry picked from commit 2f172d8f1525defe9bba4d49e967fdfc69151731)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agoFix typo in "What's new in Python 3.9" (GH-20559)
Miss Islington (bot) [Sun, 31 May 2020 23:35:24 +0000 (16:35 -0700)] 
Fix typo in "What's new in Python 3.9" (GH-20559)

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 491a3d3a75b656c8317d8ce343aea767978b946c)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
5 years agobpo-40759: Deprecate the symbol module (GH-20364)
Miss Islington (bot) [Sun, 31 May 2020 22:23:29 +0000 (15:23 -0700)] 
bpo-40759: Deprecate the symbol module (GH-20364)

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

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
5 years agoFix asyncio.to_thread() documented return type (GH-20547)
Miss Islington (bot) [Sun, 31 May 2020 07:26:20 +0000 (00:26 -0700)] 
Fix asyncio.to_thread() documented return type (GH-20547)

When I wrote the documentation for `asyncio.to_thread()`, I mistakenly assumed that `return await loop.run_in_executor(...)` within an async def function would return a Future. In reality, it returns a coroutine.

This likely won't affect typical usage of `asyncio.to_thread()`, but it's important for the documentation to be correct here. In general, we also tend to avoid returning futures from high-level APIs in asyncio.
(cherry picked from commit 2b201369b435a4266bda5b895e3b615dbe28ea6e)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
5 years agobpo-40829: Add a what's new entry about deprecation of shuffle's random parameter...
Miss Islington (bot) [Sat, 30 May 2020 22:33:06 +0000 (15:33 -0700)] 
bpo-40829: Add a what's new entry about deprecation of shuffle's random parameter (GH-20541) (GH-20544)

5 years agobpo-40798: Generate a different message for already removed elements (GH-20483)
Miss Islington (bot) [Sat, 30 May 2020 07:54:28 +0000 (00:54 -0700)] 
bpo-40798: Generate a different message for already removed elements (GH-20483)

(cherry picked from commit 735d902b363b759df9ff00e58bbf4f7e2bde78cd)

Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
5 years agocloses bpo-29017: Update the bindings for Qt information with PySide2 (GH-20149)
Miss Islington (bot) [Sat, 30 May 2020 02:04:25 +0000 (19:04 -0700)] 
closes bpo-29017: Update the bindings for Qt information with PySide2 (GH-20149)

Reference to PySide has been removed has it is for Qt 4, which has reached end of life.
(cherry picked from commit 4649202ea75d48e1496e99911709824ca2d3170e)

Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
5 years agobpo-39885: Make IDLE context menu cut and copy work again (GH-18951)
Miss Islington (bot) [Fri, 29 May 2020 23:13:21 +0000 (16:13 -0700)] 
bpo-39885: Make IDLE context menu cut and copy work again (GH-18951)

Leave selection when right click within.  This exception to clearing selections when right-clicking was omitted from the previous commit, 4ca060d.  I did not realize that this completely disabled the context menu entries, and  I should have merged a minimal fix immediately.  An automated test should follow.
(cherry picked from commit 97e4e0f53d6690db6b942678489716a30925b8af)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agoFurther de-linting of zoneinfo module (GH-20499)
Miss Islington (bot) [Fri, 29 May 2020 13:53:52 +0000 (06:53 -0700)] 
Further de-linting of zoneinfo module (GH-20499)

* Remove unused imports in zoneinfo

* Remove unused variables in zoneinfo

* Remove else after raise
(cherry picked from commit 364b5ead1584583db91ef7f9d9f87f01bfbb5774)

Co-authored-by: Paul Ganssle <paul@ganssle.io>
5 years agobpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (GH-20435) (GH-20514)
Miss Islington (bot) [Fri, 29 May 2020 13:46:54 +0000 (06:46 -0700)] 
bpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (GH-20435) (GH-20514)

* Fix failure of _Py_dg_dtoa to remove trailing zeros

* Add regression test and news entry

* Add explanation about why it's safe to strip trailing zeros

* Make code safer, clean up comments, add change note at top of file

* Nitpick: avoid implicit int-to-float conversion in tests
(cherry picked from commit 895c9c1d438367722f74f437fda96767d770662b)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
5 years agobpo-40784: Fix sqlite3 deterministic test (GH-20448)
Miss Islington (bot) [Fri, 29 May 2020 12:46:52 +0000 (05:46 -0700)] 
bpo-40784: Fix sqlite3 deterministic test (GH-20448)

(cherry picked from commit c610d970f5373b143bf5f5900d4645e6a90fb460)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
5 years agobpo-39040: Fix parsing of email mime headers with whitespace between encoded-words...
Miss Islington (bot) [Fri, 29 May 2020 11:43:06 +0000 (04:43 -0700)] 
bpo-39040: Fix parsing of email mime headers with whitespace between encoded-words. (gh-17620)

* bpo-39040: Fix parsing of email headers with encoded-words inside a quoted string.

It is fairly common to find malformed mime headers (especially content-disposition
headers) where the parameter values, instead of being encoded to RFC
standards, are "encoded" by doing RFC 2047 "encoded word" encoding, and
then enclosing the whole thing in quotes.  The processing of these malformed
headers was incorrectly leaving the spaces between encoded words in the decoded
text (whitespace between adjacent encoded words is supposed to be stripped on
decoding).  This changeset fixes the encoded word processing inside quoted strings
(bare-quoted-string) to do correct RFC 2047 decoding by stripping that
whitespace.
(cherry picked from commit 21017ed904f734be9f195ae1274eb81426a9e776)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
5 years agoIndicate that abs() method accept argument that implement __abs__(), just like call...
Miss Islington (bot) [Fri, 29 May 2020 11:42:40 +0000 (04:42 -0700)] 
Indicate that abs() method accept argument that implement __abs__(), just like call() method in the docs (GH-20509)

(cherry picked from commit 28316422124206f63ddd4b91f2e19c54b6e9cd9d)

Co-authored-by: Windson yang <wiwindson@outlook.com>