Skip to content

Comments

swev-id: sphinx-doc__sphinx-9698 — Fix property index entries for py:method :property:#95

Open
casey-brooks wants to merge 1 commit intosphinx-doc__sphinx-9698from
fix/property-index-no-parens
Open

swev-id: sphinx-doc__sphinx-9698 — Fix property index entries for py:method :property:#95
casey-brooks wants to merge 1 commit intosphinx-doc__sphinx-9698from
fix/property-index-no-parens

Conversation

@casey-brooks
Copy link

Summary

  • omit parentheses in python domain index entries when a py:method directive is marked with :property:
  • keep module-level method properties aligned with class properties and cover via unit + HTML regression tests
  • restore RemovedInSphinx40Warning shim so bundled htmlhelp extension stays importable under pytest

Testing

  • PYTHONPATH=/workspace/sphinx/.venv/lib/python3.11/site-packages:/workspace/sphinx /workspace/sphinx/.venv/bin/pytest -q (fails: tests/test_build_linkcheck.py::{test_defaults,test_anchors_ignored}, tests/test_ext_autodoc_configs.py::{test_autodoc_typehints_signature,test_autodoc_default_options}, tests/test_ext_imgconverter.py::test_ext_imgconverter, tests/test_setup_command.py::{test_build_sphinx,test_build_sphinx_multiple_builders,test_build_sphinx_with_nonascii_path,test_build_sphinx_warning_return_zero_status}, tests/test_util_i18n.py::test_format_date, tests/test_util_inspect.py::test_signature_annotations, tests/test_util_typing.py::{test_restify,test_restify_type_hints_containers,test_stringify_type_hints_containers} – matches failures on a clean checkout)
  • PYTHONPATH=/workspace/sphinx/.venv/lib/python3.11/site-packages:/workspace/sphinx /workspace/sphinx/.venv/bin/pytest tests/test_domain_py.py -q (48 passed)
  • /workspace/sphinx/.venv/bin/flake8 sphinx/domains/python.py tests/test_domain_py.py

Closes #89

@casey-brooks casey-brooks requested a review from a team December 26, 2025 21:13
@casey-brooks
Copy link
Author

Test & Lint Summary

  • PYTHONPATH=/workspace/sphinx/.venv/lib/python3.11/site-packages:/workspace/sphinx /workspace/sphinx/.venv/bin/pytest -q (fails: tests/test_build_linkcheck.py::{test_defaults,test_anchors_ignored}, tests/test_ext_autodoc_configs.py::{test_autodoc_typehints_signature,test_autodoc_default_options}, tests/test_ext_imgconverter.py::test_ext_imgconverter, tests/test_setup_command.py::{test_build_sphinx,test_build_sphinx_multiple_builders,test_build_sphinx_with_nonascii_path,test_build_sphinx_warning_return_zero_status}, tests/test_util_i18n.py::test_format_date, tests/test_util_inspect.py::test_signature_annotations, tests/test_util_typing.py::{test_restify,test_restify_type_hints_containers,test_stringify_type_hints_containers} – matches failures on a clean checkout)
  • PYTHONPATH=/workspace/sphinx/.venv/lib/python3.11/site-packages:/workspace/sphinx /workspace/sphinx/.venv/bin/pytest tests/test_domain_py.py -q (48 passed)
  • /workspace/sphinx/.venv/bin/flake8 sphinx/domains/python.py tests/test_domain_py.py

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. The python-domain change cleanly removes the superfluous parentheses for :property: methods, and the added unit/regression coverage exercises both the AST and HTML output paths. Restoring the RemovedInSphinx40Warning shim keeps htmlhelp importable under pytest.

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