Commit Graph

28309 Commits

Author SHA1 Message Date
Miss Islington (bot) 8d473d8e57
[3.13] gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534) (#121539)
gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534)
(cherry picked from commit 649d5b6d7b)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-07-09 16:06:46 +00:00
Miss Islington (bot) 3efe02e2c7
[3.13] Docs: fix typo and duplicate word in configure.rst (GH-121410) (#121532)
(cherry picked from commit 9ba2a4638d)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-07-09 12:40:59 +00:00
Miss Islington (bot) 39f4add7a3
[3.13] gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335) (#121526)
gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335)
(cherry picked from commit facf9862da)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-07-09 15:12:45 +05:30
Miss Islington (bot) 2c3f30ba25
[3.13] gh-121461: Fix os.path.normpath documentation indentation (GH-121466) (#121472)
gh-121461: Fix os.path.normpath documentation indentation (GH-121466)
(cherry picked from commit bf74db731b)

Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
2024-07-08 04:08:13 +00:00
Miss Islington (bot) 29618b52ff
[3.13] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-121437) (#121441)
Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-121437)

regen dependencies
(cherry picked from commit 53e12025cd)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-07-06 18:23:31 +00:00
Miss Islington (bot) aae49ec595
[3.13] [docs] fix a Sphinx directive in `c-api/object.rst` (GH-121430) (#121440)
[docs] fix a Sphinx directive in `c-api/object.rst` (GH-121430)
(cherry picked from commit ada964fba0)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-06 18:13:57 +00:00
Miss Islington (bot) bc4cd91aef
[3.13] Update example of str.split, bytes.split (GH-121287) (#121415)
Update example of str.split, bytes.split (GH-121287)

In `{str,bytes}.strip(chars)`, multiple characters are not treated as a
prefix/suffix, but as individual characters. This may make users confuse
whether `split` has similar behavior.
Users may incorrectly expect that
`'Good morning, John.'.split(', .') == ['Good', 'morning', 'John']`

Adding a bit of clarification in the doc.

(cherry picked from commit 892e3a1b70)

Co-authored-by: Yuxin Wu <ppwwyyxxc@gmail.com>
Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
2024-07-05 20:25:35 +00:00
Miss Islington (bot) 3c3f9a209f
[3.13] gh-90437: Fix __main__.py documentation wording (GH-116309) (#121385)
gh-90437: Fix __main__.py documentation wording (GH-116309)
(cherry picked from commit cb688bab08)

Co-authored-by: Ali Tavallaie <tavallaie@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
2024-07-04 23:05:02 +00:00
Miss Islington (bot) 77ced7601c
[3.13] gh-121355: Fix incorrect word in simple_stmts.rst (GH-121356) (#121362)
(cherry picked from commit 715ec630dd)

Co-authored-by: Jongbum Won <71166964+Wondaeng@users.noreply.github.com>
2024-07-04 13:53:41 +00:00
Vinay Sajip 253c033251
[3.13] gh-121035: Update PNG image for logging flow diagram. (GH-121323) (GH-121324)
(cherry picked from commit 26d24eeb90)
2024-07-03 13:01:34 +01:00
Vinay Sajip 3302c5f155
[3.13] gh-121035: Further improve logging flow diagram with respect to dark/light modes. (GH-121265) (GH-121320)
[3.13] gh-121035: Further improve logging flow diagram with respect to dark/light modes. (GH-121265)
(cherry picked from commit 089835469d)
2024-07-03 11:41:18 +01:00
Vinay Sajip b62605d50f
[3.13] gh-121035: Improve logging flow diagram for dark/light modes. (GH-121254) (GH-121317)
(cherry picked from commit bfe0e4d769)
2024-07-03 11:01:50 +01:00
Miss Islington (bot) ee1db25bc0
[3.13] docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237) (#121309)
docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237)
(cherry picked from commit 4232976b02)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2024-07-03 08:23:51 +00:00
Miss Islington (bot) 78c77327a9
[3.13] gh-121196: Document `dict.fromkeys` params as pos-only (GH-121197) (#121242)
gh-121196: Document `dict.fromkeys` params as pos-only (GH-121197)
(cherry picked from commit 1dc9a4f6b2)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-07-01 20:43:34 +00:00
Miss Islington (bot) 931c168219
[3.13] gh-114104: clarify asynchronous comprehension docs to match runtime behavior (GH-121175) (#121234)
gh-114104: clarify asynchronous comprehension docs to match runtime behavior (GH-121175)
(cherry picked from commit 91313afdb3)

Co-authored-by: Danny Yang <yangdanny97@users.noreply.github.com>
2024-07-01 16:51:43 +00:00
Miss Islington (bot) af89237c9c
[3.13] [doc] Update element positions and styles in logging flow diagram. (GH-121182) (GH-121183)
(cherry picked from commit 2a455bbe8f)
2024-06-30 15:06:27 +01:00
Miss Islington (bot) 0dfb437a32
[3.13] gh-120522: Add a `--with-app-store-compliance` configure option to patch out problematic code (GH-120984) (#121173)
gh-120522: Add a `--with-app-store-compliance` configure option to patch out problematic code (GH-120984)

* Add --app-store-compliance configuration option.

* Added blurb.

* Correct tab-vs-spaces formatting issue.

* Correct source file name in docs.



* Correct source code reference in Mac docs



* Only apply the patch forward, and ensure the working directory is correct.

* Make patching reslient to multiple builds.

* Documentation fixes found during review



* Documentation and configure.ac syntax improvements



* Regenerate configure script.

* Silence the patch echo output.

---------

(cherry picked from commit 48cd104b0c)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-06-30 09:10:34 +08:00
Miss Islington (bot) 00b071137b
[3.13] GH-119054: Add alt text to pathlib inheritance diagram (GH-121158) (#121168)
GH-119054: Add alt text to pathlib inheritance diagram (GH-121158)
(cherry picked from commit 6b280a8498)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-29 18:02:53 +00:00
Miss Islington (bot) c70f1122b4
[3.13] GH-119054: Add "Expanding and resolving paths" section to pathlib docs. (GH-120970) (#121155)
GH-119054: Add "Expanding and resolving paths" section to pathlib docs. (GH-120970)

Add dedicated subsection for `home()`, `expanduser()`, `cwd()`,
`absolute()`, `resolve()` and `readlink()`. The position of this section
keeps all the `Path` constructors (`Path()`, `Path.from_uri()`,
`Path.home()` and `Path.cwd()`) near the top. Within the section, closely
related methods are kept adjacent. Specifically:

- `home()` and `expanduser()` (the former calls the latter)
- `cwd()` and `absolute()` (the former calls the latter)
- `absolute()` and `resolve()` (both make paths absolute)
- `resolve()` and `readlink()` (both read symlink targets)
- Ditto `cwd()` and `absolute()`
- Ditto `absolute()` and `resolve()`

The "Other methods" section is removed.

(cherry picked from commit d6d8707ff2)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-06-29 16:37:55 +01:00
Miss Islington (bot) d96a52e136
[3.13] gh-121101: Document -Wall option (an alias for -Walways) (GH-121102) (#121146)
gh-121101: Document -Wall option (an alias for -Walways) (GH-121102)
(cherry picked from commit 0a1e8ff9c1)

Co-authored-by: Wim Jeantine-Glenn <jump@wimglenn.com>
2024-06-29 13:57:11 +05:30
Miss Islington (bot) cbbd95328d
[3.13] doc: Mention the missing reflected special methods for all binary operations (GH-119931) (#120063)
doc: Mention the missing reflected special methods for all binary operations (GH-119931)
(cherry picked from commit bf5e1065f4)

Co-authored-by: Paulo Freitas <me@paulofreitas.me>
2024-06-29 12:12:35 +05:30
Miss Islington (bot) 58a3c3c0ad
gh-121115: Skip __index__ in PyLong_AsNativeBytes by default (GH-121118)
(cherry picked from commit 2894aa14f2)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-06-28 15:52:26 +00:00
Miss Islington (bot) 394dc93bf9
[3.13] gh-115986 Improve pprint docs formatting (GH-117401) (GH-121098)
* Move pprinter parameter descriptions to a table

* Make pprint doc with params markup

* Remove duplication of the parameters' description

---------

(cherry picked from commit 0890ad7c02)

Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-28 16:23:08 +02:00
Miss Islington (bot) 49a01d6290
[3.13] gh-121035: Update logging flow chart to include the lastResort handler. (GH-121036) (GH-121106)
(cherry picked from commit 237baf4d7a)
2024-06-27 22:59:19 +01:00
Miss Islington (bot) 49e5740135
[3.13] gh-121027: Add a future warning in functools.partial.__get__ (GH-121086) (#121092)
gh-121027: Add a future warning in functools.partial.__get__ (GH-121086)
(cherry picked from commit db96edd6d1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-27 12:13:01 +00:00
Miss Islington (bot) d7cd71c72a
[3.13] gh-120937: Reference weakref from the `__del__` documentation (GH-120940) (#121061)
gh-120937: Reference weakref from the `__del__` documentation (GH-120940)
(cherry picked from commit 1c13b29d54)

Co-authored-by: chaen <christophe.haen@cern.ch>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-26 20:24:25 +00:00
Miss Islington (bot) 1764a310e8
[3.13] Doc/README: Document 'make htmllive' (GH-120692) (#120990)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-06-25 09:25:54 +00:00
Miss Islington (bot) 6cddf1a611
[3.13] gh-120661: improve example for basic type hints (GH-120934) (#120987)
gh-120661: improve example for basic type hints (GH-120934)
(cherry picked from commit bb057ea107)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-06-25 09:25:29 +01:00
Barney Gale 4619f89296
[3.13] GH-119054: Add "Permissions and ownership" section to pathlib docs. (GH-120505) (#120967)
Add dedicated subsection for `pathlib.owner()`, `group()`, `chmod()` and
`lchmod()`.

(cherry picked from commit e4a97a7fb1)
2024-06-24 20:32:08 +01:00
Miss Islington (bot) 0a77058b79
[3.13] gh-120858: PyDict_Next should not lock the dict (GH-120859) (#120964)
PyDict_Next no longer locks the dictionary in the free-threaded build. Locking
around individual PyDict_Next calls is not sufficient because the function
returns borrowed references and because it allows concurrent modifications
during the iteraiton loop.

The internal locking also interferes with correct external synchronization
because it may suspend outer critical sections created by the caller.
(cherry picked from commit 375b723d58)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-06-24 18:41:19 +00:00
Miss Islington (bot) 447e07ab3d
[3.13] gh-119521: Rename IncompleteInputError to _IncompleteInputError and remove from public API/ABI (GH-119680, GH-120955) (GH-120944)
- gh-119521: Rename IncompleteInputError to _IncompleteInputError and remove from public API/ABI (GH-119680)
  (cherry picked from commit ce1064e4c9)

- gh-119521: Use `PyAPI_DATA`, not `extern`, for `_PyExc_IncompleteInputError` (GH-120955)
  (cherry picked from commit ac61d58db0)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-06-24 20:23:30 +02:00
Miss Islington (bot) a19a5895b5
[3.13] docs: puremagic.what() as replacement for imghdr.what() (GH-120871) (#120951)
docs: puremagic.what() as replacement for imghdr.what() (GH-120871)
(cherry picked from commit 22b8a35d6e)

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-06-24 13:49:13 +00:00
Miss Islington (bot) 206028dba9
[3.13] gh-112169: Documented getaddrinfo/getnameinfo default loop executor usage and implications. (GH-112191) (#120935)
gh-112169: Documented getaddrinfo/getnameinfo default loop executor usage and implications. (GH-112191)
(cherry picked from commit fc297b4ba4)

Co-authored-by: Alek Kowalczyk <alek.kowalczyk@gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-06-24 08:55:28 +00:00
Miss Islington (bot) 1aadb51838
[3.13] Docs makefile/RTD: Use uv if installed (GH-120711) (#120922)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-23 19:48:42 +00:00
Miss Islington (bot) d6791cd933
[3.13] Typing docs: normalize some indents in code examples (GH-120912) (#120915)
Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
2024-06-23 16:31:40 +00:00
Miss Islington (bot) 97acd29541
[3.13] gh-120896: Fix typo in version changed note of `urllib.parse.urlparse()` (GH-120898) (#120902)
gh-120896: Fix typo in version changed note of `urllib.parse.urlparse()` (GH-120898)
(cherry picked from commit b6fa8fe86a)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-06-23 18:28:06 +05:30
Miss Islington (bot) bf7aac3d25
[3.13] gh-119003: Clarify slice assignments (GH-119935) (#120847)
gh-119003: Clarify slice assignments (GH-119935)
(cherry picked from commit 462832041e)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-06-23 18:04:48 +05:30
Sam Gross 4dc27bc0b7
[3.13] gh-119344: Make critical section API public (GH-119353) (#120856)
This makes the following macros public as part of the non-limited C-API for
locking a single object or two objects at once.

* `Py_BEGIN_CRITICAL_SECTION(op)` / `Py_END_CRITICAL_SECTION()`
* `Py_BEGIN_CRITICAL_SECTION2(a, b)` / `Py_END_CRITICAL_SECTION2()`

The supporting functions and structs used by the macros are also exposed for
cases where C macros are not available.
(cherry picked from commit 8f17d69b7b)
2024-06-21 20:20:41 +00:00
Miss Islington (bot) e748805f2a
[3.13] gh-120838: Add a Note in the Docs About Expectations for Py_Finalize() (gh-120852)
(cherry picked from commit 03fa2df927, AKA gh-120839)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-06-21 19:21:47 +00:00
Miss Islington (bot) abdbf337d4
[3.13] gh-120773: document introspective attributes of an async generator object in the inspect module (GH-120778) (#120827)
gh-120773: document introspective attributes of an async generator object in the inspect module (GH-120778)
(cherry picked from commit 83d3d7aace)

Co-authored-by: blhsing <blhsing@gmail.com>
2024-06-21 16:58:46 +05:30
Miss Islington (bot) 730285519e
[3.13] gh-111259: Document idiomatic RE pattern (?s:.) that matches any character (GH-120745) (GH-120813)
(cherry picked from commit a2f6f7dd26)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-20 21:22:45 +00:00
Sam Gross 3cb6c4cd60
[3.13] gh-117511: Make PyMutex public in the non-limited API (GH-117731) (#120800)
(cherry picked from commit 3af7263037)
2024-06-20 16:00:25 +00:00
Mark Shannon b8fd80f91b
[3.13] GH-119462: Enforce invariants of type versioning. Backport of GH-120731. (#120748)
* Remove uses of Py_TPFLAGS_VALID_VERSION_TAG
2024-06-20 15:09:32 +01:00
Miss Islington (bot) d0a5e40f01
[3.13] Update the documentation howto index page and group docs into 3 logical sections (GH-119366, GH-120703) (GH-120646)
Update the documentation howto index page and group docs into 3 logical sections (GH-119366)

(cherry picked from commit a26d27e7ee)

Includes a follow-up fix to properly merge GH-119877:
* Add a link to free-threading HOWTO to the index (GH-120703)
  (cherry picked from commit 45d5cab533)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-06-20 10:24:14 +00:00
Jelle Zijlstra 8cfd005b6d
[3.13] gh-119698: fix `symtable.Class.get_methods` and document its behaviour correctly (GH-120151) (#120777)
(cherry picked from commit b8a8e04fec)


Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-06-19 22:27:23 -07:00
Miss Islington (bot) e415d2561b
[3.13] gh-118820: Zero-valued flag enum has no name (GH-118848) (GH-120759)
gh-118820: Zero-valued flag enum has no name (GH-118848)
(cherry picked from commit ed5ae6c4d7)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-06-19 15:11:30 -07:00
Miss Islington (bot) d3918eb89a
[3.13] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-120753) (#120757)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-06-19 20:10:33 +00:00
Miss Islington (bot) adef569278
[3.13] gh-120521: clarify except* documentation to allow tuples (GH-120523) (#120750)
(cherry picked from commit 58b3f11176)

Co-authored-by: Danny Yang <yangdanny97@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-06-19 12:07:04 -07:00
Miss Islington (bot) c598e61a22
[3.13] gh-119960: Add information about regex flags in re module functions (GH-119978) (#120730)
gh-119960: Add information about regex flags in re module functions (GH-119978)
(cherry picked from commit a86e6255c3)

Co-authored-by: Awbert <119314310+SweetyAngel@users.noreply.github.com>
2024-06-19 16:00:34 +05:30
Miss Islington (bot) 39c3f11f25
[3.13] gh-120381: Fix inspect.ismethoddescriptor() (GH-120684)
The `inspect.ismethoddescriptor()` function did not check for the lack of
`__delete__()` and, consequently, erroneously returned True when applied
to *data* descriptors with only `__get__()` and `__delete__()` defined.

(cherry picked from commit dacc5ac71a)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-06-19 17:01:09 +10:00
Miss Islington (bot) 1b028117d1
[3.13] gh-120496: Add a note about iterator thread-safe (gh-120685) (#120706)
gh-120496: Add a note about iterator thread-safe (gh-120685)
(cherry picked from commit 7e189aed64)

Co-authored-by: Donghee Na <donghee.na@python.org>
2024-06-19 13:15:44 +09:00
Miss Islington (bot) 1ce5984961
[3.13] gh-118789: Add `PyUnstable_Object_ClearWeakRefsNoCallbacks` (GH-118807) (#120695)
This exposes `PyUnstable_Object_ClearWeakRefsNoCallbacks` as an unstable
C-API function to provide a thread-safe mechanism for clearing weakrefs
without executing callbacks.

Some C-API extensions need to clear weakrefs without calling callbacks,
such as after running finalizers like we do in subtype_dealloc.
Previously they could use `_PyWeakref_ClearRef` on each weakref, but
that's not thread-safe in the free-threaded build.

(cherry picked from commit e8752d7b80)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-06-18 14:54:51 +00:00
Miss Islington (bot) 8c129d99ef
[3.13] gh-119241: Add HOWTO for free-threaded C API extensions (GH-119877) (#120693)
Some sections adapted from https://github.com/Quansight-Labs/free-threaded-compatibility/
written by Nathan Goldbaum.

(cherry picked from commit 02b272b702)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
2024-06-18 14:28:51 +00:00
Miss Islington (bot) 36b0052cb2
[3.13] gh-120662: Improve `smtplib` example (GH-120668) (#120681)
gh-120662: Improve `smtplib` example (GH-120668)
(cherry picked from commit 4bc27abdbe)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-18 12:12:58 +00:00
Jelle Zijlstra 7c47f93dff
[3.13] gh-119933: Improve ``SyntaxError`` message for invalid type parameters expressions (GH-119976) (#120641)
(cherry picked from commit 4bf17c381f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-06-17 08:01:49 -07:00
Miss Islington (bot) 3b28e430ed
[3.13] gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (GH-120480) (#120612)
gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (GH-120480)
(cherry picked from commit bac4edad69)


gh-112346: Describe the "os" byte in gzip output change.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-06-17 06:06:11 +00:00
Miss Islington (bot) 7655989a3a
[3.13] gh-118596: Add thread-safety clarifications to the SSLContext documentation (GH-118597) (#120595)
gh-118596: Add thread-safety clarifications to the SSLContext documentation (GH-118597)

Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](https://github.com/psf/requests/pull/6667) where the matter was clarified by @tiran in [this comment](https://github.com/psf/requests/pull/6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
(cherry picked from commit 4f59f86382)

Co-authored-by: mm-matthias <43849132+mm-matthias@users.noreply.github.com>
2024-06-16 20:43:20 +00:00
Miss Islington (bot) 96b784b61f
[3.13] Docs: remove temporary hardcoded links (GH-120348) (#120587)
Docs: remove temporary hardcoded links (GH-120348)
(cherry picked from commit b8484c6ad7)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-16 13:07:27 +00:00
Miss Islington (bot) d4e1d093d8
[3.13] gh-120572: add missing parentheses in TypeIs documentation (GH-120573) (#120575)
gh-120572: add missing parentheses in TypeIs documentation (GH-120573)
(cherry picked from commit 1fa595963e)

Co-authored-by: Nyuan Zhang <blueglassblock@outlook.com>
2024-06-16 05:51:29 +00:00
Miss Islington (bot) a19bb261a3
[3.13] gh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH-120486) (#120563)
gh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH-120486)

This matches the output behavior in 3.10 and earlier; the optimization in 3.11 allowed the zlib library's "os" value to be filled in instead in the circumstance when mtime was 0.  this keeps things consistent.
(cherry picked from commit 08d09cf5ba)

Co-authored-by: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
2024-06-15 19:10:50 +00:00
Miss Islington (bot) 29bbd5f8e4
[3.13] annotations: expand documentation on "simple" assignment targets (GH-120535) (#120555)
This behavior is rather surprising and it was not clearly specified.

(cherry picked from commit 9e0b11eb21)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-15 15:35:57 +00:00
Miss Islington (bot) da40fa3526
[3.13] gh-120361: Add `nonmember` test with enum flags inside to `test_enum` (GH-120364) (#120511)
gh-120361: Add `nonmember` test with enum flags inside to `test_enum` (GH-120364)

* gh-120361: Add `nonmember` test with enum flags inside to `test_enum`
(cherry picked from commit 7fadfd82eb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-06-14 22:08:21 +03:00
Miss Islington (bot) d5ad3b7fc8
[3.13] GH-119054: Add "Renaming and deleting" section to pathlib docs. (GH-120465) (#120472)
GH-119054: Add "Renaming and deleting" section to pathlib docs. (GH-120465)

Add dedicated subsection for `pathlib.Path.rename()`, `replace()`,
`unlink()` and `rmdir()`.
(cherry picked from commit d88a1f2e15)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-06-13 20:43:59 +00:00
Miss Islington (bot) e0f4dd8ec5
[3.13] GH-119054: Add "Creating files and directories" section to pathlib docs. (GH-120186) (#120462)
GH-119054: Add "Creating files and directories" section to pathlib docs. (GH-120186)

Add dedicated subsection for `pathlib.Path.touch()`, `mkdir()`,
`symlink_to()` and `hardlink_to()`. Also note that `open()`, `write_text()`
and `write_bytes()` are often used to create files.

(cherry picked from commit c2d810b6d4)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-13 18:17:57 +00:00
Miss Islington (bot) b1ebbb5d65
[3.13] gh-101575: document Decimal.__round__() (GH-101737) (GH-120394)
gh-101575: document Decimal.__round__() (GH-101737)
(cherry picked from commit 7dd8c37a06)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2024-06-13 09:07:37 +02:00
Miss Islington (bot) f0788cb419
[3.13] gh-120345: Fix incorrect use of the :class: role with the "()" suffix (GH-120347) (GH-120411)
* Remove "()" when refer to a class as a type.
* Use :func: when refer to a callable.
* Fix reference to the datetime.astimezone() method.
(cherry picked from commit 92c9c6ae14)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-12 14:51:35 +00:00
Miss Islington (bot) 8f5ce42f34
[3.13] gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131) (#120135)
gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131)

The argument to collapse_addresses() is now described as an *iterable*
(rather than *iterator*).
(cherry picked from commit f878d46e56)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
2024-06-12 09:23:24 +03:00
Miss Islington (bot) f465dfbdbc
[3.13] Fix typo in ElementTree docs (GH-120342) (#120357)
Fix typo in ElementTree docs (GH-120342)
(cherry picked from commit 0335662fe1)

Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
2024-06-11 17:24:29 +00:00
Miss Islington (bot) f6689d91b2
[3.13] gh-120276: Fix incorrect email.header.Header maxlinelen default (GH-120277) (GH-120279)
(cherry picked from commit 7c016deae6)

Co-authored-by: Clinton <pygeek@users.noreply.github.com>
2024-06-08 17:37:50 +00:00
Miss Islington (bot) a2003bd195
[3.13] gh-110383: Improve 'old string formatting' text in tutorial (GH-120219) (#120229)
(cherry picked from commit 225aab7f70)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-06-07 13:53:35 +00:00
Miss Islington (bot) ffa7d82a04
[3.13] gh-110383: Clarify "non-integral" wording in pow() docs (GH-119688) (#120206)
(cherry picked from commit 6646a9da26)

Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
2024-06-07 10:03:06 +00:00
Miss Islington (bot) 0e6605f633
[3.13] Add Plausible for docs metrics (GH-119977) (#120193)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Julien Palard <julien@palard.fr>
2024-06-07 10:42:19 +03:00
Miss Islington (bot) 56a7e04834
[3.13] gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762) (GH-120189)
gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762)

Adjust DeprecationWarning when testing element truth values in ElementTree, we're planning to go with the more natural True return rather than a disruptive harder to code around exception raise, and are deferring the behavior change for a few more releases.
(cherry picked from commit 6b606522ca)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2024-06-07 03:43:17 +00:00
Barney Gale d4566c0cfc
[3.13] GH-119054: Add "Reading directories" section to pathlib docs (GH-119956) (#120183)
Add a dedicated subsection for `Path.iterdir()`-related methods,
specifically `iterdir()`, `glob()`, `rglob()` and `walk()`.

(cherry picked from commit 14e1506a6d)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-06-07 01:23:49 +01:00
Miss Islington (bot) 8e0c80a486
[3.13] gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contextlib.suppress (GH-119657) (#120105)
gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contextlib.suppress (GH-119657)
(cherry picked from commit 5c02ea8bae)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-06-05 12:15:51 +00:00
Miss Islington (bot) df8a98abee
[3.13] gh-120078: Fix struct_time attr typo tm_day -> tm_mday in Doc/library/time.rst (GH-120085)
(cherry picked from commit b6b0dcbfc0)

Co-authored-by: shurj0 <60540027+shurj0@users.noreply.github.com>
2024-06-05 00:39:54 +00:00
Miss Islington (bot) a653562072
[3.13] gh-114616: Improve docs regarding changes to caches representation in dis (GH-120033) (#120079)
gh-114616: Improve docs regarding changes to caches representation in dis (GH-120033)
(cherry picked from commit 770f3c1ead)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-06-04 23:15:39 +00:00
Miss Islington (bot) 54023a63cc
[3.13] Fix incorrect pull GitHub link in What's New (GH-120045) (#120052)
Co-authored-by: Trey Hunner <trey@treyhunner.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-04 11:06:14 -06:00
Miss Islington (bot) 6725c78d37
[3.13] gh-119588: Update docs to reflect decision to include the change with Python 3.13 and not 3.12. (GH-120043) (#120046)
gh-119588: Update docs to reflect decision to include the change with Python 3.13 and not 3.12. (GH-120043)
(cherry picked from commit 4dcd91ceaf)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-06-04 15:39:49 +00:00
Miss Islington (bot) 34a6d89788
[3.13] gh-119588: Implement zipfile.Path.is_symlink (zipp 3.19.0). (GH-119591) (#119985)
gh-119588: Implement zipfile.Path.is_symlink (zipp 3.19.0). (GH-119591)
(cherry picked from commit 42a34ddb0b)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-06-04 10:56:06 -04:00
Miss Islington (bot) 1177897551
[3.13] gh-111389: Add PyHASH_MULTIPLIER constant (GH-119214) (#119334)
gh-111389: Add PyHASH_MULTIPLIER constant (GH-119214)
(cherry picked from commit f6da790122)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-06-04 09:26:25 +02:00
Miss Islington (bot) 6db1eb98a4
[3.13] gh-119968: Improved monitoring c-api docs (GH-119969) (#119971)
gh-119968: Improved monitoring c-api docs (GH-119969)
(cherry picked from commit cae4c80714)

Co-authored-by: Awbert <119314310+SweetyAngel@users.noreply.github.com>
2024-06-03 09:49:14 +00:00
Miss Islington (bot) 3709e1bbad
[3.13] gh-109975: What's New in Python 3.13: fix broken link for `telnetlib` alternative (GH-119958) (#119959)
(cherry picked from commit 117a8acdab)

Co-authored-by: Solomon Himelbloom <7608183+TechSolomon@users.noreply.github.com>
2024-06-03 00:59:41 +00:00
Miss Islington (bot) d33b0868d6
[3.13] GH-119054: Add "Reading and writing files" section to pathlib docs (GH-119524) (#119954)
Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.

(cherry picked from commit bd6d4ed645)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-06-02 19:58:41 +00:00
Barney Gale 590fd9ccd4
[3.13] GH-119054: Add "Querying file type and status" section to pathlib docs (GH-119055) (#119951)
Add a dedicated subsection for `Path.stat()`-related methods, specifically
`stat()`, `lstat()`, `exists()`, `is_*()`, and `samefile()`.

(cherry picked from commit 81d6336230)
2024-06-02 20:37:01 +01:00
Miss Islington (bot) cfec22ce19
[3.13] Improve documentation for typing.get_type_hints (GH-119928) (#119943)
- Explicit list of what it does that is different from
  "just return __annotations__"
- Remove reference to PEP 563; adding the future import doesn't
  do anything to type aliases, and in general it will never make
  get_type_hints() less likely to fail.
- Remove example, as the Annotated docs already have a similar
  example, and it's unbalanced to have one example about this
  one edge case but not about other behaviors of the function.

(cherry picked from commit aa9fe98e06)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-02 15:29:25 +00:00
Miss Islington (bot) cf8f292a36
[3.13] gh-118934: Fix PyEval_GetLocals docs (PEP 667) (GH-119934)
PEP 667's description of the planned changes to PyEval_GetLocals
was internally inconsistent when accepted, so the docs added for
gh-74929 didn't match either the current behaviour or the intended
behaviour once gh-118934 is fixed.

This PR updates the documentation and 3.13 What's New to match the
intended behaviour (once gh-118934 is fixed).

It also tidies up lingering references to `f_locals` always being a
dictionary (this hasn't been true since at least when custom
namespace support for class statement execution was added)
(cherry picked from commit fd6cd621e0)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-06-02 05:57:17 +00:00
Miss Islington (bot) 36ca00f44d
[3.13] gh-118888: Further PEP 667 docs updates (gh-119894)
* Clarify impact on default behaviour of exec, eval, etc
* Update documentation for changes to PyEval_GetLocals (gh-74929)

Closes gh-118888
(cherry picked from commit 2180991ea3)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-06-02 15:41:25 +10:00
Miss Islington (bot) edb6883ef3
[3.13] gh-119016: Remove outdated sentences from the "classes" tutorial (GH-119130) (#119925)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-01 21:35:03 +00:00
Miss Islington (bot) 99d0f51e61
[3.13] Add unique() recipe to itertools docs (gh-119911) (gh-119916) 2024-06-01 12:06:04 -05:00
Miss Islington (bot) 0a266f7e74
[3.13] gh-74929: PEP 667 C API documentation (gh-119892)
* Add docs for new APIs
* Add soft-deprecation notices
* Add What's New porting entries
* Update comments referencing `PyFrame_LocalsToFast()` to mention the proxy instead
* Other related cleanups found when looking for refs to the deprecated APIs

(cherry picked from commit 3859e09e3d)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-06-01 04:23:04 +00:00
Miss Islington (bot) 5e8396e684
[3.13] doc: Add glossary entry for "free threading" (GH-119865) (#119874)
(cherry picked from commit 9bc6045842)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-05-31 17:42:36 +00:00
Miss Islington (bot) eb5e19aa68
[3.13] contextlib docs: Clean up redundant 'up' after 'cleanup' (GH-119872)
Reported by Michael Kass on docs@
(cherry picked from commit f3fc800d5f)
2024-05-31 17:39:02 +00:00
Miss Islington (bot) 24e3a8a9a6
[3.13] gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364) (#119869)
gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364)
(cherry picked from commit 015b1fdd0a)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-05-31 17:27:55 +00:00
Miss Islington (bot) d6faac6d1f
[3.13] gh-111201: Support pyrepl on Windows (GH-119559) (GH-119850)
(cherry picked from commit 0d07182821)

Co-authored-by: Dino Viehland <dinoviehland@gmail.com>
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-05-31 17:18:28 +02:00
Miss Islington (bot) 1e75dc7324
[3.13] Docs: `shutil.rmtree`'s `onerror` has no pending removal version (GH-118947) (#119804)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-05-30 20:52:43 +00:00
Miss Islington (bot) 844b535c51
[3.13] gh-109218: Improve documentation for the complex() constructor (GH-119687) (GH-119803)
* Remove the equivalence with real+imag*1j which can be incorrect in corner
  cases (non-finite numbers, the sign of zeroes).
* Separately document the three roles of the constructor: parsing a string,
  converting a number, and constructing a complex from components.
* Document positional-only parameters of complex(), float(), int() and bool()
  as positional-only.
* Add examples for complex() and int().
* Specify the grammar of the string for complex().
* Improve the grammar of the string for float().
* Describe more explicitly the behavior when real and/or imag arguments are
  complex numbers. (This will be deprecated in future.)
(cherry picked from commit ec1ba26460)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-30 20:44:20 +00:00
Miss Islington (bot) 608cfb8b41
[3.13] gh-119729: Use 't' in pkg-config file name for free-threaded build (GH-119738) (#119797)
For example, the free-threaded build now generates
`lib/pkgconfig/python-3.13t.pc` and the debug build generates
`lib/pkgconfig/python-3.13d.pc`.
(cherry picked from commit 1c04c63ced)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-05-30 18:17:05 +00:00
Miss Islington (bot) a7327b31e3
[3.13] gh-119779: Fix pyporting howto docs (GH-119785) (#119788)
gh-119779: Fix pyporting howto docs (GH-119785)
(cherry picked from commit 6fb191be15)

Co-authored-by: Awbert <119314310+SweetyAngel@users.noreply.github.com>
2024-05-30 16:09:31 +00:00
Miss Islington (bot) d1c7f5ed08
[3.13] gh-118055: Update the finder glossary entry (GH-118278) (GH-119773)
gh-118055: Update the finder glossary entry (GH-118278)
(cherry picked from commit db009348b4)

Co-authored-by: Lincoln <71312724+Lincoln-developer@users.noreply.github.com>
2024-05-30 09:07:59 +00:00