You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address review: API contract wording and root API page
Four review points on the __all__ freeze, all in the contract and its
documentation rather than the declarations themselves.
1. __version__ is unambiguously public. Versioning.md said membership in
__all__ decides, then separately excluded every underscore-prefixed name
with no exception, which classified the exported __version__ both ways.
Both passages now apply the single test: a name is public exactly when it
appears in its module's __all__, dunder or not.
2. The API reference covers the package root. docs/api/package.md documents
psycodict itself; seven of its eight exports are imported members and
__version__ is a special data member, so the page carries local
imported-members/special-members options (the module pages keep documenting
exactly their own __all__ -- verified: every page's top-level anchors now
equal that module's __all__, and range_formatter, KeyedDefaultDict and
number_types remain absent). __version__ gets a #: doc-comment so it
renders with a description rather than str's docstring. Versioning.md's
API-reference link becomes the absolute Read the Docs URL, since the
canonical file is read on GitHub where docs/api/index.md does not exist.
test_public_api.py gains a guard that every module in the frozen surface has
an automodule page, and one that every exported callable has a docstring
(without undoc-members, an undocumented export silently leaves the
reference). The conf.py comment is corrected to claim only the upper bound
that turning undoc-members off actually gives.
3. The changelog no longer implies __all__ is behavior-neutral. Explicit
imports of a non-public name still resolve; `from ... import *` now binds
__all__ and nothing else, which is a real behavior change and is described
as one. test_star_import_gives_exactly_all is parametrized over every
module in EXPECTED rather than the package root alone.
4. The API overview matches the collision-safe lookup policy: db[name] is
canonical and db.<name> is shorthand for when the name is not shadowed.
Searching.md's "equivalently" claim gets the same correction.
Full suite 1439 passed, 36 skipped, 1 xfailed; ruff and the -W docs build
clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments