Gregory P. Smith
8f0fa4bd10
[3.10] gh-95778: CVE-2020-10735: Prevent DoS by very large int() ( #96501 )
...
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:51:49 -07:00
Miss Islington (bot)
bbcb03e7b0
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:41 -07:00
Erlend E. Aasland
2ecc195498
[3.10] gh-96414: Inline code examples in sqlite3 docs (GH-96442). ( #96453 )
...
* [3.10] 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-31 10:10:55 +02:00
Miss Islington (bot)
a0d0a77c1f
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 13:56:02 -07:00
Miss Islington (bot)
9389e2f08c
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:16:34 -07:00
Miss Islington (bot)
57f447267c
[3.10] gh-91305: Add a note about DatagramHandler and DNS latency. (GH-96380) (GH-96400)
2022-08-30 09:58:14 +01:00
Miss Islington (bot)
e89f8b0ae4
Doc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273)
...
It is now deprecated and the docs should reflect that.
(cherry picked from commit 9625de6fab )
Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2022-08-30 01:38:53 -07:00
Erlend E. Aasland
af9fbec27e
[3.10] Docs: normalize SQL style in sqlite3 docs (GH-96403). ( #96409 )
...
(cherry picked from commit 6d403e264a )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-30 10:35:21 +02:00
Erlend E. Aasland
928a692320
[3.10] gh-95432: Add doctests for the sqlite3 docs (GH-96225) ( #96379 )
...
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 12:29:46 +02:00
Miss Islington (bot)
b6fb779489
GH-96359: Fix docs that claim int(0|1) doesn't match False (GH-96361)
...
(cherry picked from commit 3d3a86ed40 )
Co-authored-by: Jonathan Oberländer <github@l3vi.de>
2022-08-29 00:14:33 -07:00
Ezio Melotti
f51c232ec8
[3.10] gh-95994: Clarify escaped newlines. (GH-96066) ( #96360 )
...
* gh-95994: clarify escaped newlines.
* Rephrase ambiguous sentence.
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Use `<newline>` in escape sequences table.
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit c3d591fd06 )
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-08-28 15:17:01 +02:00
Miss Islington (bot)
91b6ca4e76
[3.10] gh-77116: Add SMTP buffering example to logging cookbook. (GH-96324) (GH-96325)
2022-08-27 12:15:23 +01:00
Miss Islington (bot)
b69ba3d723
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:13:04 -07:00
Miss Islington (bot)
5f4588feec
gh-96197: Fix expression when :func:`sys.breakpointhook is missing (gh-96293)
...
(cherry picked from commit 47d406ffc4 )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-08-25 19:03:16 -07:00
Miss Islington (bot)
2f88289cf5
Clarify API stability of PyTypeObject in relation to static types. (GH-96217)
...
Fixes:
https://github.com/python/cpython/issues/95300
Related:
https://github.com/python/cpython/issues/91271
(cherry picked from commit caa2a9799a )
Co-authored-by: ov2k <ov2k.github@gmail.com>
2022-08-25 06:42:32 -07:00
Miss Islington (bot)
147b8312ea
[3.10] gh-91070: Add note about SysLogHandler on macOS 12.x (Monterey). (GH-94803) (GH-96261)
2022-08-25 08:37:42 +01:00
Miss Islington (bot)
41e8257449
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:55:45 -07:00
Miss Islington (bot)
83ff85bc59
gh-96197: Define the behavior of breakpoint if sys.breakpointhook is lost (gh-96231)
...
(cherry picked from commit 09563a764e )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-08-24 07:20:38 -07:00
Erlend E. Aasland
203b598e51
[3.10] gh-94635: Frame sqlite3 how-to headings as such & move default adapters to reference (GH-96136) ( #96227 )
...
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>.
(cherry picked from commit 6bda5b85b5 )
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-08-24 09:52:16 +02:00
Miss Islington (bot)
e9ede9d2a0
gh-96096: Add undocumented SQLITE_OK/DENY/IGNORE sqlite3 constants (GH-96134)
...
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit d6259c58cb )
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-08-22 23:58:17 -07:00
Miss Islington (bot)
145d8f0e57
gh-95432: Add doctest for sqlite3 tutorial (GH-96193)
...
(cherry picked from commit 04c73e5efb )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-22 23:56:39 -07:00
Miss Islington (bot)
a836204777
gh-96121: Merge sqlite3.Row examples into sqlite3.Row class doc (GH-96122)
...
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 18b1782192 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
2022-08-22 01:10:53 -07:00
Miss Islington (bot)
5a094f0255
gh-96098: Clearly link concurrent.futures from threading & multiprocessing docs (GH-96112)
...
Clearly link concurrent.futures from threading & multiprocessing docs
Also link directly to asyncio from the beginning of the threading docs.
(cherry picked from commit bcc4cb0c7d )
Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2022-08-20 21:27:22 -07:00
Miss Islington (bot)
442674e37e
Docs: Fix markup of module name in sqlite3 docs (GH-96115)
...
(cherry picked from commit ee9f22d346 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-19 01:25:27 -07:00
Miss Islington (bot)
d52834d5f5
Doc: Use consistent markup for example Point class in sqlite3 (GH-96095)
...
(cherry picked from commit 303ef0913e )
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-08-19 00:49:39 -07:00
Miss Islington (bot)
8a6e651e20
Docs: group sqlite3.Connection attributes and methods (GH-96090)
...
(cherry picked from commit 1a140af40b )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-19 00:38:21 -07:00
Miss Islington (bot)
5e28ec54ff
gh-94635: Remove sqlite3 doc introduction heading (GH-96089)
...
(cherry picked from commit ede771cdf9 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-19 00:28:49 -07:00
Miss Islington (bot)
b6e8304b25
GH-95822: Need _PyType_Lookup() in descriptor howto code equivalent. (GH-95967) ( #96100 )
2022-08-19 00:18:59 -05:00
Erlend E. Aasland
eb182fe9eb
[3.10] Docs: Escape lone stars in sqlite3 docs (GH-96081). ( #96085 )
...
(cherry picked from commit 91afe66707 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-18 22:27:51 +02:00
Miss Islington (bot)
882dd9fe0d
gh-95271: Rework sqlite3 tutorial (GH-95749)
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit c87ea10fc9 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-18 11:44:58 -07:00
Miss Islington (bot)
a372a7d653
gh-94439: typing docs: Add minimum version to __required_keys__ and __optional_keys__ (GH-95373)
...
(cherry picked from commit f235178bec )
Co-authored-by: Howie Zhao <howiezhaohr@hotmail.com>
2022-08-12 21:31:51 -07:00
Miss Islington (bot)
44bf05ed0c
gh-82180: Document support for non-integer arg removed from grp.getgrgid in 3.10 (GH-95346) (GH-95930)
...
(cherry picked from commit 50bf5fafcc )
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-08-12 19:03:37 +02:00
Miss Islington (bot)
e21574a823
gh-92412: Clarify the documentation on library/syslog (GH-92587) (GH-95266)
...
(cherry picked from commit b7ce4625fe )
Co-authored-by: Nicolas Haller <nicolas@haller.im>
2022-08-12 18:19:08 +02:00
Julian Maurin
345daea076
[3.10] gh-95789: update documentation RFC base URL (GH-95800)
...
* pythongh-95789: update documentation RFC base URL
* 📜 🤖 Added by blurb_it.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-08-12 18:15:45 +02:00
Erlend E. Aasland
75299dcab5
[3.10] gh-95273: Improve sqlite3.complete_statement docs (GH-95840) ( #95918 )
...
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit e6623e7083 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-12 09:37:45 +02:00
Miss Islington (bot)
759227f7e9
gh-75510: Edit idlelib entry in doc (GH-95869)
...
Make section instead of subsection and revise sentence.
(cherry picked from commit 9af4aed73a )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-08-10 20:03:01 -07:00
Miss Islington (bot)
fe5cc63cd7
gh-84910: Tweak IDLE Glossary entry (GH-95866)
...
Link "IDLE" to its doc and add 'and Learning' to its expansion,
as in the doc.
(cherry picked from commit 3646f6cd88 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-08-10 19:15:03 -07:00
Miss Islington (bot)
346aa78af4
Fix documentation typo for functools.cmp_to_key (GH-95766) ( #95777 )
2022-08-10 00:40:15 -05:00
Miss Islington (bot)
64abb73354
gh-75500: Add idlelib section to IDLE doc (GH-95832)
...
This enables accessing IDLE as 'idlelib' in the Doc Module listing.
(cherry picked from commit 70fc9641b5 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-08-09 12:33:37 -07:00
Miss Islington (bot)
d57d86a591
gh-95767: Fix grammatical error in asyncio loop.create_task docs (GH-95768)
...
(cherry picked from commit 141f2517fc )
Co-authored-by: Andrzej Bartosiński <6197476+Neob91@users.noreply.github.com>
2022-08-09 07:07:21 -07:00
Erlend E. Aasland
49e505c4bd
[3.10] gh-95273: Reorganize sqlite3 doc module level funcs and vars (GH-95626) ( #95803 )
...
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 41c939cb35 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-08 22:08:43 +02:00
Serhiy Storchaka
da4aae29f8
[3.10] gh-91838: Resolve more HTTP links which redirect to HTTPS (GH-95650). (GH-95786)
...
(cherry picked from commit cc9160a29b )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-08-08 18:09:06 +03:00
Miss Islington (bot)
255f7ded77
gh-94635: Fixup sqlite3 'Introduction' seealso note (GH-95751)
...
In gh-95269, the seealso note incorrectly ended up in
the 'Tutorial' section.
(cherry picked from commit 56af5a200d )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-06 14:38:18 -07:00
Miss Islington (bot)
32b71ffbdb
gh-95155: Update "Using Python on a Mac" documentation (GH-95284) (GH-95743)
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit d25ff1f613 )
Co-authored-by: Howie Zhao <howiezhaohr@hotmail.com>
2022-08-06 19:15:32 +02:00
Miss Islington (bot)
7c711aecf6
gh-89362: Doc IDLE menu and search (GH-95697)
...
Update menu item position and capitalization.
Add paragraph about search.
For help.html, include save-as addition.
(cherry picked from commit 834064c19a )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-08-05 09:51:53 -07:00
Petr Viktorin
b66b6e1cc0
gh-91271: Document which parts of structs are in limited API/stable ABI (GH-32196) (GH-95711)
...
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-08-05 17:30:51 +02:00
Miss Islington (bot)
57446f9e33
bpo-42037: Corrected request dependencies in CookieJar functions (GH-23112) (GH-95515)
...
(cherry picked from commit d29e279de3 )
Co-authored-by: markus-sus <73822103+markus-sus@users.noreply.github.com>
2022-08-05 10:20:29 +02:00
Miss Islington (bot)
9e859e1258
GH-95685: Fix rendering of the string documentation (GH-95686) (GH-95701)
...
There's an extra underlines that messed the rest of the documentation rendering.
Closes #95685
(cherry picked from commit a525f2ada4 )
Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>
2022-08-05 09:58:17 +02:00
Miss Islington (bot)
2351593319
gh-65802: IDLE - explain SaveAs and extensions (GH-95690)
...
File name extensions may or may not be shown for the current name
and are added in an OS-dependent manner if not given for the new
name.
(cherry picked from commit 9890f86ae2 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-08-04 23:26:26 -07:00
Erlend Egeberg Aasland
c57666586b
[3.10] Docs: sqlite3 docs fixup (GH-95681) ( #95684 )
...
- Disable links to the module itself
- Consistent ref markup
(cherry picked from commit 44f1f63ad5 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-08-05 06:41:09 +02:00