Hi @hynek, great to see that version 24.1.0 is finally out, have been looking forward to it for quite a while 馃憤馃徏 馃檭
One reason why I was waiting for it is because I wanted to enable slots for our classes that rely on cached_property. After upgrading to 24.1.0 and activating slots, everything seemed to work fine ... except for our docs 馃槙
We build them with sphinx and the error I'm getting indicates trouble coming from exactly the cached_property part. Here is an excerpt from the critical class
@define(frozen=True)
class DiscreteParameter(Parameter, ABC):
@cached_property
@abstractmethod
def comp_df(self) -> pd.DataFrame: ...
for which I get the following error during our sphinx built
/home/runner/work/baybe/baybe/.tox/docs-py312/lib/python3.12/site-packages/baybe/parameters/base.py:docstring of baybe.parameters.base.DiscreteParameter.__init__:1:<autosummary>:1:py:obj reference target not found: baybe.parameters.base.DiscreteParameter.comp_df
I haven't yet tried to pull together a minimal self-contained example, because I first wanted to ask if you already have an idea what could cause the problem 鈥撀爌erhaps the cached_property integration is simply not yet correct/complete?
All I can say for now is:
- it works when I disable the slots
- it works when I turn the
cached_property into a regular property
so the issue really does seem to be related to the latests attrs changes.
Let me know if you need more information!
Hi @hynek, great to see that version
24.1.0is finally out, have been looking forward to it for quite a while 馃憤馃徏 馃檭One reason why I was waiting for it is because I wanted to enable slots for our classes that rely on
cached_property. After upgrading to24.1.0and activating slots, everything seemed to work fine ... except for our docs 馃槙We build them with sphinx and the error I'm getting indicates trouble coming from exactly the
cached_propertypart. Here is an excerpt from the critical classfor which I get the following error during our sphinx built
I haven't yet tried to pull together a minimal self-contained example, because I first wanted to ask if you already have an idea what could cause the problem 鈥撀爌erhaps the
cached_propertyintegration is simply not yet correct/complete?All I can say for now is:
cached_propertyinto a regularpropertyso the issue really does seem to be related to the latests
attrschanges.Let me know if you need more information!