Repository navigation
Conversation
clayote
force-pushed
the
slots-override
branch
2 times, most recently
from
February 22, 2026 05:55
c5271d9 to
d9da662
Compare
Closed
6 of 13 tasks
clayote
force-pushed
the
slots-override
branch
from
February 27, 2026 02:09
866f9ba to
d9da662
Compare
Author
|
Here is the extension to make |
clayote
force-pushed
the
slots-override
branch
from
September 10, 2026 16:19
1c1fe15 to
bc5e3b1
Compare
Author
|
Awaiting #14611 |
Author
|
#14611 has been merged, but it looks like there are some other discrepancies in the test data, still. |
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.
Purpose
Last year, attrs changed its implementation of
@cached_propertyon classes with slots in a way that made those properties invisible to Sphinx's autodoc. It now writes a custom__getattr__that accesses the slot by the same name as the property.Sphinx has an easy solution: the
add_autodoc_attrgetterhook lets us swap in the originalcached_propertyfor documentation purposes. This works fine for the.. autopropertydirective. However, I also wanted the:members:option of.. autoclassto pick up any@cached_propertydecorated in the class definition. This did not work, because the member-finder code didn't anticipate the necessity. Once it finds the slots member, it considers the member found, even if there's no docstring for it.This PR lets the general member-finding code for classes override an earlier result, in the case that the prior
ObjectMemberhas nodocstring. The specialattrgettercode gets a chance to run, and delivers the object we really want to document.References