Commit graph

11694 commits

Author SHA1 Message Date
Miss Islington (bot)
12bd7e9258
Add re.VERBOSE flag documentation example (GH-97678)
The current re.VERBOSE documentation example leaves space for ambiguous
interpretation. One may read that spaces within the `(?:` token are
spaces inside the non-capturing group (such as `(?: )`). This patch
removes the ambiguity by including examples after the statement.
(cherry picked from commit 0ceafa7fa4)

Co-authored-by: Athos Ribeiro <athoscribeiro@gmail.com>
2022-10-22 20:05:18 +01:00
Miss Islington (bot)
5f43097616
gh-97661: Improve accuracy of sqlite3.Cursor.fetchone docs (GH-97662)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 4b83cd0b22)

Co-authored-by: Jia Junjie <62194633+jiajunjie@users.noreply.github.com>
2022-10-22 20:05:17 +01:00
Miss Islington (bot)
800c9c0610
[3.11] gh-93738: Documentation C syntax (:c:type:PyObject -> :c:expr:PyObject) (GH-97776) (#97889)
:c:type:`PyObject` -> :c:expr:`PyObject`
(cherry picked from commit 0bf6a617ed)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-22 20:05:16 +01:00
Miss Islington (bot)
33e4537975
[3.11] gh-93738: Documentation C syntax (Use c:struct) (GH-97772) (#97869)
Use `c:struct`
(cherry picked from commit a0f5599aac)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-22 20:05:14 +01:00
Miss Islington (bot)
c5d6009c41
GH-95172 Make the same version versionadded oneline (GH-95172)
* Make the same version versionadded oneline

* Format versionadded for enum.rst

* Format versionadded

A single line versionadded was reading better.

Co-authored-by: Senthil Kumaran <senthil@python.org>
(cherry picked from commit d6062d1170)

Co-authored-by: 180909 <734461790@qq.com>
2022-10-22 20:05:11 +01:00
Miss Islington (bot)
28f97dc9d2
docs(typing): add "see PEP 675" to LiteralString (GH-97926)
(cherry picked from commit 2016bc54a2)

Co-authored-by: Simon Legner <Simon.Legner@gmail.com>
2022-10-22 20:05:11 +01:00
Łukasz Langa
e48d6dfbcd
[3.11] gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) (GH-97768) (#97924)
:c:type:`<C type>` -> :c:expr:`<C type>`

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 0031e62973)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-22 20:05:10 +01:00
Miss Islington (bot)
2af22d2205
[3.11] gh-96197: Fix expression when :func:`sys.breakpointhook is missing (gh-96293) (#96294)
(cherry picked from commit 47d406ffc4)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-10-22 20:05:08 +01:00
Miss Islington (bot)
bf50f10a6d
GH-88968: Add notes about socket ownership transfers (GH-97936)
(cherry picked from commit 74ea204634)

Co-authored-by: Guido van Rossum <guido@python.org>
2022-10-22 20:05:07 +01:00
Miss Islington (bot)
508ef0f343
[3.11] gh-95691: Doc BufferedWriter and BufferedReader (GH-95703) (#97947)
gh-95691: Doc BufferedWriter and BufferedReader (GH-95703)
(cherry picked from commit 0d68879104)

Co-authored-by: 180909 <734461790@qq.com>

Co-authored-by: 180909 <734461790@qq.com>
2022-10-22 20:05:06 +01:00
Miss Islington (bot)
3652b26ba1
Misc updates to the itertools recipes and tests (GH-98018)
(cherry picked from commit e500cc0451)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2022-10-22 20:04:59 +01:00
Miss Islington (bot)
a8a33e16e3
gh-71316: Update dis documentation to include changes to jump arguments (GH-95798)
(cherry picked from commit 6592a62ec2)

Co-authored-by: Christopher Chianelli <cchianel@redhat.com>
2022-10-22 20:04:58 +01:00
Miss Islington (bot)
40527c2b19
gh-64921: Clarify wording for open()'s newline arg (GH-96171)
(cherry picked from commit 4a74e6ab38)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-10-22 20:04:57 +01:00
Miss Islington (bot)
c634cd2d8c
[3.11] gh-91708: Revert params note in urllib.parse.urlparse table (GH-96699) (#98052)
Revert params note in urllib.parse.urlparse table
(cherry picked from commit eed80458e8)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-10-22 20:04:55 +01:00
Miss Islington (bot)
e32c7364c6
gh-61105: Add default param, note on using cookiejar subclass (GH-95427)
(cherry picked from commit 5eaf4d6101)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-10-22 20:04:54 +01:00
Miss Islington (bot)
dfae46c665
gh-97822: Fix http.server documentation reference to test() function (GH-98027)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 6b485629d2)

Co-authored-by: JasonYZ <yurenzhang2017@gmail.com>
2022-10-22 20:04:53 +01:00
Miss Islington (bot)
9f3aaef854
gh-56133: copyreg docs: Clarify function/constructor parameter (GH-95497)
(cherry picked from commit 281a3f18cc)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-10-22 20:04:50 +01:00
Miss Islington (bot)
1f58d8ce78
gh-83940: os docs: Improve wording for getenv/getenvb (GH-98113)
(cherry picked from commit 187e853690)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-10-22 20:04:47 +01:00
Miss Islington (bot)
e69136baff
[3.11] gh-88452: Add a warning about non-portability of environments. (GH-98155) (GH-98157) 2022-10-22 20:04:46 +01:00
Miss Islington (bot)
7b1be2ac81
gh-96130: Rephrase use of "typecheck" verb for clarity (GH-98144)
I'm sympathetic to the issue report, especially in case this helps
clarify to new users that Python itself does not do type checking at runtime
(cherry picked from commit ed6344eed0)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-10-22 20:04:44 +01:00
Miss Islington (bot)
61e24f3abd
Formatting fixes in contextlib docs (GH-98111)
(cherry picked from commit 3b33c2010a)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-10-22 20:04:43 +01:00
Miss Islington (bot)
168ec080e8
gh-65046: Link to logging cookbook from asyncio docs (GH-98207)
(cherry picked from commit c39a0c3354)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-10-22 20:04:42 +01:00
Miss Islington (bot)
3737a0e3ab
gh-91485: Doc: Using Python syntax to document builtin Python functions. (GH-96579)
(cherry picked from commit 3c4cbd177f)

Co-authored-by: Julien Palard <julien@palard.fr>
2022-10-22 20:04:39 +01:00
Miss Islington (bot)
be5de50166
Faster sieve() recipe (GH-98287)
(cherry picked from commit f4370318d6)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2022-10-22 20:04:37 +01:00
Miss Islington (bot)
1a84816c30
docs(typing): harmonize "See PEP x for more details" (GH-97927)
(cherry picked from commit 02389658a4)

Co-authored-by: Simon Legner <Simon.Legner@gmail.com>
2022-10-22 20:04:36 +01:00
Miss Islington (bot)
a2820a0ec8
gh-85299: Add note warning about entry point guard for asyncio example (GH-93457)
(cherry picked from commit 79fd6ccdbe)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-10-22 20:04:34 +01:00
Miss Islington (bot)
335bd1ee8b
gh-94972: document that shield users need to keep a reference to their task (GH-96724)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
(cherry picked from commit 6281affee6)

Co-authored-by: Hendrik Makait <hendrik.makait@gmail.com>
2022-09-10 08:03:35 -07:00
Miss Islington (bot)
ae819ca6fd
[3.11] gh-68163: Correct conversion of Rational instances to float (GH-25619) (#96556)
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2022-09-08 12:03:53 +01:00
Miss Islington (bot)
a3d5ecba1c
[3.11] gh-88287: Add BufferingFormatter documentation. (GH-96608) (GH-96675) 2022-09-08 08:30:48 +01:00
Irit Katriel
a5a9d0517b
[3.11] [doc] Update example in traceback doc (GH-96600) (GH-96603)
This Monty Python reference is of-its-time. It could seem inappropriate in the context of today's sensibilities around mental health.

Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit c4999f261f)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-09-05 22:43:27 +01:00
Miss Islington (bot)
d09069abfe
[3.11] gh-84095: Fill documentation gap regarding user-defined objects. (GH-96574) (GH-96575) 2022-09-05 08:03:49 +01:00
Miss Islington (bot)
0c81909a7a
Docs: alphabetically order sqlite3.Cursor attrs (GH-96565)
(cherry picked from commit 9e55685782)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-09-04 14:43:23 -07:00
Miss Islington (bot)
4587154cb9
gh-95778: remove unneeded doc note on float.as_integer_ratio (GH-96553)
Per mdickinson@'s comment on the main branch PR.
(cherry picked from commit 69bb83c2bf)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-09-04 00:12:00 -07:00
Miss Islington (bot)
c0af099816
doc typo: spell limitation (GH-96542)
(cherry picked from commit af6359dd5c)

Co-authored-by: Mehrdad Moradizadeh <mhrddmoradii@gmail.com>
2022-09-03 23:32:32 -07:00
Miss Islington (bot)
79fe67fa04
[3.11] gh-89087: Update logging.QueueHandler documentation to clarify record… (GH-96527) (GH-96528) 2022-09-03 13:16:40 +01:00
Miss Islington (bot)
02c59bebf7
bpo-30419: DOC: Update missing information in bdb docs (GH-1687)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit ccce9b77e1)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2022-09-02 10:48:26 -07:00
Gregory P. Smith
f8b71da9aa
[3.11] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96500)
Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds.

This PR comes fresh from a pile of work done in our private PSRT security response team repo.

This backports https://github.com/python/cpython/pull/96499 aka 511ca94520

Signed-off-by: Christian Heimes [Red Hat] <christian@python.org>
Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org>
Reviews via the private PSRT repo via many others (see the NEWS entry in the PR).

<!-- gh-issue-number: gh-95778 -->
* Issue: gh-95778
<!-- /gh-issue-number -->

I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#).
2022-09-02 09:48:57 -07:00
Miss Islington (bot)
57116d5682
gh-95180: Add TaskGroup and Runner to AsyncIO API Index (GH-95189)
Also rearrange some items in the list.

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
(cherry picked from commit 2a9e4e4d73)

Co-authored-by: siph <42943030+siphc@users.noreply.github.com>
2022-09-02 09:45:42 -07:00
Miss Islington (bot)
fca8e94dbf
gh-96168: Improve sqlite3 dict_factory example (GH-96457)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 91f40f3f78)

Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
2022-09-01 14:55:37 -07:00
Miss Islington (bot)
d4d5e605cd
gh-96414: Inline code examples in sqlite3 docs (GH-96442)
(cherry picked from commit f7e7bf161a)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-30 23:03:33 -07:00
Miss Islington (bot)
895c7a4401
Docs: normalise sqlite3 placeholder how-to heading (GH-96413)
(cherry picked from commit 7b01ce7953)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-30 14:06:11 -07:00
Miss Islington (bot)
d00a9e0176
gh-95337: update TypeVarTuple example (GH-95338)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 07f12b5c15)

Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
2022-08-30 08:06:19 -07:00
Miss Islington (bot)
d9d0d097a2
Docs: Improve clarity for bytes.hex() (GH-95257)
(cherry picked from commit 860fa35145)

Co-authored-by: Tim Burke <tim.burke@gmail.com>
2022-08-30 04:18:30 -07:00
Miss Islington (bot)
8e2d347183
[3.11] gh-91305: Add a note about DatagramHandler and DNS latency. (GH-96380) (GH-96401) 2022-08-30 09:58:37 +01:00
Miss Islington (bot)
4cfb6395e1
Docs: normalize SQL style in sqlite3 docs (GH-96403)
(cherry picked from commit 6d403e264a)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-29 15:59:13 -07:00
Miss Islington (bot)
2ba877258a
gh-95432: Add doctests for the sqlite3 docs (GH-96225)
As a consequence of the added test, this commit also includes
fixes for broken examples.

- Add separate namespace for trace tests bco. module level callback
- Move more backup and cursor examples under separate namespaces
(cherry picked from commit bf9259776d)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-29 02:01:37 -07:00
Miss Islington (bot)
698df306a9
Docs: Fix count of bullets in asyncio-task.rst (GH-96307) (#96330)
(cherry picked from commit 35e4da25d4)

Co-authored-by: zhanpon <pon.zhan@gmail.com>

Co-authored-by: zhanpon <pon.zhan@gmail.com>
2022-08-27 14:26:42 +01:00
Miss Islington (bot)
315807dac9
gh-96197: Define the behavior of repr if sys.displayhook is lost (gh-96242)
(cherry picked from commit 0319cd6825)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-08-25 19:12:43 -07:00
Miss Islington (bot)
888054ae8a
[3.11] gh-91070: Add note about SysLogHandler on macOS 12.x (Monterey). (GH-94803) (GH-96260) 2022-08-25 08:38:02 +01:00
Miss Islington (bot)
d02e8fbc5a
GH-96179: Fix misleading example on the bisect documentation (GH-96228)
The `movies[bisect(movies, 1960, key=by_year)]` will actually return only movies **after** 1960.
(cherry picked from commit 4317b25a23)

Co-authored-by: prego <pedropregueiro@gmail.com>
2022-08-24 08:54:15 -07:00