Repository navigation
Conversation
HanpuLi
force-pushed
the
fix/8550-external-partial-autodoc
branch
from
September 20, 2026 16:50
4625538 to
ebcb366
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fixes #8550.
A partial assigned in a module is a local member even when the function it wraps comes from another module. Autodoc currently unwraps the partial before its module check, so these local partials are mistaken for imported members and omitted unless
:imported-members:is enabled.Record assignment names in
ModuleAnalyzerand use that source information to distinguish a locally assigned partial from a genuinely imported partial. This keeps the existing imported-member filtering while allowing the local partial to be documented. The check is applied to both the current autodoc implementation and the retained legacy class-based implementation.Tests cover a local partial wrapping a function imported from another module, alongside the existing imported-partial case. A text-build regression also runs with
autodoc_use_legacy_class_based = True; reverting only the legacycheck_module()change makes that regression fail.Verification:
pytest -q tests/test_ext_autodoc/test_ext_autodoc.py(84 passed, 1 skipped)pytest -q tests/test_pycode(82 passed)git diff --checkCI note: the remaining
Docutils HEADandLaTeXfailures are baseline failures on the exact base commitb04a210. Comparing the failed-test-name sets between the base CI run and this PR found no PR-only failures.