Commit graph

108504 commits

Author SHA1 Message Date
Miss Islington (bot)
c17ba233b3
bpo-41963: document that ConfigParser strips off comments (GH-26197) (GH-26213)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Laura Gutierrez Funderburk <58710704+lgfunderburk@users.noreply.github.com>
Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>

(cherry picked from commit 02ee819126)
2021-05-18 18:44:48 +02:00
Irit Katriel
c05d8a6b67
bpo-25872: Add unit tests for linecache and threading (GH-25913) (GH-26211)
(cherry picked from commit 115dea9e26)

Co-authored-by: uniocto <serit142sa33go@gmail.com>
2021-05-18 15:25:38 +01:00
Miss Islington (bot)
049c4125f8
bpo-43650: Fix MemoryError on zip.read in shutil._unpack_zipfile for large files (GH-25058)
`shutil.unpack_archive()` tries to read the whole file into memory, making no use of any kind of smaller buffer. Process crashes for really large files: I.e. archive: ~1.7G, unpacked: ~10G. Before the crash it can easily take away all available RAM on smaller systems. Had to pull the code form `zipfile.Zipfile.extractall()` to fix this

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit f32c7950e0)

Co-authored-by: Igor Bolshakov <ibolsch@gmail.com>
2021-05-17 10:34:39 -07:00
Miss Islington (bot)
2057ce8749
[3.9] bpo-44145: Release the GIL around HMAC_Update. (GH-26157) (GH-26188)
It was always meant to be released for parallelization.
This now matches the other similar code in the module.

Thanks michaelforney for noticing!
(cherry picked from commit c10392e7dd)


Co-authored-by: Gregory P. Smith <greg@krypto.org>

