Commit graph

108377 commits

Author SHA1 Message Date
Łukasz Langa
9350cc02f8
Post 3.9.3 2021-04-02 19:39:11 +02:00
Łukasz Langa
fbd4e58f63 Python 3.9.3
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAmBm6VQACgkQsmmV4xAl
 BWiEWg/6A9IMEpPRP1GbCuyCjLQksZ2E/dNCvO+80z+DiVsyKVkH40JGisSmuYlo
 JAmU8I316iDhkNbKZ7df7hqP3VRbkR4Sf23pmd3j75sN3jsAkEhqOrAVwZWPN2wi
 ipGwntIzuQ9xjCLcHbn0JP7jJhbcHX/R+QFmDHWx0UCgeML4jIggY2k36+DuWUnL
 dJAMJnmhK+GL5twTo4aWpXx2p7t82aHWZina1F3Zxsdm/oi9Kdng5yr65Plw0h27
 AdV6JpJhzSGZE/g0EKBMRx1oEbFYrub0Ki4vtwWnICLOimIR6pxFO+ntJnIz4I0F
 ESdojHPhTeZPWbLSTW1RMpJzsjjSX/rS0aJ2aGjVQFHEbIKpTPS6PbRddZitzQD9
 Fk+3ZpJBBiTf5tHv1YrxZJgEfGQ7qX58oGyR+ukO+VKvdOPYh3rWO1RP0Jt/b39g
 4wWbJ/KJfiylmr7Q1toYrCYuGhyrYQQdRh1rc6aHF2gFkzdoygMEFQs118Zh6qGC
 /XdQvpPNvoLkQGAk0dm4MfmuTU+5nIkrf1ptleEXd4kjvxaAExyXKHCvA+55hIJt
 0bEVb0jBqzUDQ8oR9sCqH00av31h0A5XmuMvZ9VjzVtwmunJjzs3wk30P9vgT5Fw
 sgWV8bpyr8NH9O6Dx0QgT6KrKXN7jWOhh0gAXPlG2GZqKPUUzpM=
 =fyCu
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAmBnVrMQHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaBXrD/4xutr97e/fp8LAdR2FvFDHK5+yOwTNFbPA
 Zqn/U5Sq0wAZvpEyCPcF0wV++Pt+yzEsY1OYQOynW504QdicUIflrSR3nx+8W7Wc
 FCEOtIIZ0nICteMVgx7HuxuVmojrCAvBXzsf68vy0hZY96WBL+VkiZAK13JQIeHh
 c+HqoAh3Z5NB5SXBk4GgKBxG91bJsj0zbsUIlKeeFV0dz3M+LJvRWZO0IgwDL8bU
 3QTZ6cfzqRIBfkx2FROC9bYoOZQ2yrdtvZGURKYDTjbDSXSWfnEu97Jox5wScYCO
 h3qbemgeyRZueBEFANK/A1BbkLyf3gpJQYQ1FnFD0Z9EkveCP/gcVx7QzyeUUt4l
 WAWxS4O7Li59Bn8BcFczt53/ks4ZtIdRgWEdIeMI7NREQgM/3139XTlgEZ04OUKi
 ch+1f+81khgWSc1GLPR9wbnU7YdvGEEk9j1h5PiOhZ/+JWsgQil1FLKb67fU1zDI
 mNdGdF3dzkM6THc7yOaAr5IcUZ5JCCEAX3TkZBRDAg31IhZrnZtGKw04kX5R9JBY
 R5ZIqNddBT9/RQFLCGtKVP+8QxTiWwZP2wP1ygXiJFS0UAtnMIdBR79FvSSgxsNK
 DLAkCkX0u1WYH6oU2h5L/tPQrYYf6h8nXrA+zURl/0Q3MZRcxx0B1IG9FtLl0zvt
 M7Tl8eRobg==
 =t2Mf
 -----END PGP SIGNATURE-----

Merge tag 'v3.9.3' into 3.9

Python 3.9.3
2021-04-02 19:38:57 +02:00
Irit Katriel
7ad56e2545
[3.9] bpo-26053: Fix args echoed by pdb run command (GH-25149)
* bpo-26053: Fix args echoed by pdb run command (GH-22033)

(cherry picked from commit 652bfdee94)

* bpo-26053: Fix test_pdb.test_issue26053() (GH-25139)

