Open sveinse opened 4 years ago
This is an issue on py 3.7, while it is not on py 3.8. This makes this issue an python issue, not a desert issue, does it not?
This might be an upstream issue in Python or typing_inspect, or maybe we're just doing it wrong. We could try to figure out a workaround. I've opened https://github.com/python-desert/desert/issues/89 to discuss our general situation regarding recursive types and unions.
Given a definition of a binary tree type hint
BTREE = Union[LEAF, Tuple['BTREE', 'BTREE']]
, this cause desert schema to end up in an indefinite loop inlib\typing.py
. Given that it is stuck in a loop in stdlib, I am not sure if this is a desert issue vs a typing issue or if typing wasn't really designed for recursive type hints like this in the first place.Results in