Skip to content

@properties are suddenly filed as std:doc instead of std:attribute #7060

Closed

Description

@flying-sheep

Describe the bug
I can’t link to my properties as :attr:`thing` anymore.
Inspecting the objects.inv, they now falsely appear under std:doc (/edit: also as std:meth, which is the real problem)

To Reproduce
Create an autosummary for a property:

class Test:
    @property
    def thing():
        """Doc"""
.. autoclass:: Test
   :members:

Environment info

  • OS: Arch Linux
  • Python version: 3.8
  • Sphinx version: 2.2.1
  • Sphinx extensions: sphinx.ext.autodoc, sphinx.ext.autosummary

Activity

  1. tk0miya commented on Jan 24, 2020

    @tk0miya
    Member

    Now :py:meth: is used to refer properties. Could you try it please?

  2. flying-sheep commented on Jan 24, 2020

    @flying-sheep
    ContributorAuthor

    I could but why was it changed? Properties are a transparent way to attach behavior to getting/setting attributes, that their whole point.

    If it would stay that way, everyone would change all references whenever someone decides to go from attribute to property, where previously this was a transparent change for code and docs.

    /edit: now that I know it’s :meth:, I found #6785. This one can be closed as #6785’s duplicate, but I agree with @zzzeek: please make it possible to refer to properties using :attr: again.

  3. locked as resolved and limited conversation to collaborators on Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions