Tin Tvrtković
Tin Tvrtković
@alekseiloginov cattrs has no "official" support for ForwardRefs yet (or has ever had it). The `register_structure_hook` approach worked while singledispatch supported it, but since https://bugs.python.org/issue46032 was released it no longer...
It will be the case when I merge https://github.com/python-attrs/cattrs/pull/177 in a few days :)
Can this be closed now?
Hm yeah, the problem is a string IS a sequence of something. The reverse is a consequence of type coercion we do. A converter type with coercion disabled for primitives...
So here's the deal. Structuring is inherently a transformation from one data structure to another. For example, you generally want to transform a dictionary into a class, not to validate...
Ah, I need to tweak the type annotation (turns out `Type[C]` basically only works for classes, not abstract types like `Tuple` or `Optional`). Will do in the next couple of...
Note that I have to change this type annotation to `Any`, since there's no better way to type check this atm.
I actually needed to add some overloads. There's no way to correctly check `cattr.structure([1.0, 2, "3"], Tuple[int, int, int])` with current Mypy as far as I'm aware. So in those...
We're waiting on this: https://github.com/python/mypy/issues/9773
I would ask that you start by reading https://hynek.me/articles/semver-will-not-save-you/. I can see your point about communicating breaking changes better, but like the article states, every change will be breaking for...