Skip to content

docs: Fix typos and obvious errors - #161386

Open
methane wants to merge 5 commits into
python:mainfrom
methane:fix-doc-typos
Open

methane wants to merge 5 commits into
python:mainfrom
methane:fix-doc-typos

Conversation

@methane

@methane methane commented Nov 5, 2026

Copy link
Copy Markdown
Member

No description provided.

@read-the-docs-community

read-the-docs-community Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Comment thread Doc/library/ssl.rst Resolved
Comment thread Doc/library/turtle.rst Resolved

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.

🟡 Changes recommended

The revised tracemalloc example omits most_recent_first=True, causing its traceback order to contradict the heading and displayed output.

1 open issue
What changed in this PR

This documentation-only PR corrects examples, API names, cross-references, and terminology across CPython’s library reference, extension guides, and release notes.

Changes:

  • Fix syntax, arguments, and displayed output in documentation examples.
  • Correct API references, parameter names, and technical descriptions.
  • Repair historical release-note errors and minor prose mistakes.
File Description
Doc/​whatsnew/​3.9.rst Correct lock examples and grammar.
Doc/​whatsnew/​3.8.rst Fix Py_INCREF syntax.
Doc/​whatsnew/​3.7.rst Correct PEP link and islice argument name.
Doc/​whatsnew/​3.6.rst Correct removed trace API names.
Doc/​whatsnew/​3.4.rst Fix importlib helper and module-spec references.
Doc/​whatsnew/​3.15.rst Correct finite-field terminology.
Doc/​whatsnew/​3.12.rst Correct PEP number and unittest examples.
Doc/​whatsnew/​3.11.rst Correct deprecated importlib function names.
Doc/​whatsnew/​3.1.rst Fix SQL GROUP BY syntax.
Doc/​whatsnew/​2.7.rst Fix capsule example parentheses.
Doc/​whatsnew/​2.5.rst Correct dictionary comment and header filename.
Doc/​whatsnew/​2.4.rst Fix email attribute and logging format.
Doc/​whatsnew/​2.3.rst Correct POSIX function name and interactive prompt.
Doc/​library/​xml.dom.rst Identify the correct query-method class.
Doc/​library/​tracemalloc.rst Format traceback lines in the example.
Doc/​library/​timeit.rst Correct target-time parameter reference.
Doc/​library/​threading.rst Point reentrant-lock references to RLock.release.
Doc/​library/​tarfile.rst Correct class and archive-opening references.
Doc/​library/​ssl.rst Correct example hostname and buffer I/O methods.
Doc/​library/​profiling.sampling.rst Fix generated filename example.
Doc/​library/​profile.rst Correct timer-unit descriptions.
Doc/​library/​pdb.rst Correct post-mortem function reference.
Doc/​library/​os.rst Correct timestamp and signal parameter names.
Doc/​library/​optparse.rst Correct values-class names and method markup.
Doc/​library/​multiprocessing.rst Reference temporary-directory creation correctly.
Doc/​library/​logging.rst Correct date-formatting function terminology.
Doc/​library/​io.rst Pass encoding by keyword in the example.
Doc/​library/​http.cookies.rst Correct the __Host- cookie prefix.
Doc/​library/​http.client.rst Fix displayed response output.
Doc/​library/​ftplib.rst Correct implicit login arguments.
Doc/​library/​doctest.rst Attribute runner properties to the correct class.
Doc/​library/​codecs.rst Correct the Nameprep RFC reference.
Doc/​library/​cgitb.rst Clarify replacement-package contents.
Doc/​library/​cgi.rst Clarify replacement-package contents.
Doc/​library/​calendar.rst Align documented parameter names with methods.
Doc/​library/​binascii.rst Correct newline-encoding option description.
Doc/​library/​asyncio-eventloop.rst Align callback timing prose with the example.
Doc/​library/​argparse.rst Correct help text and parsed output examples.
Doc/​library/​annotationlib.rst Retrieve annotations from the example class.
Doc/​howto/​logging-cookbook.rst Correct an IP-address prefix in a comment.
Doc/​howto/​isolating-extensions.rst Fix C method-table punctuation.
Doc/​howto/​instrumentation.rst Fix comment terminators in SystemTap examples.
Doc/​howto/​descriptor.rst Correct a C API name in a comment.
Doc/​extending/​extending.rst Correct the function named in lifetime guidance.
Doc/​extending/​embedding.rst Align initialization prose with the example API.
Doc/​c-api/​typeobj.rst Use the correct allocation function in the example.
Doc/​c-api/​module.rst Fix C declarations and statement terminators.

Review effort: Balanced

Comment thread Doc/library/tracemalloc.rst Resolved

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 block the documentation corrections.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@hugovk

hugovk commented Nov 5, 2026

Copy link
Copy Markdown
Member

This is a big PR! Might be easier to get it merged by splitting it into one per top-level directory.

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've looked through, two little comments, but otherwise seems like a nice improvement. The PR is quite sizeable, but many fixes are trivial.

Comment thread Doc/library/cgi.rst Resolved
Comment thread Doc/library/cgitb.rst Resolved
Co-authored-by: Stan Ulbrych <stan@python.org>
@methane

methane commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

@hugovk
In this PR, I've bundled together fixes for only the obvious errors among the hundreds of potential issues identified by Codex. I'll make smaller PRs from now on.

For this PR, please feel free to review only the files you're interested in. If there are any files you'd prefer to review later when you have more time, just let me know. I'll remove them from this PR and submit them in a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge docs Documentation in the Doc dir needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes skip issue skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants