All memoized properties are undocumented and cls.prop is None

Issue #1830 resolved
Former user created an issue

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)

  1. Former user 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.

  2. Log in to comment