Repository navigation
Docs: correct API guidance and examples - #160907
Conversation
Documentation build overview
20 files changed ·
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for this documentation-only update to CPython’s API guidance and examples.
No open issues 🎉
What changed in this PR
This documentation-only PR updates CPython’s API guidance and examples across the library reference, extension tutorials, C API reference, and Python 3.13 release notes.
Changes:
- Updates API names, signatures, and behavior descriptions.
- Fixes Python examples and adds argument validation and cleanup to C callback examples.
- Removes misleading statements about built-ins and memory statistics.
| File | Description |
|---|---|
Doc/whatsnew/3.13.rst |
Corrects SSL and C API migration guidance. |
Doc/library/zipfile.rst |
Opens the example archive in write mode. |
Doc/library/tracemalloc.rst |
Removes incorrect claims about zero-valued differences. |
Doc/library/ssl.rst |
Updates the documented certificate tuple shape. |
Doc/library/os.rst |
Corrects SEEK_DATA and SEEK_HOLE descriptions. |
Doc/library/mailbox.rst |
Replaces itervalues() with values(). |
Doc/library/http.cookiejar.rst |
Uses the imported policy class in the example. |
Doc/extending/newtypes_tutorial.rst |
Corrects the allocation-function reference. |
Doc/extending/first-extension-module.rst |
Fixes the slot-array type and UTF-8 conversion calls. |
Doc/extending/extending.rst |
Adds allocation checks and valid callback arguments. |
Doc/c-api/gcsupport.rst |
Identifies the matching garbage-collected allocation macro. |
Doc/c-api/extension-modules.rst |
Uses the module execution slot in the example. |
Doc/c-api/codec.rst |
Documents LookupError for failed codec lookup. |
Doc/c-api/code.rst |
Links to the current unstable code-extra APIs. |
Doc/builtins/stdtypes.rst |
Clarifies bytearray growth and set lookup behavior. |
Doc/builtins/functions.rst |
Removes the incorrect repr() dependency on sys.displayhook. |
Review effort: Balanced
|
Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
|
Sorry, @methane, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
GH-160946 is a backport of this pull request to the 3.15 branch. |
|
GH-160950 is a backport of this pull request to the 3.14 branch. |
(cherry picked from commit bd3be61) Co-authored-by: Inada Naoki <[email protected]>
(cherry picked from commit bd3be61)
No description provided.