Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'_UnionGenericAlias' is deprecated and slated for removal in Python 3.17 #635

Open
LecrisUT opened this issue Mar 18, 2025 · 1 comment
Open

Comments

@LecrisUT
Copy link

Just a heads-up of a deprecation message emitted in Python3.14

/opt/hostedtoolcache/Python/3.14.0-alpha.6/x64/lib/python3.14/site-packages/cattrs/preconf/json.py:54: in make_converter
    configure_converter(res)
        args       = ()
        kwargs     = {'unstruct_collection_overrides': {<class 'collections.abc.Set'>: <class 'list'>, <class 'collections.Counter'>: <class 'dict'>}}
        res        = <cattrs.preconf.json.JsonConverter object at 0x7fd7ad42f800>
/opt/hostedtoolcache/Python/3.14.0-alpha.6/x64/lib/python3.14/site-packages/cattrs/preconf/json.py:35: in configure_converter
    converter.register_unstructure_hook(
        converter  = <cattrs.preconf.json.JsonConverter object at 0x7fd7ad42f800>
/opt/hostedtoolcache/Python/3.14.0-alpha.6/x64/lib/python3.14/site-packages/cattrs/converters.py:345: in register_unstructure_hook
    if is_union_type(cls):
        cls        = <class 'bytes'>
        func       = <function configure_converter.<locals>.<lambda> at 0x7fd7ad68d010>
        self       = <cattrs.preconf.json.JsonConverter object at 0x7fd7ad42f800>
/opt/hostedtoolcache/Python/3.14.0-alpha.6/x64/lib/python3.14/site-packages/cattrs/_compat.py:292: in is_union_type
    or (isinstance(obj, _UnionGenericAlias) and obj.__origin__ is Union)
        UnionType  = <class 'typing.Union'>
        obj        = <class 'bytes'>
/opt/hostedtoolcache/Python/3.14.0-alpha.6/x64/lib/python3.14/typing.py:1652: in __instancecheck__
    warnings._deprecated("_UnionGenericAlias", remove=(3, 17))
        inst       = <class 'bytes'>
        self       = <class 'typing._UnionGenericAlias'>
@Tinche
Copy link
Member

Tinche commented Mar 18, 2025

Interesting, thanks. Going to be a long while until we can fix this though :(

henryiii pushed a commit to scikit-build/scikit-build-core that referenced this issue Mar 18, 2025
Deprecation message introduced in Python3.14. Filed upstream issue:
python-attrs/cattrs#635

Signed-off-by: Cristian Le <[email protected]>
edgarrmondragon added a commit to edgarrmondragon/tap-pushbullet that referenced this issue Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants