Commit Graph

28348 Commits

Author SHA1 Message Date
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
Miss Islington (bot) 1eddc9e6b6
[3.13] subprocess docs: Fix semantically important typo (GH-119752) (#119757)
subprocess docs: Fix semantically important typo (GH-119752)

GH-25416 accidentally replaced a reference to the *stderr* argument of
`subprocess.run` with a reference to the *stdin* argument.  *stdin* is
not affected by the `check_output` option.
(cherry picked from commit 2cc3502f98)

Co-authored-by: Zachary Ware <zach@python.org>
2024-05-30 08:50:11 +01:00
Miss Islington (bot) 06c62d697a
[3.13] gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentation and Tests (GH-119480) (#119760)
gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentation and Tests (GH-119480)
(cherry picked from commit bf4ff3ad2e)

Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
Co-authored-by: Carl Meyer <carl@oddbird.net>
2024-05-30 01:28:31 +00:00
Miss Islington (bot) cc8586a1ed
[3.13] Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409) (GH-119483)
Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409)
(cherry picked from commit ffa24aab10)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-05-28 16:55:37 +02:00
Miss Islington (bot) 47fb0f82cd
[3.13] [doc] Clarify the nature of the root logger in the `logging` documentation (GH-119440) (GH-119651)
(cherry picked from commit b407ad38fb)
2024-05-28 15:04:46 +01:00
Miss Islington (bot) 7322ff1561
[3.13] gh-119317: findall instead of traverse for docutils nodes (GH-119319) (#119486)
gh-119317: findall instead of traverse for docutils nodes (GH-119319)
(cherry picked from commit 0867bce457)

Co-authored-by: Carlos Meza <hire@carlosmeza.com>
2024-05-27 23:46:15 +00:00
Hugo van Kemenade 0a4a3184f5
[3.13] Docs: Move inline JavaScript to own file to reduce duplication (GH-119541) (#119630) 2024-05-27 12:49:52 -06:00
Miss Islington (bot) 8117cb5f01
[3.13] Misc cleanups and wording improvements for the itertools docs (gh-119626) (gh-119629) 2024-05-27 13:44:11 -05:00
Miss Islington (bot) 9edf0109eb
[3.13] gh-119580: Improve version added section for convenience variable (GH-119583) (#119624)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-05-27 18:13:01 +00:00
Miss Islington (bot) ba71835fa5
[3.13] Docs: Only install sphinx-autobuild for `make htmllive` (GH-119607) (#119621)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-05-27 17:44:55 +00:00
Miss Islington (bot) f1302c1e47
[3.13] gh-119467: Fix Py_buffer.format type and correct documentation typo (GH-119475) (#119602)
gh-119467: Fix Py_buffer.format type and correct documentation typo (GH-119475)
(cherry picked from commit 3b26cd8ca0)

Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
2024-05-27 12:34:13 +00:00
Miss Islington (bot) 3f0198d927
[3.13] docs: fix a few typos identified by codespell (GH-119516) (#119570)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-05-26 08:20:37 +00:00
Miss Islington (bot) 317cc3bcd2
[3.13] FAQ: Add reference to Python version numbering scheme (GH-119225) (#119544)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-05-25 14:29:47 +00:00
Miss Islington (bot) f49749cf8f
[3.13] gh-111999: Fix the signature of str.format_map() (GH-119540) (#119543)
(cherry picked from commit 08e65430aa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-25 13:46:41 +00:00
Raymond Hettinger 5544651350
[3.13] Misc improvement to the docs for itertools (gh-119529) (#119531)
Misc improvement to the docs for itertools (gh-119529)
2024-05-24 17:26:25 -05:00
Miss Islington (bot) 392a3d8ade
[3.13] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-119520) (#119522)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-05-24 14:01:44 -06:00
Miss Islington (bot) c864efba25
[3.13] gh-118692: Avoid creating unnecessary StopIteration instances for monitoring (GH-119216) (#119497)
* gh-118692: Avoid creating unnecessary StopIteration instances for monitoring (GH-119216)
(cherry picked from commit 6e9863d7a3)

---------

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-05-24 10:18:13 +00:00
Miss Islington (bot) 89e2689545
[3.13] gh-90562: Mention slots pitfall in dataclass docs (GH-107391) (#119350)
Co-authored-by: Josh Cannon <joshdcannon@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-05-23 00:16:19 -06:00
Miss Islington (bot) a6ed7425d8
[3.13] gh-70795: Rework RLock documentation (GH-103853) (#119436)
gh-70795: Rework RLock documentation (GH-103853)

Attempted to simultaneously reduce verbosity, while more descriptively
describing behavior.

Fix links (RLock acquire/release previously linking to Lock
acquire/release, seems like bad copy pasta).

Add a seealso for with-locks.

Switch section to use bullet points.

---------

(cherry picked from commit 2fbea81d64)

Co-authored-by: uıɐɾ ʞ ʇɐɯɐs <_@skj.io>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2024-05-22 14:21:58 -07:00
Miss Islington (bot) 0bd7c879cf
[3.13] gh-112066: Fix versionadded in PyDict_SetDefaultRef docs (GH-118696) (#119430)
(cherry picked from commit 447edb6e98)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2024-05-22 15:36:35 -04:00
Miss Islington (bot) 414346e56d
[3.13] Fix version number in use_load_tests deprecation reference (GH-119151) (GH-119386)
Deprecation took place in d78742a260 (3.5)
(cherry picked from commit aee8f03abb)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2024-05-22 09:58:59 +00:00
Miss Islington (bot) f757996942
[3.13] Clarify that dklen is expected in bytes for the hashlib functions (GH-106624) (GH-119383)
(cherry picked from commit 5adf78f546)

Co-authored-by: Mathijs Mortimer <thiezn@users.noreply.github.com>
2024-05-22 09:10:02 +00:00
Miss Islington (bot) b5b0e3210d
[3.13] DOCS: fix error in exec namespace note (gh-119380)
When updating the new exec note added in gh-119235 as part of the
PEP 667 general docs PR, I suggested a workaround that isn't valid.

The first half of the note is still reasonable, so just omit the invalid text.

(cherry picked from commit 31d61a75c9)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-05-22 06:58:36 +00:00
Miss Islington (bot) 455b386234
[3.13] gh-110383: Align dict.get(), .fromkeys(), and .setdefault() docs with docstrings (GH-119330) (#119370)
(cherry picked from commit 0e3c8cda1f)

Co-authored-by: Landon Wood <landon@elkrange.com>
2024-05-22 01:31:56 +00:00
Miss Islington (bot) 05820164ce
[3.13] Docs: Add central references to free-threading-related options (GH-119017) (#119367)
Docs: Add central references to free-threading-related options (GH-119017)
(cherry picked from commit 9fa206aaec)

Co-authored-by: Brett Simmers <swtaarrs@users.noreply.github.com>
2024-05-21 23:16:59 +00:00
Miss Islington (bot) 256b791fd6
[3.13] gh-110383: Document `socket.makefile()` accepts combined modes (GH-119150) (#119324)
The supported mode values are 'r', 'w', and 'b', or a combination of those.
(cherry picked from commit 62a29be5bb)

Co-authored-by: Daniel Williams <dann0a@gmail.com>
2024-05-21 18:44:53 +00:00
Miss Islington (bot) 11ca1d9d53
[3.13] GH-110383: Improve Tutorial for Input Ouput (GH-119230) (GH-119326)
GH-110383: Improve Tutorial for Input Ouput (GH-119230)

(cherry picked from commit 9db2fd7eda)

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
2024-05-21 19:54:26 +02:00
Hugo van Kemenade 1929b7e2bf
[3.13] Docs: Ensure no warnings are found in the NEWS file before a given line number (GH-119221) (#119261) 2024-05-21 08:40:08 -06:00
Miss Islington (bot) db64dae745
[3.13] gh-74929: PEP 667 general docs update (gh-119291)
* expand on What's New entry for PEP 667 (including porting notes)
* define 'optimized scope' as a glossary term
* cover comprehensions and generator expressions in locals() docs
* review all mentions of "locals" in documentation (updating if needed)
* review all mentions of "f_locals" in documentation (updating if needed)

(cherry picked from commit e870c852c0)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-05-21 21:35:26 +10:00
Miss Islington (bot) 24b0e8ddb4
[3.13] gh-118912: Remove description of issue fixed in 3.5 from autospeccing guide (GH-119232) (#119284)
gh-118912: Remove description of issue fixed in 3.5 from autospeccing guide (GH-119232)

* Remove description of issue fixed in 3.5 from autospeccing guide

* Make autospeccing note text more succint and lint whitespace

* Add linting changes (missed in last commit)

---------

(cherry picked from commit 7e57640c7e)

Co-authored-by: Shauna <shaunagm@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-05-20 23:50:23 +00:00
Miss Islington (bot) d8fbe5b64a
[3.13] gh-108267 Fix another dataclasses docs typo (GH-119277) (#119279)
gh-108267 Fix another dataclasses docs typo (GH-119277)
(cherry picked from commit 423bbcbbc4)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-20 22:53:32 +00:00
Miss Islington (bot) b4462aaed6
[3.13] gh-118760: Restore the default value of tkinter.wantobjects to 1 (GH-118784) (GH-119251)
It was set to 2 in 65f5e586a1 (GH-98592).
(cherry picked from commit e188527c34)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-20 20:28:42 +00:00
Miss Islington (bot) 906f6cb656
[3.13] Use correct markup in unittest.mock.reset_mock documentation (GH-119207) (GH-119250)
Use correct markup in unittest.mock.reset_mock documentation (GH-119207)
(cherry picked from commit 6b80a5b20f)

Co-authored-by: Tialo <65392801+Tialo@users.noreply.github.com>
2024-05-20 22:12:38 +02:00
Miss Islington (bot) fda3291643
[3.13] DOCS: Suggest always calling exec with a globals argument and no locals argument (GH-119235) (#119239)
DOCS: Suggest always calling exec with a globals argument and no locals argument (GH-119235)

Many users think they want a locals argument for various reasons but they do not
understand that it makes code be treated as a class definition. They do not want
their code treated as a class definition and get surprised. The reason not
to pass locals specifically is that the following code raises a `NameError`:

```py
exec("""
def f():
    print("hi")

f()

def g():
    f()
g()
""", {}, {})
```

The reason not to leave out globals is as follows:

```py
def t():
    exec("""
def f():
    print("hi")

f()

def g():
    f()
g()
    """)
```
(cherry picked from commit 7e1a130b8f)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2024-05-20 18:15:25 +00:00
Miss Islington (bot) 8f3fc01c4c
[3.13] [docs] TypeVarTuple default is keyword-only (GH-119215) (#119224)
(cherry picked from commit e406b399f9)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2024-05-20 15:57:19 +00:00
Miss Islington (bot) cbf064b096
[3.13] typing docs: Fix formatting issue (GH-119210) (#119212)
typing docs: Fix formatting issue (GH-119210)
(cherry picked from commit 72d07dd30b)

Co-authored-by: David Foster <david@dafoster.net>
2024-05-20 15:08:49 +00:00
Miss Islington (bot) bc5e47ccb7
[3.13] marshal docs: Remove reference to "Sun" (GH-119161) (#119167)
Nobody has been using a Sun machine for a long time. When I saw
this sentence in a lightning talk just now, I thought it was talking
about sending Python code on a spacecraft.
(cherry picked from commit 697465ff88)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-19 02:33:04 +00:00
Miss Islington (bot) 641e59db59
[3.13] docs: make mimalloc license text literal (GH-119046) (#119149)
docs: make mimalloc license text literal (GH-119046)
(cherry picked from commit 691429702f)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-05-18 16:40:07 +00:00
Miss Islington (bot) 1bb3a9df1b
[3.13] gh-119078: Clarify venv tutorial (GH-119129) (GH-119142)
(cherry picked from commit 0f5e8bed63)
2024-05-18 13:06:23 +01:00
Miss Islington (bot) 374655fa83
[3.13] Minor improvements to the docs for itertools.tee() (gh-119135) (gh-119136) 2024-05-18 01:51:04 -05:00
Miss Islington (bot) c69fe804b6
[3.13] gh-108267: Fix object.__setattr__ regression in dataclasses docs (GH-119082) (#119097)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-05-16 13:56:42 +00:00
Miss Islington (bot) bca7fb0e7a
[3.13] Use literal syntax in origin property (GH-119029) (#119083)
Use literal syntax in origin property (GH-119029)
(cherry picked from commit 66b73e9724)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-05-16 05:30:33 +00:00
Miss Islington (bot) 7c224dd4cc
[3.13] gh-119009: Add gettext target (GH-119006) (#119074)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-05-15 18:31:55 +00:00
Miss Islington (bot) dd8a61f901
[3.13] 3.13 What's New: Add PEP 702 (GH-118922) (#119062)
I honestly forgot this slipped into 3.13, but I think it's worth highlighting more, as it is a PEP-sized change that makes the type system significantly more powerful.

@Yhg1s I think it's also worth mentioning in your release announcements.
(cherry picked from commit ee13797dec)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-15 02:56:37 +00:00
Miss Islington (bot) 8439d09aa1
[3.13] Misc improvements to the itertools docs (gh-119040) (#119045) 2024-05-14 15:38:53 +00:00
Miss Islington (bot) 87f683e09a
[3.13] Itertools docs: fix parameter names and indentation in Python equivalents (gh-118977) (#119043) 2024-05-14 15:11:31 +00:00
Miss Islington (bot) d1aac22b7a
[3.13] gh-119010: Adds docs about `__type_params__` to `functools.update_wrapper` (GH-119012) (#119013)
gh-119010: Adds docs about `__type_params__` to `functools.update_wrapper` (GH-119012)
(cherry picked from commit b04c497f18)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-13 20:19:10 +00:00
Miss Islington (bot) 941883208c
[3.13] Improve the `rmtree` doc for `dir_fd` param addition in 3.11 (GH-118964) (#118991)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-13 11:21:10 +00:00
Miss Islington (bot) 0874a400a8
[3.13] Correct the argument names for `secrets.choice` and `secrets.randbelow` in `secrets.rst` (GH-118098) (GH-118906)
Correct the argument names for `secrets.choice` and `secrets.randbelow` in `secrets.rst` (GH-118098)

Correct the argument names for `secrets.choice` and `secrets.randbelow` in `secrets.rst`.
(cherry picked from commit c444362c6e)

Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
2024-05-10 14:56:33 +00:00
Miss Islington (bot) 7dc9875d55
gh-118209: Add Windows structured exception handling to mmap module (GH-118213)
(cherry picked from commit e85e8deaf3)

Co-authored-by: Dobatymo <Dobatymo@users.noreply.github.com>
2024-05-10 12:00:00 +01:00
Miss Islington (bot) 760b3f08dc
gh-118689: Doc: fix ePub build (GH-118690)
(cherry picked from commit 7ac933e260)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2024-05-10 10:40:35 +00:00
Miss Islington (bot) 00ec116883
[3.13] gh-118851: Default ctx arguments to AST constructors to Load() (GH-118854) (#118871)
(cherry picked from commit 68fbc00dc8)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-09 22:52:42 +00:00
Steve Dower d86b494117
gh-118486: Update docs for CVE-2024-4030 reference (GH-118737)
Update docs for CVE-2024-4030 reference
2024-05-09 12:52:11 +01:00
Miss Islington (bot) 8f31af68d0
[3.13] Format None, True, False and NotImplemented as literals (GH-118758) (GH-118792)
(cherry picked from commit 05c2fe1acd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-08 19:55:12 +00:00
Miss Islington (bot) c33bba6eb3
[3.13] docs: module page titles should not start with a link to themselves (GH-117099) (#118790)
docs: module page titles should not start with a link to themselves (GH-117099)
(cherry picked from commit bcb435ee8f)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-05-08 19:52:39 +00:00
Miss Islington (bot) 02d49af219
[3.13] Docs: fix typos in documentation (GH-118752) (#118787)
Docs: fix typos in documentation (GH-118752)
(cherry picked from commit 7b0c247f1c)

Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
2024-05-08 19:24:39 +00:00
Thomas Wouters 2268289a47 Python 3.13.0b1 2024-05-08 11:21:00 +02:00
trag1c c4f9823be2
gh-118671: Updated dead ActiveState links (#118730)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-05-08 01:06:38 -06:00
Kirill Podoprigora fcf52d7cee
Regen ``Doc/requirements-oldest-sphinx.txt`` (#118736)
Regen dependencies
2024-05-08 08:59:17 +03:00
T. Wouters f548855061
gh-109975: Make a rough editorial pass over What's New (#118711)
Make a rough editorial pass over Python 3.13's What's New document. Add the
release highlights, remove or merge some duplicated entries, and reorder
some of the sections (removals should really go before future deprecations).
2024-05-07 23:00:25 +02:00
chrysn f58833ebf8
gh-118650: Document `Enum._repr_*` reservation exclusion (GH-118698) 2024-05-07 11:11:18 -07:00
Pablo Galindo Salgado b9caa0977c
gh-118518: Improve perf docs (#118708) 2024-05-07 17:25:15 +01:00