Automerge-Triggered-By: GH:gpshead
2021-05-17 01:07:49 -07:00
Miss Islington (bot)
2f9ebe6fd0
[doc] Fix typo in os module (GH-24464)
Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit fdc7e52f5f)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2021-05-16 17:00:12 -07:00
Miss Islington (bot)
f84ef3cd25
fix docstring typo in bdb.py (GH-22323) (#26180)
(cherry picked from commit be54fb5ae7)

Co-authored-by: flizzywine <1041958497@qq.com>
2021-05-17 00:43:26 +01:00
Miss Islington (bot)
ea33d204ce
[3.9] Fix typo in comment (GH-26162) (GH-26165)
(cherry picked from commit de367378f6)


Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>

Automerge-Triggered-By: GH:iritkatriel
2021-05-16 11:08:10 -07:00
Miss Islington (bot)
d43e1cbcc1
Remove a redundant assignment in Tools/unittestgui/unittestgui.py (GH-21438) (#26169)
(cherry picked from commit a42d98ed91)

Co-authored-by: Serhii Hidenko <shidenko97@gmail.com>
2021-05-16 17:17:55 +01:00
Miss Islington (bot)
925cb85e9e
bpo-44114: Fix dictkeys_reversed and dictvalues_reversed function signatures (GH-26062) (GH-26093)
These are passed and called as PyCFunction, however they are defined here without the (ignored) args parameter.

This works fine in some C compilers, but fails in webassembly or anything else that has strict function pointer call type checking.
(cherry picked from commit ab383eb6f0)

Co-authored-by: Joe Marshall <joe.marshall@nottingham.ac.uk>

Co-authored-by: Joe Marshall <joe.marshall@nottingham.ac.uk>
2021-05-16 17:34:43 +03:00
Miss Islington (bot)
376740110e
bpo-32133: Improve numbers docs (GH-26124) (GH-26147) 2021-05-15 10:28:05 -07:00
Antoine Pitrou
b30b25b266
[3.9] bpo-37788: Fix reference leak when Thread is never joined (GH-26103) (GH-26142)
When a Thread is not joined after it has stopped, its lock may remain in the _shutdown_locks set until interpreter shutdown.  If many threads are created this way, the _shutdown_locks set could therefore grow endlessly.  To avoid such a situation, purge expired locks each time a new one is added or removed..
(cherry picked from commit c10c2ec7a0)

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

Automerge-Triggered-By: GH:pitrou
2021-05-15 02:51:20 -07:00
Miss Islington (bot)
fa9de0c383
bpo-44072: fix Complex, Integral docs for ** (GH-25986)
In numbers module docstrings and docs.
(cherry picked from commit 4aa63d65a9)

Co-authored-by: Rory Yorke <rory.yorke@gmail.com>
2021-05-14 15:25:43 -07:00
Miss Islington (bot)
c90642b0d4
bpo-43729: Clarify comment in tutorial example (GH-25191) (GH-26137)
(cherry picked from commit 07797121cc)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-14 13:06:34 -07:00
Miss Islington (bot)
41ed452a91
Subprocess Protocols Documentation (GH-20950) (GH-26134)
Should be "Subprocess Protocol instances" not "Datagram Protocol instances"
(cherry picked from commit 2918846a4f)

Co-authored-by: kudavid <67070184+kudavid@users.noreply.github.com>

Co-authored-by: kudavid <67070184+kudavid@users.noreply.github.com>
2021-05-14 10:23:03 -07:00
Miss Islington (bot)
9bc96c0146
[doc] Fix typos in cgi.rst (GH-24766) (GH-26131)
(cherry picked from commit 19d839ae20)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2021-05-14 18:13:40 +01:00
Erlend Egeberg Aasland
64a31c5c2f
[3.9] sqlite3 test suite now works with SQLITE_DQS=0 (GH-26032). (GH-26128)
(cherry picked from commit be7e467bcf)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-15 01:50:03 +09:00
Miss Islington (bot)
f3007ea9ad
Update doc as relative import can be used with star import (GH-25667) (GH-26122)
(cherry picked from commit 3d4b5f1019)

Co-authored-by: Saiyang Gou <gousaiyang@163.com>

Co-authored-by: Saiyang Gou <gousaiyang@163.com>
2021-05-14 07:25:40 -07:00
Miss Islington (bot)
f38296feaa
Updated code example for asyncio.gather (GH-20604) (GH-26120)
The previous example did not fully showcase the interest of using gather.

Here the example showcases "the result is an aggregate list of returned values".
(cherry picked from commit 56b8ea65d2)

Co-authored-by: josephernest <nouvellecollection@gmail.com>

Co-authored-by: josephernest <nouvellecollection@gmail.com>
2021-05-13 23:07:31 -07:00
Miss Islington (bot)
133013e8a1
bpo-28146: Fix a confusing error message in str.format() (GH-24213)
Automerge-Triggered-By: GH:pitrou
(cherry picked from commit 4aeee0b47b)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2021-05-13 14:35:30 -07:00
Miss Islington (bot)
04c4610194
bpo-44114: Remove redundant cast. (GH-26098)
(cherry picked from commit e0c614e5fd)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2021-05-13 14:07:16 -07:00
Miss Islington (bot)
04ce4c7736
bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102)
The patch from [bpo-44074]() does not account for a possibly non-English locale and blindly greps for "HEAD branch" in a possibly localized text.

Automerge-Triggered-By: GH:pitrou
(cherry picked from commit 1aa3530314)

Co-authored-by: Antoine Pitrou <antoine@python.org>
2021-05-13 11:14:23 -07:00
Ken Jin
9b90ce6850
[3.9] Revert "[3.9] bpo-38908: Fix issue when non runtime_protocol does not raise TypeError (GH-26067)" (GH-26077)
Reverts python/cpython#26075

Automerge-Triggered-By: GH:gvanrossum
2021-05-12 10:44:14 -07:00
Ken Jin
88136bbd05
[3.9] bpo-38908: Fix issue when non runtime_protocol does not raise TypeError (GH-26067) (GH-26075)
(cherry picked from commit c40486a)

Co-authored-by: Yurii Karabas 1998uriyyo@gmail.com

Automerge-Triggered-By: GH:gvanrossum
2021-05-12 10:04:43 -07:00
Miss Islington (bot)
1be9396061
bpo-25479: add unit test for __subclasshook__ in test_abc.py (GH-24034) (GH-26063)
Co-authored-by: Szymon Trapp
(cherry picked from commit 5010c044c7)

Co-authored-by: Karl Dubost <karl+github@la-grange.net>
2021-05-12 14:45:18 +01:00
Miss Islington (bot)
ada9cdb941
bpo-40640: doc -- add missing ... in example of Continue (GH-26055) (GH-26058)
Co-authored-by: Chas Belov <59780179+ChasBelov@users.noreply.github.com>
(cherry picked from commit 6574334a68)
2021-05-12 11:28:10 +01:00
Steve Dower
0cb9775a85
bpo-44061: Fix pkgutil.iter_modules regression when passed a pathlib.Path object (GH-25964) (GH-26052)
Co-authored-by: Miguel Brito <5544985+miguendes@users.noreply.github.com>
2021-05-12 11:48:50 +02:00
Erlend Egeberg Aasland
6c190b5ae5
[3.9] bpo-28528: Fix pdb.checkline() attribute error when 'curframe' is None (GH-25438) (GH-26053)
Co-authored-by: Thomas Kluyver <takowl@gmail.com>
(cherry picked from commit 8563a7052c)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

Automerge-Triggered-By: GH:iritkatriel
2021-05-12 02:04:10 -07:00
Miss Islington (bot)
7d38b04b61
Fix import of HTTPError (GH-22304) (GH-26048)
Import HTTPError from urllib.error instead of urllib.request.
(cherry picked from commit 5fedf71439)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-05-11 16:18:23 -07:00
Jero Bado
37a9d43dd2
Fix typo in blurb entry (GH-26043) 2021-05-11 15:28:57 -07:00
Miss Islington (bot)
c9049cf0aa
bpo-10548: expectedFailure does not apply to fixtures (GH-23201) (#26045)
(cherry picked from commit 23ae2c3bac)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2021-05-11 23:23:54 +01:00
Miss Islington (bot)
390bfe0445
bpo-23750: Document os-system, subprocess. Patch by Martin Panter. (GH-26016) (GH-26041)
* Document os-system, subprocess Patch

* Update Doc/library/os.rst

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 5f2eb87f28)

Co-authored-by: uniocto <serit142sa33go@gmail.com>

Co-authored-by: uniocto <serit142sa33go@gmail.com>
2021-05-11 13:55:24 -07:00
Miss Islington (bot)
bde14f7fbd
bpo-25821: Fix inaccuracy in threading.enumerate/is_alive documentation (GH-23192) (#26036)
(cherry picked from commit 12e7d10dfd)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2021-05-11 19:19:42 +01:00
Miss Islington (bot)
1d8c18019d
Doc: http.server: directory is not a class attribute, but an argument. (GH-26017) (GH-26030)
* Doc: http.server: directory is not a class attribute, but an argument.
(cherry picked from commit d1b81574ed)

Co-authored-by: Julien Palard <julien@palard.fr>

Co-authored-by: Julien Palard <julien@palard.fr>
2021-05-10 18:59:22 -07:00
Steve Dower
b4884083ae
bpo-44070: Clarify NEWS message to specify the version when the behaviour was introduced (GH-26029) 2021-05-11 00:39:17 +01:00
Steve Dower
23822e2c65
bpo-44070: No longer eagerly makes import filenames absolute, except for extension modules (GH-26025) 2021-05-10 23:45:50 +01:00
Miss Islington (bot)
fbd9b9939c
bpo-44074: let patchcheck infer the base branch name (GH-25991)
(cherry picked from commit 21fbbb98ba)

Co-authored-by: Leonardo Lai <leonardo.lai@live.com>
2021-05-10 11:58:45 -07:00
Miss Islington (bot)
4d532d3f8f
bpo-43558: Add note about base class initialization to dataclasses doc (GH-25967) (GH-26019)
(cherry picked from commit 2a031723ee)

Co-authored-by: dhoekstra2000 <douwe.hoekstra2512@gmail.com>

Co-authored-by: dhoekstra2000 <douwe.hoekstra2512@gmail.com>
2021-05-10 09:38:01 -04:00
Miss Islington (bot)
20fcd83634
bpo-32924: Fix the Show Source url in the documentation (GH-25994)
(cherry picked from commit 03acfc50ac)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-05-08 11:43:59 -07:00
Miss Islington (bot)
a25c46bd7d
Fix make libainstall. (GH-25980)
Initial patch by Benno Leslie.
(cherry picked from commit 80d250d68c)

Co-authored-by: Senthil Kumaran <senthil@uthcode.com>
2021-05-07 23:58:27 -07:00
Miss Islington (bot)
bf309d74a5
Simple Enhancement. Add missing return statements in ftplib documentation. (GH-25968) (#25970)
(cherry picked from commit b32c8e9795)

Co-authored-by: Senthil Kumaran <senthil@uthcode.com>

Co-authored-by: Senthil Kumaran <senthil@uthcode.com>
2021-05-07 07:13:19 -07:00
Miss Islington (bot)
7424105a02
Fix minor grammar problems in dataclasses documentation (GH-25948) (#25959)
Some missing words; some odd word choices.
(cherry picked from commit ee8e7c2fa9)

Co-authored-by: Scott Noyes <snoyes@gmail.com>

Co-authored-by: Scott Noyes <snoyes@gmail.com>
2021-05-06 17:54:58 -04:00
Miss Islington (bot)
1326f51bfc
docs: clearly document that ":GH-X" string formatting results in "0X..." (GH-25941)
* clearly document that ":GH-X" string formatting results in "0X..."

* put back the "serial comma"
(cherry picked from commit 92ceb1c840)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
2021-05-06 12:52:50 -07:00
Miss Islington (bot)
b391b9b925
bpo-43972: Set content-length to 0 for http.server.SimpleHTTPRequestHandler 301s (GH-25705)
* Set content-length for simple http server 301s

When http.server.SimpleHTTPRequestHandler sends a 301 (Moved
Permanently) due to a missing file, it does not set a Content-Length
of 0. Unfortunately, certain clients can be left waiting for the
connection to be closed in this circumstance, even though no body
will be sent. At time of writing, both curl and Firefox demonstrate
this behavior.

* Test Content-Length on simple http server redirect

When serving a redirect, the SimpleHTTPRequestHandler will now send
`Content-Length: 0`. Several tests for http.server already cover
various behaviors and checks including redirection. This change only
adds one check for the expected Content-Length on the simplest case
for a redirect.

* Add news entry for SimpleHTTPRequestHandler fix

* Clarify the specific kind of 301

Co-authored-by: Senthil Kumaran <skumaran@gatech.edu>
(cherry picked from commit fb42725561)

Co-authored-by: Stephen Rosen <sirosen@globus.org>
2021-05-06 12:50:54 -07:00
Miss Islington (bot)
ce47addfb6
[3.9] bpo-36515: Disable unaligned memory access in _sha3 on ARM (GH-25927) (GH-25928)
Contributed-By: Matthias Klose

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

Co-authored-by: Gregory P. Smith <greg@krypto.org>

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-05-06 08:55:35 +02:00
Miss Islington (bot)
ea93270366
bpo-44022: Fix http client infinite line reading (DoS) after a HTTP 100 Continue (GH-25916)
Fixes http.client potential denial of service where it could get stuck reading lines from a malicious server after a 100 Continue response.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit 47895e31b6)

Co-authored-by: Gen Xu <xgbarry@gmail.com>
2021-05-05 16:05:52 -07:00
Miss Islington (bot)
bc8b93c9a9
bpo-44040: Update broken link in pathlib source (GH-25905) (GH-25911)
(cherry picked from commit 96d5c7038b)

Co-authored-by: Kevin Follstad <kfollstad@gmail.com>
2021-05-05 10:53:54 +02:00
Miss Islington (bot)
df99532a05
bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-19548)
The address tuple for CAN_RAW no longer returns the address family
after the introduction of CAN ISO-TP support in a30f6d45ac. However,
updating test_socket.CANTest.testSendFrame was missed as part of the
change, so the test incorrectly attempts to index past the last tuple
item to retrieve the address family.

This removes the now-redundant check for equality against socket.AF_CAN,
as the tuple will not contain the address family.
(cherry picked from commit 355bae8882)

Co-authored-by: karl ding <karlding@users.noreply.github.com>
2021-05-04 14:03:48 -07:00
Miss Islington (bot)
8faed45242
Clarify rx parameter of compileall functions (GH-25857)
(cherry picked from commit 09490298d4)

Co-authored-by: Jean-Abou-Samra <37271310+Jean-Abou-Samra@users.noreply.github.com>
2021-05-04 12:59:45 -07:00
Jelle Zijlstra
ab0a54adad
[3.9] bpo-44001: improve Literal documentation (GH-25877). (#25897)
(cherry picked from commit 87109f4d85)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-05-04 18:48:41 +02:00
Petr Viktorin
ec18362f6a
[3.9] bpo-42083: Allow NULL doc in PyStructSequence_NewType (#25896)
(cherry picked from commit 2f5baa1750)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-05-04 16:07:13 +02:00