All memoized properties are undocumented and cls.prop is None
ResultProxy.inserted_primary_key
(and I assume every property marked with @util.memoized_property
) is omitted in the Sphinx-generated reference documentation, and when queried on the class evaluates as None
(ResultProxy.inserted_primary_key is None
), unlike normal Python properties.
No reason for this difference is documented, so I'm assuming it's unintended. I call it a defect since it inhibits inspection (and thus autodoc
).
I'll attach a minuscule patch that fixes this, does not add any tests but does not break any either. (There is no existing test for util.memoized_property
, but there are certainly plenty that exercise it.)
Comments (6)
-
Account Deleted -
repo owner hmm, I wonder why its been
None
all this time ? -
Account Deleted Can't think of a good reason. Typo?
Now that I take a closer look, probably the same change should be made in
memoized_instancemethod
, just below. This also breaks no tests. I'll attach a new patch. -
Account Deleted Fix this issue in
memoized_property
andmemoized_instancemethod
:__get__
without instance returns self -
repo owner - changed status to resolved
-
repo owner - removed milestone
Removing milestone: 0.6.2 (automated comment)
- Log in to comment
Fix this issue: get without instance returns self