Commit graph

107844 commits

Author SHA1 Message Date
Karthikeyan Singaravelan
20bdeedfb4
[3.9] bpo-41371: Handle lzma lib import error in test_zoneinfo.py (GH-21734) (GH-22039)
(cherry picked from commit 5f0769a)

Co-authored-by: Nathan M <nathanmaynes@gmail.com>
2020-10-10 10:09:09 +05:30
Miss Skeleton (bot)
1f75fc7a9d
bpo-41831: Restore str implementation of __str__ in tkinter.EventType (GH-22355)
(cherry picked from commit eb38c6b7aa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-09 13:20:48 -07:00
Miss Skeleton (bot)
43c3eafa1b
bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354) (GH-22617)
(cherry picked from commit f25323a307)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-09 22:56:19 +03:00
Batuhan Taskaya
42157b9eaa
[3.9] bpo-41979: Accept star-unpacking on with-item targets (GH-22611) (GH-22612)
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>

Automerge-Triggered-By: @pablogsal
2020-10-09 03:31:07 -07:00
Karthikeyan Singaravelan
c6f41e62f5
[3.9] bpo-41970: Avoid test failure in test_lib2to3 if the module is already imported (GH-22595) (GH-22609)
(cherry picked from commit 4a9f82f50d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-09 11:08:42 +01:00
Miss Skeleton (bot)
3da210b69f
Fix the attribute names in the docstring of GenericAlias (GH-22594)
(cherry picked from commit 77f0a23e7a)

Co-authored-by: Mikhail Golubev <qsolo825@gmail.com>
2020-10-08 15:02:26 -07:00
Miss Skeleton (bot)
089c38677d
bpo-41557: Update Windows installer to use SQLite 3.33.0 (GH-21960)
(cherry picked from commit bfe6e03cd6)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2020-10-08 12:02:33 -07:00
Miss Skeleton (bot)
a4ac5fadf5
bpo-41976: Fix the fallback to gcc of ctypes.util.find_library when using gcc>9 (GH-22598)
(cherry picked from commit 27ac19cca2)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-08 11:55:24 -07:00
Miss Skeleton (bot)
15e091f63f
bpo-41306: Allow scale value to not be rounded (GH-21715)
This fixes the test failure with Tk 6.8.10 which is caused by changes to how Tk rounds the `from`, `to` and `tickinterval` arguments. This PR uses `noconv` if the patchlevel is greater than or equal to 8.6.10 (credit to Serhiy for this idea as it is much simpler than what I previously proposed).

Going into more detail for those who want it, the Tk change was made in [commit 591f68c](591f68cb38) and means that the arguments listed above are rounded relative to the value of `from`. However, when rounding the `from` argument ([line 623](591f68cb38/generic/tkScale.cGH-L623)), it is rounded relative to itself (i.e. rounding `0`) and therefore the assigned value for `from` is always what is given (no matter what values of `from` and `resolution`).

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

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2020-10-08 09:50:36 -07:00
Miss Skeleton (bot)
5b1fdcacfc
bpo-41376: Fix the documentation of site.getusersitepackages() (GH-21602)
`site.getusersitepackages()` returns the location of the user-specific site-packages directory
even when the user-specific site-packages is disabled.

```
$ python -s -m site
sys.path = [
    '/home/user/conda/lib/python37.zip',
    '/home/user/conda/lib/python3.7',
    '/home/user/conda/lib/python3.7/lib-dynload',
    '/home/user/conda/lib/python3.7/site-packages',
]
USER_BASE: '/home/user/.local' (exists)
USER_SITE: '/home/user/.local/lib/python3.7/site-packages' (doesn't exist)
ENABLE_USER_SITE: False
```

It was not practical to prevent the function from returning None if user-specific site-packages are disabled, since there are other uses of the function which are relying on this behaviour (e.g. `python -m site`).
(cherry picked from commit 35f041dd01)

Co-authored-by: Phil Elson <pelson.pub@gmail.com>
2020-10-08 00:00:28 -07:00
Miss Skeleton (bot)
b664a1df4e
bpo-41944: No longer call eval() on content received via HTTP in the CJK codec tests (GH-22566)
(cherry picked from commit 2ef5caa58f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-06 05:37:36 -07:00
Miss Skeleton (bot)
4aad1e5770
bpo-41584: clarify when the reflected method of a binary arithemtic operator is called (GH-22505)
(cherry picked from commit d02d824e05)

Co-authored-by: Brett Cannon <brett@python.org>
2020-10-05 10:05:50 -07:00
Miss Skeleton (bot)
10b4136bfa
bpo-41939: Fix test_site.test_license_exists_at_url() (GH-22559) (#22567)
Call urllib.request.urlcleanup() to reset the global
urllib.request._opener.
(cherry picked from commit 1fce240d6c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-10-05 18:49:41 +02:00
Łukasz Langa
1691435fe7
Post 3.9.0 2020-10-05 18:07:40 +02:00
Łukasz Langa
79dd0dbc32 Python 3.9.0
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl97Nt8ACgkQsmmV4xAl
 BWhFGA//cXN7hkXzURCN2z7GCHaAUm/jnJ+7xta8oVlSjpJT0OjJsxojnc+XpQau
 2bCW2o3uxhiM6qr7N2Vtj7ar2+4x8eTN08i+6phpFcLn8WzfsYQYA7Vc5RDsb8nr
 ty8JBu+xdHsP3RIfBViCotCXOhfEJZwqQnvMeGuwmHPd5w2s1GCbnPuILnWZEDtF
 tpOxJZjEUjd2gEyXKB1q5fCfMJvb73vKBcxVeMM6nbsI9egp6CeIAJC0B2xiBGGw
 8nzfvGiqMcHhBfCwKw3mER5FQQPbVyYbHSDPUm8lgdel/hMZ3dIkg686/bOQXzri
 H3xyb46PGCZNG8I5J1gQD0mcyYfXzYBNUvzlN6xRlyxanPEvX3wH+KeliRqfTQZb
 /GU9fPqrdznvMS7UoXM4R17+qHOtc/CNX53vqMX0aKioq9FZDsfRHPtvAC6zDKtP
 0ibkGU510FUf7Yt5Sh4kSB12RNNXjhBgzVSDmVcite00FYF9vKHxn0WrzTxMdz1q
 SojfQbSZtNThgkpHUbSL61m9Idz3wDTiZcpuhh1awnxEwA3f0+z0qfwdQW9/zk2K
 n56WFoeiZekqARzfqgAHh2r83Nhovcygjsw3yEGbt2ic9sA4QgNt2scih1S+5CU1
 gHVcf6K2a4H4wIHaA7jOaHd8TGhi3T2JcQCiLyCzuBmuLq5cmYI=
 =8PYd
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl97RGkQHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaPSfD/42r7/GmVz61AFqMHlX4tE0G+U+qr4QfjT7
 gnZLXZwruGNaQVYkMHRHMIHcXCNgcUPfSf+PxutxUJHklmjyveTD3Jjp7MLIGf1s
 8d/1Rs37oFBhweUXiCQR2fwnkxilWOXpRzpUk54d19/nMxajnUsktLlwtnWhwnmQ
 dumq1hrRGrgSk9uz0Pb0UyzDguLk0OBRpfEJSrLkv0+9uImZkhBIOLZPNh/lXGA7
 VxILGH16fBtbeqxVVh0pyhdRPwBpsupiu8N4ymrn/UfHzel39AJuKSdagyuo0bFW
 KKP138DdS6rqVR5o38lOGty5/e6pf10PA+9mfLv1n9IATdsE/T9uTV0WICYojcyb
 GixtJZZRysoCPUBQSJvtrBLHQOsb0XiT+b+3aV9XpfPxDfgqiVRdAYN7IUs1vZXU
 I/4l2gq1dlskj+/SG/O/bakBFzOvXqSl4ZYyg7NZd5vseddDQ9emBbJJMGoJnFmM
 Iq7RFM7tuwLwjuz2tMuDOpD3ZZJ4lCOjRWHL1ruI8kpwd8KLb+lsT1FBu7ZSRI9P
 unIzdPAZVg6yIk+aUYNVKmQccNdKab89BfLQU0aRMh2QCY7WYF38Kh3QrEJ2ttKj
 m5ar2DCVd+2qPefLJsoSpwvv0IAOrBHYerVBRLx+idFQaleHJh5y2QSEtBie6NM1
 lVXBBrSoag==
 =cYzo
 -----END PGP SIGNATURE-----

Merge tag 'v3.9.0' into 3.9

Python 3.9.0
2020-10-05 18:05:58 +02:00
Łukasz Langa
9cf6752276
Python 3.9.0 2020-10-05 17:07:58 +02:00
Miss Skeleton (bot)
75dd70e1ce
bpo-41774: Tweak new programming FAQ entry (GH-22562)
Remove mention of space in "remove multiple items from list".
(cherry picked from commit 060937da98)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-10-05 07:53:26 -07:00
Miss Skeleton (bot)
b6d37e15cf
bpo-41557: Update macOS installer to use SQLite 3.33.0 (GH-21959) (GH-22560)
(cherry picked from commit 9a7642667a)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2020-10-05 05:01:51 -04:00
Miss Skeleton (bot)
d5719247ba
bpo-41892: Clarify that an example in the ElementTree docs explicitly avoids modifying an XML tree while iterating over it. (GH-22464) (GH-22554)
(cherry picked from commit 40db798692)

Co-authored-by: scoder <stefan_ml@behnel.de>

Co-authored-by: scoder <stefan_ml@behnel.de>
2020-10-04 19:56:56 -04:00
Serhiy Storchaka
7aa22ba923
[3.9] bpo-41909: Enable previously disabled recursion checks. (GH-22536) (GH-22550)
Enable recursion checks which were disabled when get __bases__ of
non-type objects in issubclass() and isinstance() and when intern
strings. It fixes a stack overflow when getting __bases__ leads
to infinite recursion.

Originally recursion checks was disabled for PyDict_GetItem() which
silences all errors including the one raised in case of detected
recursion and can return incorrect result. But now the code uses
PyDict_GetItemWithError() and PyDict_SetDefault() instead.
(cherry picked from commit 9ece9cd65c)
2020-10-05 01:27:38 +03:00
Miss Skeleton (bot)
f3a6b7fc0b
Typo fix (GH-22496)
Multiple typo fixes in code comments

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

Co-authored-by: Manan Kumar Garg <62146744+MananKGarg@users.noreply.github.com>
2020-10-04 14:51:38 -07:00
Miss Islington (bot)
e8165e79f5
bpo-37062: Enum: add extended AutoNumber example (GH-22349) (GH-22370)
(cherry picked from commit 62e40d8450)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-10-04 19:19:18 +02:00
Miss Islington (bot)
c549527ae2
bpo-41819: Fix compiler warning in init_dump_ascii_wstr() (GH-22332)
Fix the compiler warning:

format specifies type `wint_t` (aka `int`) but the argument has type `unsigned int`
(cherry picked from commit c322948892)

Co-authored-by: Samuel Marks <807580+SamuelMarks@users.noreply.github.com>
2020-10-04 19:17:27 +02:00
Pablo Galindo
168a8383c8
[3.9] bpo-41490: Bump vendored pip to version 20.2.3 (GH-22527). (GH-22544)
(cherry picked from commit 2cc6dc9896)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-04 19:12:34 +02:00
Pablo Galindo
4b4d60f928
[3.9] bpo-41490: Bump vendored pip to version 20.2.3 (GH-22527). (GH-22544)
(cherry picked from commit 2cc6dc9896)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-04 19:11:10 +02:00
Łukasz Langa
c26a666e67
[3.9] bpo-41602: raise SIGINT exit code on KeyboardInterrupt from pymain_run_module (GH-21956) (#22397)
Closes bpo issue 41602.
(cherry picked from commit a68a2ad19c)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2020-10-04 18:40:36 +02:00
Miss Islington (bot)
bd55c46895
bpo-41815: SQLite: segfault if backup called on closed database (GH-22322)
GH- [bpo-41815](): SQLite: fix segfault if backup called on closed database

Attempting to backup a closed database will trigger segfault:

```python
import sqlite3
target = sqlite3.connect(':memory:')
source = sqlite3.connect(':memory:')
source.close()
source.backup(target)
```
(cherry picked from commit bfee9fad84)

Co-authored-by: Peter McCormick <peter@pdmccormick.com>
2020-10-04 18:36:45 +02:00
Pablo Galindo
d6360891b3
Fix a compiler warning in pycore_pylifecycle.h (GH-22331) 2020-10-04 18:35:07 +02:00
Miss Skeleton (bot)
9c2d46ac20
Delete extra 'the' from Formatter class docstring (GH-22530) (GH-22542)
(cherry picked from commit a619af43cc)
2020-10-04 17:31:52 +01:00
Miss Islington (bot)
df71b65a88
bpo-41875: Use __builtin_unreachable when possible (GH-22433)
(cherry picked from commit 24ba3b0df5)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-10-04 18:19:34 +02:00
Miss Skeleton (bot)
faa8c6a8f1
bpo-41898: add caveat on root logger seeing all messages in assertLogs doc (GH-22526) (GH-22540)
(cherry picked from commit 1ed5443526)
2020-10-04 16:38:03 +01:00
Miss Skeleton (bot)
87e94e151c
Typo fix - "mesasge" should be "message" (GH-22498)
* Correct at 2 places in email module
(cherry picked from commit 9cd01ece78)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
2020-10-04 17:33:21 +02:00
Serhiy Storchaka
f093007d4c
[3.9] Remove duplicated words words (GH-22298). (GH-22299)
(cherry picked from commit 27201cddf3)
2020-10-04 17:32:39 +02:00
Serhiy Storchaka
3d87eee300
[3.9] Remove duplicated words words (GH-20413). (GH-22296)
(cherry picked from commit 1c5d1d7304)
2020-10-04 17:32:39 +02:00
Miss Skeleton (bot)
fd510e365e
[doc] Use list[int] instead of List[int] (etc.) in a few more places (GH-22524)
This changes a few occurrences left behind by GH-22340.

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 7f54e563dc)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-10-04 17:30:50 +02:00
Miss Skeleton (bot)
d96078b5e4
[doc] Fix link to abc.collections.Iterable (GH-22520)
Missed this occurrence before, sorry. Also changed "the PEP" to "PEP".

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 3fe6148937)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-10-04 17:30:49 +02:00
Miss Skeleton (bot)
faaa303922
[3.9] bpo-41867: List options for timespec in docstrings of isoformat methods (GH-22418)
(cherry picked from commit 52301312bb)

Co-authored-by: Ram Rachum <ram@rachum.com>
2020-10-04 17:30:49 +02:00
Miss Skeleton (bot)
5533c4952c
[3.9] bpo-40833: Clarify Path.rename doc-string regarding relative paths (GH-20554)
(cherry picked from commit f97e42ef4d)

Co-authored-by: Ram Rachum <ram@rachum.com>
2020-10-04 17:30:49 +02:00
Miss Skeleton (bot)
fd3d00adb0
[doc] Fix link to abc.collections.Iterable (GH-22502)
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit d4b9edd505)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-10-04 17:30:49 +02:00
Miss Islington (bot)
95de3627f1
bpo-41802: Document 'PyDict_DelItem' can raise a 'KeyError' (GH-22291)
(cherry picked from commit 20ce62f009)

Co-authored-by: Campbell Barton <ideasman42@gmail.com>
2020-10-04 17:30:49 +02:00
Miss Islington (bot)
5711c815f5
Fix grammar in secrets module documentation (GH-22467)
From `In particularly,` to `In particular,`
(cherry picked from commit 63298930fb)

Co-authored-by: Max Smolens <msmolens@users.noreply.github.com>
2020-10-04 17:30:48 +02:00
Miss Islington (bot)
900b9851ff
[doc] Leverage the fact that the actual types can now be indexed for typing (GH-22340)
This shows users that they can use the actual types. Using deprecated types is confusing.

This also prefers colections.abc.Sized instead of the alias typing.Sized. I guess the aliases were created to make it convenient to import all collections related types from the same place.

This should be backported to 3.9.

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit d9ab95ff1f)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-10-04 17:30:48 +02:00
Miss Islington (bot)
a5750cf434
bpo-41858: Clarify line in optparse doc (GH-22407)
The existing line is easily read as being incomplete.
(cherry picked from commit 00eb063b66)

Co-authored-by: Emmanuel Arias <eamanu@yaerobi.com>
2020-10-04 17:30:48 +02:00
Miss Islington (bot)
7e21aab45d
bpo-41844: Add IDLE section to What's New 3.9 (GN-22382)
(cherry picked from commit 22b7616f26)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-10-04 17:30:48 +02:00
Victor Stinner
f8b3c64958
bpo-35293: Travis CI uses "make venv" for the doc (GH-22307) (GH-22309)
Doc/requirements.txt becomes the reference for packages and package
versions needed to build the Python documentation.

* Doc/Makefile now uses Doc/requirements.txt
* .travis.yml now uses "make env" of Doc/Makefile
* Update Sphinx to version 2.4.4

(cherry picked from commit 8394500cca)
2020-10-04 17:30:48 +02:00
Miss Islington (bot)
e5cc5fd89c
bpo-41762: Fix usage of productionlist markup in the doc (GH-22281)
Use an unique identifier for the different grammars documented using
the Sphinx productionlist markup.

productionlist markups of the same grammar, like "expressions" or
"compound statements", use the same identifier "python-grammar".
(cherry picked from commit 8af239eacf)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-10-04 17:30:47 +02:00
Terry Jan Reedy
8dd430265c
[3.9] bpo-27032, bpo-37328: Document removing HTMLParser.unescape() (GH-22288)
(cherry picked from commit a33f2c2bae)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-04 17:30:47 +02:00
Miss Skeleton (bot)
5f9a08d95f
[doc] Use list[int] instead of List[int] (etc.) in a few more places (GH-22524)
This changes a few occurrences left behind by GH-22340.

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 7f54e563dc)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-10-03 15:33:30 -07:00
Pablo Galindo
7b7aa94e51
[3.9] bpo-41840: Report module-level globals as both local and global in the symtable module (GH-22391). (GH-22528)
(cherry picked from commit fb0a4651f1)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-03 21:23:03 +01:00
Miss Skeleton (bot)
e89253756c
[doc] Fix link to abc.collections.Iterable (GH-22520)
Missed this occurrence before, sorry. Also changed "the PEP" to "PEP".

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 3fe6148937)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-10-03 09:13:14 -07:00