Andrei Bodrov
Andrei Bodrov
Thank you for the discussion! @sscherfke I think this is kind of thing that happened to `on_setattr` already. The only big difference here is that converters should work with half-initialized...
May be I'm not a fan of built-in validators, but why don't use custom validator, which checks `attrib.type`? It's possible to resolve `attrib.type` with `attr.resolve_types`. ```python import attr def validate_type(self,...
Hello! It seems that this bug appears only for inheritors of `Exception`: ```python import attr import pickle @attr.s(slots=False, auto_exc=True, kw_only=True) class KwOnly(object): field: int = attr.ib() B = KwOnly(field=1) print('B',...
Got it now, thank you for the answer :)
Hello! :) I have a little bit different issues, though they also can be solved with `@cached_property`-like factory. UPD: I was wrong, I've found out that I can redefine all...
I've though about the design from the previous post and it seems that these "lazy" factories are pretty messy in composition with converters. * First point is - we need...
Hi, @hynek , thanks for the comment! :) It seems a pretty simple feature to integrate - I believe I can make some MVP (with a shortcut that puts descriptor...
A little update here: >Alternative approach may be implementing it via metadata + field_transformer I've finally tried to implement this in my project via field_transformer and found out that this...
Hi, @hynek ! No worries, thanks for the fast answer :) I just wanted to note that this ticket is probably worth closing, as mentioned problem is solved in 5...
Sounds like another approach here may be lazy factory for `x_metadata`: https://github.com/python-attrs/attrs/issues/573 The example from the first post seems to be solvable with pure `@cached_property` (though it wouldn't be a...