Commit graph

26271 commits

Author SHA1 Message Date
Alex Waygood
f207b346d4
[3.11] Remove stray reference to PEP-695 in the typing docs (#105655) 2023-06-11 17:10:49 +01:00
Miss Islington (bot)
aaa8a493ec
[3.11] Cleanup and clarify our hashlib docs. (GH-105624) (#105633)
Cleanup and clarify our hashlib docs. (GH-105624)

Clarify and improve our hashlib docs. Now with 50% less mess!
(cherry picked from commit 0d1d6ab966)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-06-10 11:50:27 -07:00
Alex Waygood
6cb1308005
[3.11] Miscellaneous improvements to the typing docs (#105529) (#105568)
Miscellaneous improvements to the typing docs (#105529)

Mostly, these are changes so that we use shorter sentences and shorter paragraphs. In particular, I've tried to make the first sentence introducing each object in the typing API short and declarative.
2023-06-09 22:41:22 +01:00
Miss Islington (bot)
c28887d059
[3.11] Clarify the supported cases in the tokenize module (GH-105569) (#105574)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-06-09 16:00:53 +00:00
Alex Waygood
faf15fda28
[3.11] Fix two errors in the typing docs (#105559) 2023-06-09 14:14:47 +01:00
Miss Islington (bot)
fed1b5a198
[3.11] gh-105332: [Enum] Fix unpickling flags in edge-cases (GH-105348) (GH-105519)
* revert enum pickling from by-name to by-value

(cherry picked from commit 4ff5690e59)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-06-08 18:02:12 -07:00
Miss Islington (bot)
af80db063f
[3.11] Further improve docs for typing.Annotated (GH-105498) (#105504)
* Further improve docs for `typing.Annotated` (GH-105498)
(cherry picked from commit d213c2990f)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-08 15:06:39 +00:00
Alex Waygood
02c5513b30
[3.11] [typing docs] Don't describe Sized and Hashable as deprecated in the 3.11 docs (#105496) 2023-06-08 13:09:52 +01:00
Federico Caselli
acf3916e84
[3.11] Add single value agen.athrow(value) signature to the 3.11 docs gh-105269 (#105468) 2023-06-07 23:30:33 +01:00
Alex Waygood
ccc971714e
[3.11] typing: Improve documentation of generic classes and aliases (#105369) (#105454) 2023-06-07 21:27:15 +00:00
Miss Islington (bot)
40d1d28b07
[3.11] gh-90015: Document that PEP-604 unions do not support forward references (GH-105366) (#105461)
gh-90015: Document that PEP-604 unions do not support forward references (GH-105366)
(cherry picked from commit fbdee000de)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-07 19:11:33 +01:00
Jelle Zijlstra
34f23904e1
[3.11] Improve docs for typing.TypeAlias (GH-105372). (#105447)
(cherry picked from commit c5ec51ec8f)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-07 07:14:36 -07:00
Jelle Zijlstra
d0af5272a7
[3.11] gh-97797: Improve documentation for typing.Annotated (GH-105365). (#105449)
(cherry picked from commit e26d296984)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-07 07:14:01 -07:00
Alex Waygood
0d2ed56f6c
[3.11] Improve code examples in typing.rst (#105346) (#105427) 2023-06-07 06:41:35 -07:00
Miss Islington (bot)
039f30380b
[3.11] typing docs: Make the PEPs list an expandable section, hidden by default (GH-105353) (#105421)
typing docs: Make the PEPs list an expandable section, hidden by default (GH-105353)
(cherry picked from commit d7645124f5)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-07 07:50:31 +01:00
Miss Islington (bot)
5e4c46f029
[3.11] GH-95088: Clarify rules for parsing an item key for format strings (GH-103779) (#105418)
GH-95088: Clarify rules for parsing an item key for format strings (GH-103779)
(cherry picked from commit 3e7316d7e8)

Co-authored-by: achhina <amanschhina@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-06-06 20:56:03 -07:00
Miss Islington (bot)
2456136360
[3.11] typing.NewType docs: the future performance improvements are now in the past (GH-105354) (#105415)
`typing.NewType` docs: the future performance improvements are now in the past (GH-105354)
(cherry picked from commit 5f65ff0370)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-06 20:55:46 -07:00
Miss Islington (bot)
faae548e0e
[3.11] gh-89412: Add missing attributes (added in 3.10) to traceback module docs (GH-105046) (#105328)
(cherry picked from commit a4f72fa39a)

Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-06-05 19:02:23 +02:00
Miss Islington (bot)
86eab0807f
[3.11] gh-104882: Docs: fix description of relationship between socket.getblocking() and socket.gettimeout() (GH-105026) (#105284)
gh-104882: Docs: fix description of relationship between `socket.getblocking()` and `socket.gettimeout()` (GH-105026)
(cherry picked from commit 5a5ed7a3e6)

Co-authored-by: Joe Geisbauer <joegeisbauer@gmail.com>
2023-06-04 17:09:13 +01:00
Miss Islington (bot)
8de607ab1c
[3.11] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) (#105219)
gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185)
(cherry picked from commit ee26ca13a1)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-06-02 08:28:35 +00:00
Victor Stinner
5de6ca59fb
[3.11] gh-105096: Reformat wave documentation (#105136) (#105138) (#105155)
[3.12] gh-105096: Reformat wave documentation (#105136) (#105138)

gh-105096: Reformat wave documentation (#105136)

Add ".. class::" markups in the wave documentation.

* Reformat also wave.py (minor PEP 8 changes).
* Remove redundant "import struct": it's already imported at top
  level.
* Remove wave.rst from .nitignore

(cherry picked from commit 85e5d03163)
(cherry picked from commit 01b42f9559)
2023-05-31 16:40:25 +00:00
Miss Islington (bot)
c39500db52
[3.11] GH-89455: Add missing attributes (added in 3.11) to traceback module docs (GH-105044) (#105067)
GH-89455: Add missing attributes (added in 3.11) to traceback module docs (GH-105044)
(cherry picked from commit 39f6a0489f)

Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-05-29 20:37:49 +01:00
Jelle Zijlstra
d34e58a1d5
[3.11] gh-103921: Improve typing documentation (GH-104642) (#105007)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-27 16:30:41 -07:00
Miss Islington (bot)
b9e2d80769
[3.11] gh-104992: [What's New in 3.11] Document unittest.TestProgram.usageExit's deprecation (GH-104994) (#105010)
gh-104992: [What's New in 3.11] Document unittest.TestProgram.usageExit's deprecation (GH-104994)

Document unittest.TestProgram.usageExit's pending removal in 3.13
(cherry picked from commit 7df861c23c)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-05-26 19:43:04 -07:00
Miss Islington (bot)
a632697225
[3.11] gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986) (#104988)
gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986)

These fields are removed in 025e9ebd0a
(cherry picked from commit 61c1d6760f)

Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
2023-05-26 18:14:03 +01:00
Shantanu
161fc18edc
[3.11] gh-104479: Update outdated tutorial floating-point reference (GH-104681) (#104961)
(cherry picked from commit 2cf04e455d)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2023-05-26 06:30:03 +00:00
Miss Islington (bot)
3b3f2e107b
[3.11] gh-104874: Document NewType.__supertype__ (GH-104875) (#104907)
gh-104874: Document NewType.__supertype__ (GH-104875)
(cherry picked from commit 41768a2bd3)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-25 00:35:58 +01:00
Miss Islington (bot)
be20e9c647
[3.11] howto/urllib2: remove link to an outdated french translation (GH-104193) (GH-104746)
howto/urllib2: remove link to an outdated french translation (GH-104193)

We now have our own translation and it's not outdated
(cherry picked from commit 151b6bfb5d)

Co-authored-by: Mathieu Dupuy <deronnax@gmail.com>
2023-05-22 19:57:05 +02:00
Prince Roshan
2ade563abc
[3.11] gh-103606: Improve error message from logging.config.FileConfig (GH-103628) (#104687)
* gh-103606: Improve error message from logging.config.FileConfig (GH-103628)

(cherry picked from commit 152227b569)

plus backport the followup exception change fix to that in #104701
2023-05-21 12:17:18 -07:00
Jelle Zijlstra
abb32de8c4
[3.11] typing docs: Move some classes out of the "Generics" section (GH-104707) (#104721)
- AnyStr can be used in type annotations, contrary to the section header
- Unpack can also be used in annotations, and its use is not restricted
  to generics. It makes more sense with other building blocks like Required.
- Protocol is not necessarily generic.

Also fix the indentation for two notes associated with Concatenate.

(cherry picked from commit ab71acd67b)

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-21 14:31:26 +01:00
Miss Islington (bot)
dc0c41b2e5
[3.11] Corrected identifier (GH-104713) (#104714)
Corrected identifier (GH-104713)
(cherry picked from commit 60993ba8b4)

Co-authored-by: William Sawyer <wmsawyer2609@gmail.com>
2023-05-21 02:06:17 -04:00
Miss Islington (bot)
d45c1df83e
[3.11] gh-49174: document that the effect of calling gc.collect() during a collection is undefined (GH-104699) (#104703)
gh-49174: document that the effect of calling gc.collect() during a collection is undefined (GH-104699)
(cherry picked from commit 30488fa22a)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-05-20 20:12:52 +00:00
han-solo
89bd454cd9
[3.11] gh-104679 Fixed syntax highlighting in turtle docs (GH-104682). (#104695)
(cherry picked from commit 2c97878bb8)
2023-05-20 12:36:43 -04:00
Miss Islington (bot)
e5b6f38df4
[3.11] docs: fix wrong indentation causing rendering error in dis page (GH-104661) (#104670)
docs: fix wrong indentation causing rendering error in dis page (GH-104661)
(cherry picked from commit 3bc94e678f)

Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
2023-05-19 23:25:43 +03:00
Hugo van Kemenade
cd13f73afd
[3.11] gh-104659: Consolidate python examples in enum documentation (#104665) (#104666)
gh-104659: Consolidate python examples in enum documentation (#104665)

(cherry picked from commit 3ac856e697)

Co-authored-by: Thomas Hisch <t.hisch@gmail.com>
2023-05-19 23:12:57 +03:00
Miss Islington (bot)
610cc0ab1b
[3.11] gh-102153: Start stripping C0 control and space chars in urlsplit (GH-102508) (#104575)
* gh-102153: Start stripping C0 control and space chars in `urlsplit` (GH-102508)

`urllib.parse.urlsplit` has already been respecting the WHATWG spec a bit GH-25595.

This adds more sanitizing to respect the "Remove any leading C0 control or space from input" [rule](https://url.spec.whatwg.org/GH-url-parsing:~:text=Remove%20any%20leading%20and%20trailing%20C0%20control%20or%20space%20from%20input.) in response to [CVE-2023-24329](https://nvd.nist.gov/vuln/detail/CVE-2023-24329).

---------

(cherry picked from commit 2f630e1ce1)

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
2023-05-17 21:41:25 +00:00
Miss Islington (bot)
9cac6c414f
[3.11] gh-104539: Fix indentation error in logging.config.rst (GH-104545) (#104546)
gh-104539: Fix indentation error in logging.config.rst (GH-104545)

Fix indentation error in logging.config.rst
(cherry picked from commit 0bb61dd5b0)

Co-authored-by: Jesper Noordsij <45041769+jnoordsij@users.noreply.github.com>
2023-05-16 13:53:18 +01:00
Miss Islington (bot)
a712c5f42d
[3.11] gh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (GH-104473) (#104500) 2023-05-15 10:15:07 +01:00
Miss Islington (bot)
8e79414efc
[3.11] gh-104337: Clarify random.gammavariate doc entry (GH-104410) (#104481)
(cherry picked from commit 88c5c58670)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-05-14 16:25:25 -04:00
Miss Islington (bot)
f5f99756e1
[3.11] Minor improvements to typing docs (GH-104465) (#104475)
Minor improvements to typing docs (GH-104465)
(cherry picked from commit 2f7b5e458e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-14 13:00:57 +01:00
Miss Islington (bot)
e794d469e3
[3.11] Add a mention of PYTHONBREAKPOINT to breakpoint() docs (GH-104430) (#104447)
Add a mention of PYTHONBREAKPOINT to breakpoint() docs (GH-104430)
(cherry picked from commit 1be80ed107)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2023-05-13 07:16:28 +00:00
Erlend E. Aasland
7055088500
[3.11] gh-101117: Improve accuracy of sqlite3.Cursor.rowcount docs (#104287) (#104381)
The SQLite C API sqlite3_changes() can only be relied upon when the
current active statement has been run to completion.
2023-05-11 11:09:46 +02:00
Miss Islington (bot)
a8e902d2c2
[3.11] gh-104010: Separate and improve docs for typing.get_origin and typing.get_args (GH-104013) (#104359)
* separate documentation and examples for both functions
* add examples demonstrating behaviour with unsupported types
* document return value of `get_origin` for `ParamSpecArgs` and `ParamSpecKwargs` instances

(cherry picked from commit a7a2dbbf72)

Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-10 07:49:49 -07:00
Miss Islington (bot)
03abac239c
[3.11] gh-103960: Dark mode: invert image brightness (GH-103983) (#104358)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-05-10 14:19:38 +00:00
Miss Islington (bot)
2fa14d47af
[3.11] gh-48241: Clarify URL needs to be encoded when provided to urlopen and Request (GH-103855) (#103891)
(cherry picked from commit 44010d0f12)

Co-authored-by: Michael Blahay <mblahay@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-05-10 00:22:06 +02:00
Miss Islington (bot)
fffdbf4831
[3.11] gh-102327: Extend docs for "url" and "headers" parameters to HTTPConnection.request()
gh-102327: Extend docs for "url" and "headers" parameters to HTTPConnection.request()

Added example on how to use the HTTPConnection object for making GET request.

Original issue: https://github.com/python/cpython/issues/102327

---------

(cherry picked from commit 7ba6288feb)

Co-authored-by: David Foster <david@dafoster.net>
Co-authored-by: Éric <earaujo@caravan.coop>
2023-05-09 20:00:58 +00:00
Miss Islington (bot)
97e1e43af1
[3.11] [doc] logging.rst - Change link to point directly to the Google Group. (GH-93390) (GH-104318)
(cherry picked from commit e6e81602f4)
2023-05-09 15:31:00 +01:00
Shantanu
15624b445e
[3.11] gh-102500: collections.abc.Buffer doesn't exist in 3.11 (#104317) 2023-05-09 10:27:15 +01:00
Miss Islington (bot)
2ee250383f
[3.11] GH-104284: Fix documentation gettext build (GH-104296) (#104299)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-08 13:17:42 -06:00
Miss Islington (bot)
8a6ff59e09
[3.11] GH-104145: Use fully-qualified cross reference types for the bisect module (GH-104172) (#104295)
GH-104145: Use fully-qualified cross reference types for the bisect module (GH-104172)
(cherry picked from commit 76eef552f3)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-08 17:41:20 +01:00