107431 Commits

Author SHA1 Message Date
Łukasz Langa
b484871ba7
Python 3.9.0b3 v3.9.0b3 2020-06-09 20:52:10 +02:00
Łukasz Langa
ce5e6f098f
[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.
2020-06-09 19:50:01 +02:00
Miss Islington (bot)
6cb24a035c
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>
2020-06-09 06:54:54 -07:00
Miss Islington (bot)
1a819ca187
Remove reference to 3.7 and 3.8 backports. (GH-20754) (#20755)
(cherry picked from commit 323188360d61875bd68688ef41711bade298af50)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-06-09 10:35:58 +02:00
Łukasz Langa
459cb12a29
Post 3.9.0b2 2020-06-09 02:23:35 +02:00
Łukasz Langa
8f1f4161de Python 3.9.0b2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl7etVEACgkQsmmV4xAl
 BWjzUxAAmbCfQsA5KW2o8fyj4R3NOI69juBUHaUmcHp668Ah8wbVjz7cf+uGOJ/1
 TLVMUez3I27BhPRNhjfawH6Xv/xpnAWbCzK7GNpspSlUkY0OXk30We5ddbuz2p8I
 4yff9aHAH1pgkdSz7W51aJrgNfzOhyFL7affDuQraKpUNLJdDXjRjSVGdXRHXXk5
 ft7hTgxDVRL0DNJFFl9DKXlpQ7S6GywfaAEPJj22Gu1nKQRQGx8pa+Z3HtKOtTGq
 x3AoTNQdvaZXxqIfp67gG7S4DMrmMxCT/Sv+IsqoBVTEVKfaH6uGMtxUQJSWhngf
 yY1uARSxYwhbXs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
 eOCINcMPtrMd4zwelzrboPTnb79EpfBYCATOUPOe82KOwNafWOqvZn8hXeVvlgiS
 gmDh5sv1Q7QDiCZSYklka7IcHT5Dj+i4BrOYXACIvOvyOZBBNMwslr6vTxzKkt3q
 FqNsF5Jwhw==
 =X0Xv
 -----END PGP SIGNATURE-----

Merge tag 'v3.9.0b2' into 3.9

Python 3.9.0b2
2020-06-09 02:23:22 +02:00
Miss Islington (bot)
299d3d1c52
Minor improvement to the namedtuple implementation (GH-20741) (GH-20742) 2020-06-08 13:25:48 -07:00
Miss Islington (bot)
b155381314
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>
2020-06-08 11:53:36 -07:00
Łukasz Langa
0b1a1c8c4c
Python 3.9.0b2 v3.9.0b2 2020-06-08 20:41:34 +02:00
Miss Islington (bot)
3dc4428a37
Add multicore support to deccheck.py. (GH-20731)
(cherry picked from commit 951d680d56d8c32556437a86f6b42f221635b97f)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-06-08 19:55:13 +02:00
Miss Islington (bot)
ecdd28c8ff
Remove deleted libmpdec header from the Visual Studio build machinery. (GH-20730)
(cherry picked from commit 0c59f440f4c9dca658e6b18db14b67b750e25a87)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-06-08 19:51:06 +02:00
Victor Stinner
817506432d
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>
2020-06-08 19:36:13 +02:00
Miss Islington (bot)
298c8c895f
bpo-40861: Enable optimizations when building liblzma (GH-20724)
(cherry picked from commit 3a3a30c5a4622e18be9f7e4a239dc9e0d7c8054c)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-06-08 10:09:01 -07:00
Victor Stinner
dedaac040f
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)
2020-06-08 18:44:50 +02:00
Miss Islington (bot)
1220a47079
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>
2020-06-08 07:47:46 -07:00
Ned Deily
60edee8adb
Update macOS installer welcome files for 3.9.0 beta (GH-20719) 2020-06-08 08:47:27 -04:00
Pablo Galindo
2b33cc3a25
[3.9] Remove PEG-specific syntax error check in the old parser (GH-20717) 2020-06-08 11:27:58 +01:00
Miss Islington (bot)
8df4f3942f
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>
2020-06-08 02:22:06 -07:00
Miss Islington (bot)
66605d1572
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>
2020-06-08 01:11:43 -07:00
Miss Islington (bot)
3deded947c
Deny eval() direct access to builtins (GH-20713) (GH-20714) 2020-06-08 00:19:27 -07:00
Miss Islington (bot)
be5ed59e29
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>
2020-06-07 22:08:14 -07:00
Miss Islington (bot)
1e72fb2b78
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>
2020-06-07 19:43:11 -07:00
Miss Islington (bot)
9cf1be46e3
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>
2020-06-07 18:30:08 -07:00
Miss Islington (bot)
6440911736
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>
2020-06-07 18:08:53 -07:00
Miss Islington (bot)
71f501698d
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>
2020-06-07 08:17:45 -07:00
Miss Islington (bot)
1d711f2e31
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>
2020-06-07 09:28:03 +02:00
Miss Islington (bot)
1e4fa91104
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)
2020-06-07 09:06:40 +02:00
Miss Islington (bot)
90ee51f1cd
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>
2020-06-06 10:04:38 -07:00
Miss Islington (bot)
18f1226884
Refactor scripts in Tools/peg_generator/scripts (GH-20401)
(cherry picked from commit ba6fd87e41dceb01dcdacc57c722aca12cde42a9)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2020-06-05 21:41:12 -07:00
Miss Islington (bot)
d5e7348e41
bpo-40862: Raise TypeError when const is given to argparse.BooleanOptionalAction (GH-20623) (GH-20664) 2020-06-05 19:31:18 -07:00
Miss Islington (bot)
15fec5627a
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>
2020-06-05 17:13:14 -07:00
Miss Islington (bot)
79e6c15aed
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>
2020-06-05 17:10:57 -07:00
Miss Islington (bot)
a4fa9a9515
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>
2020-06-05 17:46:24 -04:00
Miss Islington (bot)
cdc3d9cb22
Fix missing FloatOperation in EXTRA_FUNCTIONALITY path. (GH-20655) (#20660)
(cherry picked from commit 5fe1df1886e2e53b04bf76ef916857271d3c8f20)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-06-05 22:22:49 +02:00
Miss Islington (bot)
83bff88b4b
bpo-40874: Update to libmpdec-2.5.0 (GH-20652)
(cherry picked from commit 087d612efebe7c64e5f079b07e0454111859830e)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-06-05 21:41:17 +02:00
Miss Islington (bot)
3dfe549bfa
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>
2020-06-04 16:59:44 -07:00
Miss Islington (bot)
e4e5ec18e2
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>
2020-06-04 13:27:23 -07:00
Miss Islington (bot)
082cff1786
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>
2020-06-04 13:19:33 -07:00
Miss Islington (bot)
196810a98a
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>
2020-06-04 10:22:36 -07:00
Victor Stinner
6d62dc1ea4
[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)
2020-06-03 20:16:39 +02:00
Victor Stinner
5d2396c8cf
[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)
2020-06-03 17:49:25 +02:00
Miss Islington (bot)
a125561397
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>
2020-06-03 08:09:49 -07:00
Miss Islington (bot)
74a1fceeb6
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>
2020-06-03 06:04:29 -07:00
Ammar Askar
20fe5328a3
[3.9] Fix MSVC warnings in pythonrun.c (GH-20587) (GH-20592)
(cherry picked from commit 90d297012b3848454)
2020-06-03 08:34:55 +01:00
Miss Islington (bot)
ff442f36b9
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>
2020-06-02 03:09:28 -07:00
Miss Islington (bot)
50e847a9eb
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>
2020-06-02 01:39:55 -07:00
Miss Islington (bot)
b90b61f231
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>
2020-06-01 14:24:10 -07:00
Huon Wilson
3c7609a23c
[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
2020-06-01 19:26:22 +02:00
Miss Islington (bot)
410b730c20
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>
2020-06-01 17:07:32 +01:00
Miss Islington (bot)
a169961dfc
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>
2020-06-01 08:53:27 -07:00