Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement property object description for python #7523

Closed
tk0miya opened this issue Apr 20, 2020 · 3 comments
Closed

Reimplement property object description for python #7523

tk0miya opened this issue Apr 20, 2020 · 3 comments
Labels
type:enhancement enhance or introduce a new feature
Milestone

Comments

@tk0miya
Copy link
Member

tk0miya commented Apr 20, 2020

Is your feature request related to a problem? Please describe.
In Sphinx-2.1.0, we started to support property objects #6320. At that time, it is implemented as a kind of method. But we have some discussions #6785 and #7068 to change it to a kind of attribute.
Finally, we agreed to implement it as an independent type: property. At same time, it is very similar to attributes. So we also support to refer it as attributes.

Describe the solution you'd like

  • Allow to describe property object via py:property directive.
  • Allow to refer a property object via py:prop and py:attr role.
  • The autodoc extension should render properties as py:property directive.
  • The napoloen extension should render properties as py:property directive.
  • The intersphinx extension should support to refer remote properties via py:prop and py:attr role.
  • The autosumary extension generate a document that properties and attributes are shown in the same headings by default
@tk0miya tk0miya added the type:enhancement enhance or introduce a new feature label Apr 20, 2020
@tk0miya tk0miya added this to the 3.1.0 milestone Apr 20, 2020
@tk0miya tk0miya modified the milestones: 3.1.0, 3.2.0 May 23, 2020
@tk0miya tk0miya modified the milestones: 3.2.0, 3.3.0 Jul 18, 2020
@tk0miya tk0miya modified the milestones: 3.3.0, 3.4.0 Oct 3, 2020
@johann-petrak
Copy link

Not sure if this is the right place, but I think it would be extremely helpful if the generated documentation could not just show THAT something is a property, but also, indicate whether it has got a getter, setter, deleter.
This is important information for API users and manually documenting this is unnecessary (since it is easy to figure out automatically) and error prone (especially if e.g. a setter is added, since this would need to get documented in the getter, by convention).
One way to do this would be to show something like property/get/set or property/set/delete in the generate documentation.

@tk0miya
Copy link
Member Author

tk0miya commented Apr 11, 2021

I think indicating a property supports getter, setter and deleter is another topic. So I just made #9087 to support it.

@tk0miya
Copy link
Member Author

tk0miya commented Apr 11, 2021

I think this has been almost implemented. So I will try to confirm it works in the 4.0 later.

@tk0miya tk0miya closed this as completed Apr 22, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

2 participants