(cherry picked from commit bd4ab8e739)
2021-04-02 13:16:55 +02:00
Łukasz Langa
e723086bc3
Python 3.9.3 2021-04-02 11:51:53 +02:00
Miss Islington (bot)
a217e0ab98
bpo-43700: Replace Zulip badge with Discourse badge (GH-25141)
Automerge-Triggered-By: GH:zware
(cherry picked from commit bef7b26f72)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-04-01 20:58:07 -07:00
Miss Islington (bot)
d104a786ff
bpo-43677: Fix a minor error in Doc/howto/descriptor.rst (GH-25123) (#25140) 2021-04-01 17:06:30 -07:00
Miss Islington (bot)
244fa236e4
Doc: io: Remove "In-memory streams" section (GH-24927)
(cherry picked from commit b045cdaf34)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2021-04-01 15:11:49 +09:00
Miss Islington (bot)
b3c1e2c493
bpo-42840: Document providing kwargs to type. (GH-24173)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 72fcd14a82)

Co-authored-by: Erik Soma <stillusingirc@gmail.com>
2021-03-31 17:10:36 -07:00
Miss Islington (bot)
fabdd25fe5
bpo-37945: Fix test_locale.test_getsetlocale_issue1813() (GH-25110) (GH-25112)
Skip the test if setlocale() fails.
(cherry picked from commit f3ab670fea)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-03-31 13:52:14 +02:00
Miss Islington (bot)
84694c3e7a
bpo-42225: IDLE - document two unix-related problems. (GH-25078)
1. Bad IP masquerade rules can prevent startup.
2. X cannot handle some complex colored chars.
(cherry picked from commit 1b4a9c7956)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-03-30 22:44:26 -07:00
Miss Islington (bot)
b500bd8e67
bpo-43399: Fix ElementTree.extend not working on iterators (GH-24751)
(cherry picked from commit 51a85ddce8)

Co-authored-by: Alex Prengère <2138730+alexprengere@users.noreply.github.com>
2021-03-30 14:36:25 -07:00
Christian Heimes
cd82d59206
[3.9] bpo-43631: Update to OpenSSL 1.1.1k (GH-25024) (GH-25088)
Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: GH:tiran.
(cherry picked from commit a54fc683f2)

Co-authored-by: Christian Heimes <christian@python.org>
2021-03-30 01:58:06 -07:00
Miss Islington (bot)
f79577ddbd
bpo-43637: Fix a possible memory leak in winreg.SetValueEx() (GH-25038)
(cherry picked from commit dfeec347f2)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2021-03-30 00:51:55 -07:00
Miss Islington (bot)
05429c917c
bpo-33164: blake2: Fix Coverity scan (GH-25060)
(cherry picked from commit 068ebf9729)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2021-03-29 21:36:39 -07:00
Miss Islington (bot)
ff4715a733
bpo-43660: Fix crash when displaying exceptions with custom values for sys.stderr (GH-25075) (GH-25083)
(cherry picked from commit 09b90a037d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-03-30 00:24:33 +01:00
Miss Islington (bot)
acb584958e
bpo-43562: fix test_ssl to skip on unreachable network (GH-24937) (GH-25046)
This test checks result code of the connection directly, so it never raises an exception that can be suppressed by `support.transient_internet`. Directly support skipping the test in case of unreachable network.
(cherry picked from commit 29c451c698)

Co-authored-by: Carl Meyer <carl@oddbird.net>

Co-authored-by: Carl Meyer <carl@oddbird.net>
2021-03-29 21:37:32 +02:00
Miss Islington (bot)
f1d53bcd53
bpo-43659: Fix test_curses on AIX (GH-25074)
curses.update_lines_cols() is only defined when the curses library
provides either resizeterm() or resize_term() functions which are optional
and are not provided on AIX.
(cherry picked from commit c8b5738810)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
2021-03-29 12:31:01 -07:00
Miss Islington (bot)
d914813a7a
bpo-35930: Raising an exception raised in a "future" instance will create reference cycles (GH-24995) (#25070)
Before: 0c14bc58/attachment-0002.png

After: 0c14bc58/attachment-0003.png
(cherry picked from commit 32430aadad)

Co-authored-by: Jesús Cea <jcea@jcea.es>

Co-authored-by: Jesús Cea <jcea@jcea.es>
2021-03-29 19:53:54 +02:00
Miss Islington (bot)
5334605035
bpo-43433: Preserve query and fragment in the URL of the server in ServerProxy. (GH-25057)
(cherry picked from commit c1b073a630)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-03-29 07:43:02 -07:00
Miss Islington (bot)
ed753d9485
bpo-42988: Remove the pydoc getfile feature (GH-25015)
CVE-2021-3426: Remove the "getfile" feature of the pydoc module which
could be abused to read arbitrary files on the disk (directory
traversal vulnerability). Moreover, even source code of Python
modules can contain sensitive data like passwords. Vulnerability
reported by David Schwörer.
(cherry picked from commit 9b999479c0)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-03-29 06:08:00 -07:00
Miss Islington (bot)
9a8e078024
bpo-31907: [doc] clarify that str.format() does not support arbitrary expressions (GH-25053) (GH-25055)
(cherry picked from commit fb1d01b963)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2021-03-28 17:05:07 -04:00
Miss Islington (bot)
138e039ff9
bpo-43644: Add docs for importlib.resources.as_file. (GH-25048)
(cherry picked from commit af50c84643)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-03-27 17:48:53 -07:00
Christian Heimes
064bc07f24
[3.9] bpo-43617: Check autoconf-archive package in configure.ac (GH-25016) (GH-25034)
Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 5d6e8c1c1a)

Co-authored-by: Christian Heimes <christian@python.org>
2021-03-27 22:47:00 +01:00
Miss Islington (bot)
7990072999
bpo-39231: correct tutorial annotations section (GH-25029)
(cherry picked from commit a53e9a7cf5)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2021-03-27 10:43:08 -07:00
Miss Islington (bot)
c84e769c2b
bpo-39616: clarify SSLContext.check_hostname effect (GH-18484)
It doesn't actually affect whether match_hostname() is called (it
never is in this context any longer), but whether hostname
verification occurs in the first place.
(cherry picked from commit 9798cef92b)

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
2021-03-27 07:42:45 -07:00
Miss Islington (bot)
f311290f09
bpo-43620: Remove reference to os.sep from os.path.join() doc (GH-25025) (#25027)
- removed ambiguous reference to os.sep from os.path.join() doc
(cherry picked from commit 21a2cabb37)

Co-authored-by: Jared Sutton <jpsutton@gmail.com>
2021-03-26 13:24:19 -04:00
Brett Cannon
2d1cbe4193
[3.9] Clarify attribute docs on types.ModuleType (GH-24974) (#24994)
(cherry picked from commit 76b5d714e4)

Co-authored-by: Brett Cannon <brett@python.org>
2021-03-23 10:40:56 -07:00
Miss Islington (bot)
10e17bc693
Clarify attribute docs on types.ModuleType (GH-24974)
(cherry picked from commit 76b5d714e4)

Co-authored-by: Brett Cannon <brett@python.org>
2021-03-23 09:01:10 -07:00
Miss Islington (bot)
994a519915
bpo-43555: Report the column offset for invalid line continuation character (GH-24939) (#24975)
(cherry picked from commit 96eeff5162)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-03-22 19:07:05 +00:00
Miss Islington (bot)
c145c03281
bpo-43577: Fix deadlock with SSLContext._msg_callback and sni_callback (GH-24957)
OpenSSL copies the internal message callback from SSL_CTX->msg_callback to
SSL->msg_callback. SSL_set_SSL_CTX() does not update SSL->msg_callback
to use the callback value of the new context.

PySSL_set_context() now resets the callback and _PySSL_msg_callback()
resets thread state in error path.

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

Co-authored-by: Christian Heimes <christian@python.org>
2021-03-21 08:39:15 -07:00
Antoine Pitrou
107cf07891
[3.9] bpo-43517 (followup): Install additional test directory (GH-24950) (GH-24951)
Should fix some CI failures on buildbots that test an installed version of Python.


(cherry picked from commit 66c8adfa27)

Co-authored-by: Antoine Pitrou <antoine@python.org>
2021-03-20 14:51:59 -07:00
Antoine Pitrou
ac17ed60f2
[3.9] bpo-43517: Fix false positive in detection of circular imports (GH-24895) (GH-24948)
(cherry picked from commit 2fd16ef406)

Co-authored-by: Antoine Pitrou <antoine@python.org>

Automerge-Triggered-By: GH:pitrou
2021-03-20 12:40:18 -07:00
Miss Islington (bot)
e8e341993e
bpo-43521: Allow ast.unparse with empty sets and NaN (GH-24897)
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 08ff4369af)

Co-authored-by: Kodi Arfer <Kodiologist@users.noreply.github.com>
2021-03-18 15:51:47 -07:00
Miss Islington (bot)
3365e684a8
bpo-41561: Add workaround for Ubuntu's custom security level (GH-24915)
Ubuntu 20.04 comes with a patched OpenSSL 1.1.1. Default security level
2 blocks TLS 1.0 and 1.1 connections. Regular OpenSSL 1.1.1 builds allow
TLS 1.0 and 1.1 on security level 2.

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

Co-authored-by: Christian Heimes <christian@python.org>
2021-03-18 15:31:34 -07:00
Miss Islington (bot)
4cc9e2348b
Add a warning block around the get_referrers() documentation (GH-24511)
(cherry picked from commit 813db24f7c)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-03-17 17:26:07 -07:00
Miss Islington (bot)
aa967ec4d4
bpo-35883: Py_DecodeLocale() escapes invalid Unicode characters (GH-24843)
Python no longer fails at startup with a fatal error if a command
line argument contains an invalid Unicode character.

The Py_DecodeLocale() function now escapes byte sequences which would
be decoded as Unicode characters outside the [U+0000; U+10ffff]
range.

Use MAX_UNICODE constant in unicodeobject.c.
(cherry picked from commit 9976834f80)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-03-17 14:11:14 -07:00
Ammar Askar
db73376106
[3.9] bpo-43499: Restrict co_code to be under INT_MAX in codeobject (GH-20628) (GH-24896)
(cherry picked from commit 3b3b83c965)
2021-03-17 20:26:38 +02:00
Miss Islington (bot)
1f0cde6784
bpo-41654: Fix compiler warning in MemoryError_dealloc() (GH-22387) (GH-24894)
Fix warning:

Objects\exceptions.c(2324,56): warning C4098:
'MemoryError_dealloc': 'void' function returning a value
(cherry picked from commit bbeb223e9a)

Co-authored-by: Victor Stinner <vstinner@python.org>

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-03-16 18:36:41 +01:00
Serhiy Storchaka
651fc30af7
bpo-43499: Silence compiler warnings about using legacy C API on Windows (GH-24873) 2021-03-16 08:03:37 +02:00
Miss Islington (bot)
a838e477a0
bpo-43506: Doc: Update removal schedule for Py_UNICODE encoder APIs (GH-24885)
See PEP 624.
(cherry picked from commit 1330338583)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2021-03-15 21:48:12 -07:00
Gregory P. Smith
d0312cece9
[3.9] bpo-43285: Add a What's New entry for 3.9.3. (GH-24888)
Covers the ftplib security fix.
2021-03-15 21:37:58 -07:00
Miss Islington (bot)
7dcb4baa4f
bpo-43285 Make ftplib not trust the PASV response. (GH-24838)
bpo-43285: Make ftplib not trust the PASV response.

The IPv4 address value returned from the server in response to the PASV command
should not be trusted.  This prevents a malicious FTP server from using the
response to probe IPv4 address and port combinations on the client network.

Instead of using the returned address, we use the IP address we're
already connected to.  This is the strategy other ftp clients adopted,
and matches the only strategy available for the modern IPv6 EPSV command
where the server response must return a port number and nothing else.

For the rare user who _wants_ this ugly behavior, set a `trust_server_pasv_ipv4_address`
attribute on your `ftplib.FTP` instance to True.
(cherry picked from commit 0ab152c6b5)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-03-15 12:02:45 -07:00
Miss Islington (bot)
83f676092e
Fix typo in the word "spaghetti" (GH-24866)
Automerge-Triggered-By: GH:Mariatta
(cherry picked from commit 93d33b47af)

Co-authored-by: Kazantcev Andrey <45011689+heckad@users.noreply.github.com>
2021-03-15 10:45:04 -07:00
Miss Islington (bot)
2fe408497e
[3.9] [doc] Document logging.basicConfig default format (GH-23710) (GH-24835)
(cherry picked from commit 35cacce525)
2021-03-15 09:41:00 +00:00
Miss Islington (bot)
c3f03333c3
bpo-43199: Briefly explain why no goto (GH-24852)
Answer "Why is there no goto?" in the Design and History FAQ.
(cherry picked from commit 5e29021a5e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-03-14 21:21:36 -07:00
Miss Islington (bot)
cf8d6ef962
bpo-39943: Fix MSVC warnings in sre extension (GH-20508)
(cherry picked from commit 06e3a27a3c)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
2021-03-14 05:17:26 -07:00
Pablo Galindo
e6bf1e1001
[3.9] bpo-43439: Wrapt the tuple in the audit events for the gc module (GH-24836) (GH-24855)
* [3.9] bpo-43439: Wrapt the tuple in the audit events for the gc module (GH-24836).
(cherry picked from commit 9c376bc1c4)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>

* Update gcmodule.c

* Update gcmodule.c

* Update gcmodule.c
2021-03-14 05:28:37 +00:00
Miss Islington (bot)
45d9c8cda3
bpo-43427: Separte the method overview from the static method specifics. (GH-24787) (GH-24849) 2021-03-13 18:31:33 -08:00
Miss Islington (bot)
bb46c135ad
Fix typos in unittest documentation (GH-24194)
* addCleanupClass  -> addClassCleanup
* doCleanupsClass -> doClassCleanups
(cherry picked from commit e0e398ef18)

Co-authored-by: Conchylicultor <etiennefg.pot@gmail.com>
2021-03-13 16:27:53 -08:00
Miss Islington (bot)
53ab4af444
Update client.py (GH-24827)
(cherry picked from commit b6884ad268)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2021-03-13 04:44:36 -08:00