Skip to content

pydoc inncorrectly assumes a module has documentation and where#139971

@tripleee

Description

@tripleee

Bug report

Bug description:

>>>importencodings>>>help(encodings) Helponpackageencodings: NAMEencodings-Standard"encodings"PackageMODULEREFERENCEhttps://docs.python.org/3.14/library/encodings.htmlThefollowingdocumentationisautomaticallygeneratedfromthePythonsourcefiles. Itmaybeincomplete, incorrectorincludefeaturesthatareconsideredimplementationdetailandmayvarybetweenPythonimplementations. Whenindoubt, consultthemodulereferenceatthelocationlistedabove. DESCRIPTIONStandardPythonencodingmodulesarestoredinthispackagedirectory. Codecmodulesmusthavenamescorrespondingtonormalizedencodingnamesasdefinedinthenormalize_encoding() functionbelow, e.g. 'utf-8'mustbeimplementedbythemodule'utf_8.py'. Eachcodecmodulemustexportthefollowinginterface: [lines1-23] >>>print('\n'.join(xforxinpydoc.render_doc(encodings).splitlines() if'http'inx)) https://docs.python.org/3.14/library/encodings.html

The URL included here is not valid, and seems to be invalid at least back to Python 3.11.

I can't say if this has been deleted by mistake or if it was cleaned out and the documentation should no longer include it.

CPython versions tested on:

3.14

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions