Commit Graph

982 Commits

Author SHA1 Message Date
Wei-Hsiang (Matt) Wang 9f5f2b7128
[3.13] gh-123492: Remove unnecessary `:func:` parentheses (gh-123493) (#123513) 2024-08-30 20:14:48 +03:00
Miss Islington (bot) 1788eb786b
[3.13] gh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` (GH-122702) (#122914)
gh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` (GH-122702)
(cherry picked from commit ea70439bd2)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-11 21:20:07 +00:00
Miss Islington (bot) 59be613137
[3.13] gh-122511: Improve documentation for object identity of mutable/immutable types (GH-122512) (#122778)
gh-122511: Improve documentation for object identity of mutable/immutable types (GH-122512)
(cherry picked from commit 76bdeebef6)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-07 16:41:26 +01:00
Irit Katriel 545a328eae
[3.13] gh-122445: populate only modified fields in __static_attributes__ (#122446) (#122621)
gh-122445: populate only modified fields in __static_attributes__ (#122446)

(cherry picked from commit 498376d7a7)
2024-08-02 19:26:57 +01:00
Miss Islington (bot) e65aea96c3
[3.13] Remove outdated note about instance methods from datamodel.rst (GH-122471) (#122479)
Remove outdated note about instance methods from datamodel.rst (GH-122471)
(cherry picked from commit c68cb8e0c9)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2024-07-30 20:00:36 +00:00
Serhiy Storchaka a45d9051ed
[3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012)
(cherry picked from commit 1a0c7b9ba4)
2024-07-19 09:13:08 +00:00
Miss Islington (bot) 4af9c05e78
[3.13] gh-120452: improve documentation about private name mangling (GH-120451) (#121715)
gh-120452: improve documentation about private name mangling (GH-120451)
(cherry picked from commit f4d6e45c1e)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-07-13 15:21:30 +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
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) 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) 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) 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) 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) 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) 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) 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
Serhiy Storchaka 153b3f7530
gh-118465: Add __firstlineno__ attribute to class (GH-118475)
It is set by compiler with the line number of the first line of
the class definition.
2024-05-06 12:02:37 +03:00
Guido van Rossum 9c13d9e37a
gh-74929: Rudimentary docs for PEP 667 (#118581)
This is *not* sufficient for the final 3.13 release, but it will do for beta 1:

- What's new entry
- Updated changelog entry (news blurb)
- Mention the proxy for f_globals in the datamodel and Python frame object docs

This doesn't have any C API details (what's new refers to the PEP).
2024-05-05 15:31:26 +00:00
Jelle Zijlstra ca269e58c2
gh-116126: Implement PEP 696 (#116129)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-05-03 06:17:32 -07:00
Quazi Irfan 1558d99316
Clarifying nonlocal doc: SyntaxError is raised if nearest enclosing scope is global (#114009)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-20 18:42:51 -07:00
Irit Katriel 8a01fd7b9b
gh-115775: Add whatsnew entry about __static_attributes__ (GH-117909)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-19 12:57:31 +02:00
Hugo van Kemenade 7d0be7aea5
Add 'The Python 2.3 Method Resolution Order' (#116435) 2024-04-15 13:01:15 +03:00
Adorilson Bezerra c2276176d5
Add information about negative indexes to sequence datamodel doc (#110903)
Co-authored by Terry Jan Reedy
2024-03-25 18:34:20 -04:00
Terry Jan Reedy 025ef7a5f7
gh-56374: Clarify documentation of nonlocal (#116942)
Define 'nonlocal scopes' in a way that excludes class scopes.
Rearrange the rest of the doc.  Add "Programmer's note".
2024-03-19 13:55:21 -04:00
Sunghyun Kim 7f64ae30dd
gh-107607: Update comment about utf-8 BOM being ignored (#107858)
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-03-19 11:51:12 -04:00
Terry Jan Reedy 4e45c6c54a
gh-116881: Remove erroneous or redundant grammar NULL (GH-116885)
In Lexical Analysis f-strings section, NULL in the description
of 'literal character' means '\0'.  In the format_spec grammar
production, it is wrong with that meaning and redundant if
instead interpreted as <nothing>.  Remove it there.
2024-03-18 10:31:13 +01:00
Serhiy Storchaka 808a77612f
gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) 2024-03-07 10:05:03 +02:00
Gouvernathor 67f742e03a
gh-72971: Clarify the special no-TypeError behavior for equality (#110729) 2024-03-03 00:45:48 +00:00
Gouvernathor 2713c2abc8
gh-104219: Document that idunders can return NotImplemented (#104220)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-01 16:51:47 +01:00
Erlend E. Aasland dbe44f150c
Docs: mark up NotImplemented using the :data: role throughout the docs (#116135) 2024-02-29 20:46:12 +00:00
Adorilson Bezerra f7455864f2
Erase some unnecessary quotes on data model doc (#113521)
Thanks to Pedro Arthur Duarte (pedroarthur.jedi at gmail.com) for help with this bug.
2024-02-24 19:16:19 -05:00
Daler 0c80da4c14
gh-115572: Move `codeobject.replace()` docs to the data model (#115631) 2024-02-18 14:13:46 +00:00
Christophe Papazian de07941729
gh-115405: add versionadded tag for co_qualname in code objects documentation (#115411) 2024-02-13 16:10:00 +00:00
Nikita Sobolev e19103a346
gh-114552: Update `__dir__` method docs: it allows returning an iterable (#114662) 2024-02-10 08:34:23 +00:00
Terry Jan Reedy a1332a99cf
Clarify one-item tuple (#114745)
A 'single tuple' means 'one typle, of whatever length.
Remove the unneeded and slight distracting parenthetical 'singleton' comment.
2024-01-30 18:40:54 +00:00
Nikita Sobolev a384b20c0c
gh-101100: Fix sphinx warnings in `reference/import.rst` (#114646) 2024-01-27 07:30:21 -07:00
Hugo van Kemenade 8ccd1ba461
gh-101100: Fix Sphinx warnings in `reference/expressions.rst` (#114194) 2024-01-22 18:21:14 +02:00
cdzhan b04c5005cc
Fix the confusing "User-defined methods" reference in the datamodel (#114276)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-21 03:45:38 +00:00
Sergey B Kirpichev 029ecee10d
gh-114070: fix token reference warnings in expressions.rst (#114169) 2024-01-17 18:39:50 +02:00
InSync a47353d587
datamodel: Fix a typo in ``object.__init_subclass__`` (#111599) 2024-01-12 22:59:24 +00:00
Ned Batchelder e68806c712
Docs: Amend codeobject.co_lines docs; end number is exclusive (#113970)
The end number should be exclusive, not inclusive.
2024-01-12 16:04:14 +01:00
Serhiy Storchaka a8629816c6
gh-113664: Improve style of Big O notation (GH-113695)
Use cursive to make it looking like mathematic formulas.
2024-01-10 15:01:18 +02:00
Alex Waygood f1f8392432
Document the `co_lines` method on code objects (#113682)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-03 19:29:24 +00:00
John D. McDonald 8ff44f8554
gh-81094: Refer to PEP 318 in compound_statements.rst (#113588)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-02 10:40:14 +02:00
Raymond Hettinger 6a5b4736e5
gh-113313: Note that slice support is not required for all sequences. (gh-113377) 2023-12-21 15:54:59 -06:00
Rodrigo Girão Serrão 5a7cc667f8
Fix typo in datamodel docs (#113314)
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-12-20 11:58:38 +00:00
Hugo van Kemenade 32d87a8899
Docs: Add label to grammar spec for linking from PEPs (#113235) 2023-12-17 12:23:14 -07:00
Alex Waygood 4b3cb082da
gh-101100: Fix Sphinx nitpicks in `library/inspect.rst` and `reference/simple_stmts.rst` (#113107) 2023-12-14 13:30:57 +00:00
Alex Waygood d05a180350
gh-101100: Improve docs on exception attributes (GH-113057)
* Improve docs on exception attributes

* thanks sphinx-lint

* fix doctests

* argh, okay, give up on doctests

* Various improvements
2023-12-13 10:59:36 -08:00
Alex Waygood 81a15ea74e
gh-101100: Further improve docs on function attributes (#113001) 2023-12-12 20:21:12 +00:00