Commit graph

11899 commits

Author SHA1 Message Date
Shantanu
2cb4b13af6
[3.11] gh-92446: Improve argparse choices docs (GH-94627) (#100528)
Based on the definition of the collections.abc classes, it is more accurate to use "sequence" instead of "container" when describing argparse choices.

(cherry picked from commit ad3c99e521)

Co-authored-by: Guy Yagev <yourlefthandman8@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-12-26 01:09:06 -06:00
Miss Islington (bot)
44b664e057
gh-99535: Add test for inheritance of annotations and update documentation (GH-99990)
(cherry picked from commit f5b7b19bf1)

Co-authored-by: MonadChains <monadchains@gmail.com>
2022-12-24 12:31:10 -08:00
Miss Islington (bot)
f801fa8ee5
gh-100472: Fix docs claim that compileall parameters could be bytes (GH-100473)
(cherry picked from commit 046cbc2080)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-12-24 12:29:50 -08:00
Miss Islington (bot)
80013d78e0
[Minor PR] Quotes in documentation changed into code blocks (GH-99536)
Minor formatting fix in documentation

(cherry picked from commit efccd04b9e)

Co-authored-by: Bart Broere <mail@bartbroere.eu>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-12-24 12:26:11 -08:00
Miss Islington (bot)
3b70487459
GH-93179: Document the thread safety of functools.lru_cache (GH-95970)
(cherry picked from commit ba4bb7e464)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2022-12-24 12:25:34 -08:00
Miss Islington (bot)
bf0f306bcd
gh-100428: Make float documentation more accurate (GH-100437)
Previously, the grammar did not accept `float("10")`.
Also implement mdickinson's suggestion of removing the indirection.
(cherry picked from commit 2e1a9ce989)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-12-24 12:18:40 -08:00
Miss Islington (bot)
ba87dae453
Misc Itertools recipe tweaks (GH-100493)
(cherry picked from commit 0769f95751)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2022-12-24 00:31:36 -08:00
Miss Islington (bot)
b914054d9d
gh-77771: Add enterabs example in sched (GH-92716)
(cherry picked from commit 0f6420640c)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-12-23 21:31:18 -08:00
Gregory P. Smith
a852c5f8ee
[3.11] Correct CVE-2020-10735 documentation (GH-100306). (#100476)
(cherry picked from commit 1cf3d78c92)

Co-authored-by: Jeremy Paige <ucodery@gmail.com>
2022-12-23 18:07:50 -08:00
Miss Islington (bot)
9477594374
Add "strict" to dotproduct(). Add docstring. Factor-out common code. (GH-100480)
(cherry picked from commit f89de679ff)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2022-12-23 16:00:21 -08:00
Miss Islington (bot)
fe828ec709
gh-91081: Add note on WeakKeyDictionary behavior when deleting a replaced entry (GH-91499)
(cherry picked from commit c615286e85)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Pieter Eendebak <P.T.eendebak@tudelft.nl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-12-20 19:34:17 -08:00
Miss Islington (bot)
23fa1667b3
gh-99991: improve docs on str.encode and bytes.decode (GH-100198)
(cherry picked from commit a2bb3b7f9d)

Co-authored-by: Bisola Olasehinde <horlasehinde@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-12-20 18:12:53 -08:00
Miss Islington (bot)
1332fdabba
Clarify that every thread has its own default context in contextvars (GH-99246)
(cherry picked from commit cb60b6131b)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-12-20 03:44:55 -08:00
Miss Islington (bot)
cfa78ecc12
gh-69929: re docs: Add more specific definition of \w (GH-92015)
(cherry picked from commit 36a0b1d0dd)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-12-19 19:14:52 -08:00
Raymond Hettinger
09186676cf
[3.11] GH-98363: Update batched() recipe in docs to match 3.12 (#100323) 2022-12-17 19:10:03 -06:00
Miss Islington (bot)
e3d85783e5
Document that zipfile's pwd parameter is a bytes object (GH-100209)
(cherry picked from commit 5ee7eb9deb)

Co-authored-by: JustAnotherArchivist <JustAnotherArchivist@users.noreply.github.com>
2022-12-16 22:54:33 -08:00
Miss Islington (bot)
4c810f92ba
gh-99830: asyncio: Document returns of remove_{reader,writer} (GH-100302)
(cherry picked from commit 5234e1cbea)

Co-authored-by: Ben Darnell <ben@bendarnell.com>
2022-12-16 11:14:28 -08:00
Miss Islington (bot)
9d2dcbbccd
[3.11] Remove uninformative itertools recipe (GH-100253) (GH-100275) 2022-12-15 12:47:58 -06:00
Miss Islington (bot)
cb1001ce23
gh-100248: Add missing ssl_shutdown_timeout parameter in asyncio docs (GH-100249)
(cherry picked from commit 9663853800)

Co-authored-by: busywhitespace <busywhitespace@tuta.io>
2022-12-14 09:07:36 -08:00
Miss Islington (bot)
cd4166fec2
GH-100206: use versionadded for the addition of sysconfig.get_default_scheme (GH-100207)
(cherry picked from commit d3ea82aaf9)

Co-authored-by: Filipe Laíns <lains@riseup.net>
2022-12-13 03:02:41 -08:00
Miss Islington (bot)
60383a3cd8
Fix: typo (Indention) (GH-99904)
Example needed to be indented. Was trying to call a context manger `pr` (from ` with cProfile.Profile() as pr:`) wot perform ` pr.print_stats()` once it had already exited.
(cherry picked from commit 8711b59f7a)

Co-authored-by: jarrodcolburn <jcourtlandcolburn@gmail.com>
Automerge-Triggered-By: GH:AlexWaygood
2022-12-12 04:38:39 -08:00
Miss Islington (bot)
17bc55e043
clarify the 4300-digit limit on int-str conversion (GH-100175)
(cherry picked from commit 935ef59321)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2022-12-12 04:06:48 -08:00
Miss Islington (bot)
593c5a0247
gh-100174: [Enum] Correct PowersOfThree example. (GH-100178)
Changed from multiples of 3 to powers of 3 to match the class name.
(cherry picked from commit 868bab0fdc)

Co-authored-by: Beweeted <Beweeted@users.noreply.github.com>
2022-12-11 15:30:25 -08:00
Miss Islington (bot)
606adb4b89
gh-99728: correct typo in datetime format codes documentation (GH-99750)
(cherry picked from commit d5f8a2b6ad)

Co-authored-by: Brad Wolfe <brad.wolfe@gmail.com>
2022-12-10 02:29:04 -08:00
Miss Islington (bot)
9aca00341a
gh-100049: fix repr for mappingproxy in dictionary view example doc (GH-100052)
(cherry picked from commit 7c0fb71fbf)

Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
2022-12-10 01:23:24 -08:00
Miss Islington (bot)
ecb16d5d63
gh-96250: Improve sqlite3 injection attack example (GH-99270)
(cherry picked from commit 41d4ac9da3)

Co-authored-by: Jia Junjie <62194633+jiajunjie@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-12-08 12:45:40 -08:00
Serhiy Storchaka
3fae04b10e
[3.11] gh-93453: Only emit deprecation warning in asyncio.get_event_loop when a new event loop is created (#99949)
It no longer emits a deprecation warning if the current event loop was set.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-12-06 16:15:44 +01:00
Miss Islington (bot)
235f5fd2ca
[3.11] gh-100001: Remove doc typo, add versionadded (GH-100042) (#100043)
(cherry picked from commit bed15f87ea)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-12-06 11:34:20 +01:00
Miss Islington (bot)
05031ee1f5
[Enum] Fix typos in the documentation (GH-99960)
(cherry picked from commit 2ae894b6d1)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2022-12-05 21:46:48 -08:00
Miss Islington (bot)
a726f747e6
gh-100001: Omit control characters in http.server stderr logs. (GH-100002)
Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
(cherry picked from commit d8ab0a4dfa)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-12-05 13:39:22 -08:00
Miss Islington (bot)
f3a58cece6
[3.11] dataclasses.rst: Prevent horizontal scrolling (gh-100025) (gh-100028)
dataclasses.rst: Prevent horizontal scrolling (gh-100025)
(cherry picked from commit 51ee0a29e9)

Co-authored-by: Ram Rachum <ram@rachum.com>

Co-authored-by: Ram Rachum <ram@rachum.com>
2022-12-05 13:59:34 -05:00
Miss Islington (bot)
7f2bcc7aaa
gh-93464: [Enum] Add versionchanged tag (GH-99997)
(cherry picked from commit e3a3863cb9)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-12-05 02:45:37 -08:00
Miss Islington (bot)
27218d0799
gh-85747: "Preface" section of asyncio-eventloop.rst: Switch to active voice and suggest other edits (GH-99784)
(cherry picked from commit bf26bdf6ac)

Co-authored-by: Brian Skinn <brian.skinn@gmail.com>
2022-12-03 16:59:06 -08:00
Miss Islington (bot)
f4511d3ee9
[3.11] GH-98906 ``re` module: `search() vs. match()` section should mention `fullmatch()`` (GH-98916) (GH-99912)
GH-98906 ```re``` module: ```search() vs. match()``` section should mention ```fullmatch()``` (GH-98916)

Mention fullmatch along with search and match.
(cherry picked from commit e0f91deb59)

Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>

Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
2022-11-30 18:14:36 -05:00
Miss Islington (bot)
90701ebaf4
bpo-47220: Document the optional callback parameter of weakref.WeakMethod (GH-25491)
(cherry picked from commit 9628136fac)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2022-11-30 11:53:04 -08:00
Miss Islington (bot)
d7c2e0a537
Docs: improve accuracy of socketserver reference (GH-24767)
(cherry picked from commit 052bc128ac)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2022-11-29 12:43:09 -08:00
Miss Islington (bot)
2e9ea7b44b
gh-90717: Update the documentation for the altchars paremeter in base64 library (GH-94187)
(cherry picked from commit 05dfc539c2)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
2022-11-29 08:29:03 -08:00
Miss Islington (bot)
a2b84bbf77
fnmatch docs: link to fnmatch.filter(), not builtins.filter() (GH-99819)
(cherry picked from commit ca3e611b1f)

Co-authored-by: Matthew Hughes <34972397+matthewhughes934@users.noreply.github.com>
2022-11-28 10:17:07 -08:00
Miss Islington (bot)
1e327059a3
bpo-41825: restructure docs for the os.wait*() family (GH-22356)
(cherry picked from commit 492dc02b01)

Co-authored-by: Georg Brandl <georg@python.org>
2022-11-28 01:48:52 -08:00
Miss Islington (bot)
f160996412
Docs: both sqlite3 "point examples" now adapt to str (GH-99823)
(cherry picked from commit 276643e207)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-11-27 13:21:00 -08:00
Miss Islington (bot)
366adc7c83
gh-91340: Document multiprocessing.set_start_method force parameter (GH-32339)
GH-91340

https://bugs.python.org/issue47184
(cherry picked from commit dfc2732a57)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
Automerge-Triggered-By: GH:kumaraditya303
2022-11-27 10:05:59 -08:00
Miss Islington (bot)
8bb7fdaee8
doc: Remove backslashes in doctest grammar docs (GH-29346)
(cherry picked from commit 22860dbbc8)

Co-authored-by: George Zhang <geetransit@gmail.com>
2022-11-26 22:46:33 -08:00
Miss Islington (bot)
fe9957241a
gh-99795: Fix typo in importlib.resources.abc (GH-99796)
Changing TraversableReader to TraversableResources at one place of the documentation.

See GH-99795 for more details.
(cherry picked from commit 5f8898216e)

Co-authored-by: busywhitespace <busywhitespace@tuta.io>
2022-11-26 10:12:23 -08:00
Miss Islington (bot)
f98322920e
[3.11] gh-99502: mention bytes-like objects as input in secrets.compare_digest (GH-99512) (#99791)
gh-99502: mention bytes-like objects as input in `secrets.compare_digest` (GH-99512)

Now it is in sync with https://docs.python.org/3/library/hmac.htmlGH-hmac.compare_digest
It is the same function, just re-exported. So, I guess they should mention the same input types.
(cherry picked from commit 47d673d81f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-11-26 15:19:23 +05:30
Miss Islington (bot)
00755196e3
[3.11] Fix misspelling in docs for http.HTTPMethod (GH-99376) (#99451)
Fix misspelling in docs for http.HTTPMethod (GH-99376)
(cherry picked from commit f0d12ca0e0)

Co-authored-by: Matt Harasymczuk <github.com@haras.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-11-25 18:26:50 -05:00
Miss Islington (bot)
f5fa17bef5
gh-64019: Have attribute table in inspect docs link to module attributes instead of listing them (GH-98116)
(cherry picked from commit 7d2dcc53d0)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
2022-11-25 14:06:45 -08:00
Miss Islington (bot)
772fc63516
[3.11] gh-85073: Add some missing links to source (GH-99363) (#99586)
gh-85073: Add some missing links to source (GH-99363)

Add some missing links to source from Python docs
(cherry picked from commit 27d8dc2c9d)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-11-25 23:19:40 +05:30
Miss Islington (bot)
5b7408490f
gh-96168: Add sqlite3 row factory how-to (GH-99507)
(cherry picked from commit 8749121b07)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-11-25 05:15:09 -08:00
Miss Islington (bot)
609273eb52
gh-99619: fix error in documentation of ExceptionGroup.derive() (GH-99621)
(cherry picked from commit 5d9183c7ad)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-11-23 03:08:22 -08:00
Miss Islington (bot)
b4ae5b76ed
[3.11] gh-99650 : Updated argparse docs (GH-99653) (GH-99705) 2022-11-22 14:17:20 -08:00