Skip to content

Docs: correct API guidance and examples - #160907

Merged
methane merged 2 commits into
python:mainfrom
methane:fix-docs
Oct 30, 2026
Merged

methane merged 2 commits into
python:mainfrom
methane:fix-docs

Conversation

@methane

@methane methane commented Oct 29, 2026

Copy link
Copy Markdown
Member

No description provided.

@methane methane added docs Documentation in the Doc dir skip issue skip news needs backport to 3.14 bugs and security fixes labels Oct 29, 2026
@methane
methane requested a review from a team as a code owner October 29, 2026 16:47
@methane methane added the needs backport to 3.15 bugs and security fixes label Oct 29, 2026
@methane
methane requested a review from gpshead as a code owner October 29, 2026 16:47
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Oct 29, 2026
@methane
methane requested a balanced review from Copilot October 29, 2026 16:49
@read-the-docs-community

read-the-docs-community Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@methane
methane merged commit bd3be61 into python:main Oct 30, 2026
30 checks passed
@methane
methane deleted the fix-docs branch October 30, 2026 04:11
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Oct 30, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @methane, I could not cleanly backport this to 3.14 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker bd3be61c4a12058d7b4f8ac89804d4558ff68ea8 3.14

@bedevere-app

bedevere-app Bot commented Oct 30, 2026

Copy link
Copy Markdown

GH-160946 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 30, 2026
@bedevere-app

bedevere-app Bot commented Oct 30, 2026

Copy link
Copy Markdown

GH-160950 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 30, 2026
methane added a commit that referenced this pull request Oct 30, 2026
(cherry picked from commit bd3be61)

Co-authored-by: Inada Naoki <[email protected]>
methane added a commit that referenced this pull request Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants