Commit Graph

1097 Commits

Author SHA1 Message Date
Stan Ulbrych b1d2d9829c Docs: Fix a typo in the 'Non-ASCII characters in names' section (#148043) 2026-04-04 17:45:52 +01:00
Lysandros Nikolaou 847f83ef1c gh-142518: Add thread safety notes for the buffer protocol (#145911) 2026-03-18 14:18:28 +01:00
Cody Maloney cf7c67b7c6 gh-101100: Fix sphinx reference warnings around I/O (#139592)
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2026-03-11 10:02:23 +02:00
Ali Towaiji 2114da976c gh-145591: Move slicing note to __getitem__ (GH-145606) 2026-03-10 16:48:41 +01:00
Hugo van Kemenade 6024d3c6da Python 3.15.0a7 2026-03-10 14:31:15 +02:00
indoor47 11eec7a492 gh-145305: Update ocert.org URLs in docs from http to https (#145304)
Co-authored-by: Adam (indoor47) <adamai@agentmail.to>
2026-02-27 18:24:39 +02:00
Petr Viktorin 112d8ac972 gh-141984: Reword and reorganize the first part of Atoms docs (GH-144117)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-18 14:13:21 +01:00
Serhiy Storchaka 9e8fa2d4d1 gh-144386: Update equivalent code for "with", "async with" and "async for" (GH-144472)
They use special method lookup for special methods.
2026-02-18 13:13:32 +02:00
Pablo Galindo Salgado 46d5106cfa gh-142349: Implement PEP 810 - Explicit lazy imports (#142351)
Co-authored-by: T. Wouters <twouters@meta.com >
Co-authored-by: Brittany Reynoso <breynoso@meta.com>
Co-authored-by: Dino Viehland <dinoviehland@meta.com>
2026-02-12 00:15:33 +00:00
Hugo van Kemenade 15b216f30d Python 3.15.0a6 2026-02-11 14:23:15 +02:00
Serhiy Storchaka c81e1843d4 gh-74955: Document that __all__ must contain strings in normalization form NFKC (GH-144504) 2026-02-05 20:06:33 +02:00
Petr Viktorin e423e0c2cc gh-141984: Reword and reorganize Subscription (and Slicing) docs (GH-141985)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-04 16:08:23 +00:00
adam j hartz ccbe41e27c gh-143055: Implementation of PEP 798 (#143056)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-01-30 20:37:52 -08:00
Victor Stinner 933540e332 gh-101888: Add function.__builtins__ to ref documentation (#144174) 2026-01-26 17:15:47 +01:00
Petr Viktorin f0a0467c17 gh-143054: Disallow non-top-level Cut for now (GH-143622)
The behaviour of Cut in nested parentheses, Repeat, Opt, and similar
is somewhat chaotic. Apparently even the academic papers on PEG aren't
as clear as they could be.

And it doesn't really matter. Python only uses top-level cuts.
When that changes, we can clarify as much as necessary (and even
change the implementation to make sense for what we'll need).

Document that this is deliberately unspecified, and add a test to
make sure any decision is deliberate, tested and documented.
2026-01-13 13:21:59 +01:00
James Hilton-Balfe 265381b7e8 gh-128335: Make slice generic at runtime (#128336)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-01-11 11:27:24 -08:00
Serhiy Storchaka 4d21297d28 gh-41779: Allow defining any __slots__ for a class derived from tuple (GH-141763) 2026-01-06 11:36:00 +02:00
Thanos 79c03ac001 gh-69686: Remove untrue part of __import__ replacement docs (#143261)
Remove untrue part of `__import__` replacement docs

The original statement effectively says that replacing `__import__` at global scope affects import statements, and not only that, but only import statements within the rest of the executing module. None of that has been true since at least Python 2.7, I think.

This was likely missed in python/cpython#69686.
2025-12-29 21:16:54 -08:00
Hugo van Kemenade f1eb0c0b0c Python 3.15.0a3 2025-12-16 14:26:12 +02:00
SYan212 39ecb17103 typo fixes in docs (#142683) 2025-12-14 13:47:22 +05:30
dr-carlos e5a48480c0 Add missing comma to tuple in except* docs (#142395) 2025-12-14 00:51:35 +02:00
Brett Cannon af185727b2 GH-65961: Stop setting __cached__ on modules (GH-142165) 2025-12-11 11:44:46 -08:00
Brett Cannon 880a7905ca GH-97850: Remove all uses and definitions of load_module() from importlib (#142205) 2025-12-10 15:35:51 -08:00
Serhiy Storchaka 1d8f3ed2eb gh-101100: Fix references to the set methods (GH-141857) 2025-12-05 16:22:38 +02:00
Petr Viktorin aea5531583 gh-135676: Reword the f-string (and t-string) section (GH-137469)
Much of the information was duplicated in stdtypes.rst; this PR keeps lexical/syntactical details in Lexical Analysis and the evaluation & runtime behaviour in Standard types, with cross-references between the two.
Since the t-string section only listed differences from f-strings, and the grammar for the two is equivalent, that section was moved to Standard types almost entirely.

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-03 16:14:53 +01:00
Petr Viktorin 2ff8608b4d gh-135676: Simplify docs on lexing names (GH-140464)
This simplifies the Lexical Analysis section on Names (but keeps it technically correct) by putting all the info about non-ASCII characters in a separate (and very technical) section.

It uses a mental model where the parser doesn't handle Unicode complexity “immediately”, but:

- parses any non-ASCII character (outside strings/comments) as part of a name, since these can't (yet) be e.g. operators
- normalizes the name
- validates the name, using the xid_start/xid_continue sets


Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Micha Albert <info@micha.zone>
Co-authored-by: KeithTheEE <kmurrayis@gmail.com>
2025-11-26 16:10:44 +01:00
Serhiy Storchaka 4bcab461c2 gh-41779: Allow defining the __dict__ and __weakref__ __slots__ for any class (GH-141755) 2025-11-19 17:11:37 +00:00
Ned Batchelder 237dca52ba Docs: replace an esoteric Von Neumann mention (#137598)
* Docs: replace an esoteric Von Neumann mention

* oops, don't need to edit topics.py
2025-10-20 10:01:20 -04:00
Furkan Onder faa169afa0 gh-66646: Explain __base__ attribute in the docs (GH-102554)
Co-authored-by: Éric <merwok@netwok.org>
2025-10-20 14:15:30 +02:00
Stan Ulbrych 1624c646b0 gh-140065: Lexical analysis: Correct note about leading zeros in floating point numbers (GH-140066) 2025-10-15 15:15:45 +00:00
Irit Katriel fb25d6b35c gh-97914: Reword misleading sentence on conditional expressions (#139064)
Co-authored-by: Gilles Peiffer <gilles.peiffer.yt@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-10-14 11:21:13 +03:00
Petr Viktorin 59a6f9d8c5 gh-135676: Add a summary of source characters (GH-138194)
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Micha Albert <info@micha.zone>
Co-authored-by: KeithTheEE <kmurrayis@gmail.com>
2025-10-08 16:34:19 +02:00
Adam Turner 3195da0b1a gh-105812: Use the `:deco:` role in place of manual decorator markup (#139619) 2025-10-05 21:15:36 +01:00
Eric Snow 46a1f0a9ff gh-135944: Add a "Runtime Components" Section to the Execution Model Docs (gh-135945)
The section provides a brief overview of the Python runtime's execution environment.  It is meant to be implementation agnostic,
2025-10-02 09:13:22 -06:00
sobolevn 848d926786 Make sure the `:keyword: role works for case` (#138878) 2025-09-21 11:49:49 +01:00
Irit Katriel a651ec9524 gh-135629: rewrite language reference section on except* to improve clarity (#136150) 2025-09-16 13:56:51 +01:00
Kian Eliasi 481588ad4c gh-138871: Clarify NameError exception in 'del' (#138881) 2025-09-15 02:11:01 -04:00
Benjamin Peterson 5bd4bf04c4 closes gh-138706: update Unicode to 17.0.0 (#138719) 2025-09-11 09:58:39 -07:00
Adam Turner d0c9943869 GH-138562: Remove `sort()` from the common sequence methods in the data model (#138563) 2025-09-10 15:52:57 +00:00
Adam Turner 22cb9ba8f9 GH-101100: Remove some entries from `nitpick_ignore` (#138464) 2025-09-08 22:10:26 +00:00
Adam Turner 6831634eb7 gh-101100: Resolve reference warnings in reference/ (#138418) 2025-09-08 19:31:24 +00:00
Adam Turner 8ed1d53e62 GH-138465: Improve documentation for common sequence methods (#138474)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-09-05 20:55:02 +01:00
dbXD320 e5c5830079 gh-138191: Document `frame.f_generator` in the data model (#138540)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-09-05 17:07:29 +00:00
Petr Viktorin cfcfbdd923 gh-135676: Reword the Operators & Delimiters section(s) (GH-137713)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-09-03 15:29:15 +00:00
Adam Turner 6d730b1183 GH-101100: Resolve reference warnings in whatsnew/3.6.rst (#138411)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-09-03 16:22:17 +01:00
Adam Turner dd86fb4ba5 GH-101100: Resolve reference warnings in whatsnew/3.7.rst (#138410)
Resolve reference warnings in whatsnew/3.7.rst
2025-09-03 09:20:16 +03:00
James Parrott 8d5c3341c5 gh-138297 Point link in docs for finally to try/else, instead of if/else (#138298)
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-09-02 14:56:23 +00:00
Stan Ulbrych 0a0cbd43a7 gh-110936: Reorder string literal definition in Lexical Analysis (GH-138063) 2025-09-02 13:48:26 +02:00
Petr Viktorin 9f05f98730 gh-137376: Add note on top-level global declarations (GH-137707)
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2025-08-21 14:58:38 +02:00
Greg Stein c653fba016 Docs: Small clarity change for `except*` (#121073)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-08-06 21:58:24 +00:00