Skip to content

Comments

Fix classmethod property autodoc (#83) swev-id: sphinx-doc__sphinx-9461#87

Open
casey-brooks wants to merge 1 commit intosphinx-doc__sphinx-9461from
feature/classmethod-property-docs
Open

Fix classmethod property autodoc (#83) swev-id: sphinx-doc__sphinx-9461#87
casey-brooks wants to merge 1 commit intosphinx-doc__sphinx-9461from
feature/classmethod-property-docs

Conversation

@casey-brooks
Copy link

@casey-brooks casey-brooks commented Dec 26, 2025

Summary

Resolves #83.

Testing

  • PYTHONPATH=/workspace/sphinx pytest tests/test_ext_autodoc_autoproperty.py
  • PYTHONPATH=/workspace/sphinx pytest tests/test_ext_autosummary.py::test_autosummary_classmethod_properties
  • PYTHONPATH=/workspace/sphinx pytest (fails: 23 pre-existing failures related to typing representation and linkcheck on Python 3.10)

Reproduction notes

  • Verified fix with a standalone Sphinx project using .. autoproperty:: demo_pkg.Example.token confirming HTML output includes the classmethod property signature and docstring.
  • External demo reproduction (per https://github.com/randolf-scholz/sphinx_demo):
    1. git clone https://github.com/randolf-scholz/sphinx_demo
    2. cd sphinx_demo/docs
    3. make html
    4. open _build/html/dummy_module.submodule.html
  • Missing documentation entries before this fix:
    • MetaClass.metaclass_class_property
    • MetaClass.metaclass_abstract_class_property
    • BaseClass.baseclass_class_property
    • BaseClass.baseclass_abstract_class_property
    • SubClass.subclass_class_property
    • SubClass.subclass_abstract_class_property
  • Failure mode: no stack trace is emitted; the regression appears as the above entries missing from the generated HTML output.

@casey-brooks casey-brooks requested a review from a team December 26, 2025 19:58
@casey-brooks casey-brooks force-pushed the feature/classmethod-property-docs branch from 542ba52 to 1dc0f50 Compare December 26, 2025 20:01
@casey-brooks
Copy link
Author

Test & Lint Summary

  • PYTHONPATH=/workspace/sphinx . .venv/bin/activate && pytest tests/test_ext_autodoc_autoproperty.py (6 passed)
  • PYTHONPATH=/workspace/sphinx . .venv/bin/activate && pytest tests/test_ext_autosummary.py::test_autosummary_classmethod_properties (1 passed)
  • PYTHONPATH=/workspace/sphinx . .venv/bin/activate && pytest tests/test_ext_autosummary.py::test_autosummary_generate_overwrite1 (1 passed)
  • PYTHONPATH=/workspace/sphinx . .venv/bin/activate && pytest (1689 passed, 22 skipped, 23 failed — pre-existing typing/linkcheck regressions on Python 3.10)
  • . .venv/bin/activate && flake8 sphinx/ext/autodoc/__init__.py sphinx/ext/autosummary/__init__.py tests/test_ext_autodoc_autoproperty.py tests/test_ext_autosummary.py tests/roots/test-ext-autodoc/target/classmethod_properties.py tests/roots/test-ext-autosummary-classmethod (no lint issues)

@casey-brooks casey-brooks changed the title Fix classmethod property autodoc (#83) Fix classmethod property autodoc (#83) swev-id: sphinx-doc__sphinx-9461 Dec 26, 2025
Copy link

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

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

Looks good to me.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants