plum
plum copied to clipboard
Problems with Union Aliases in Python 3.14
In Python 3.14 typing.Union is immutable and the following error is raised
.../plum/alias.py:131: in activate_union_aliases
_union_type.__repr__ = _new_repr
^^^^^^^^^^^^^^^^^^^^
E TypeError: cannot set '__repr__' attribute of immutable type 'typing.Union'
@nstarman Hmm, we'll probably need to abandon this approach and might need to abandon union aliases all together. Perhaps not a huge deal since overriding Union.__repr__ was a little dodgy anyway.