'_UnionGenericAlias' is deprecated and slated for removal in Python 3.17
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Inspect cattrs/_compat.py, especially is_union_type around the deprecated _UnionGenericAlias check, and reproduce the warning under Python 3.14. Confirm that the compatibility logic no longer emits the deprecation warning while preserving union detection behavior.
Written by the indexing model from the issue text.
Description
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'>
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 165
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from python-attrs/cattrs
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
python-attrs/cattrs#761 · 2 comments ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
python-attrs/cattrs#513 · 4 comments ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 85/100
python-attrs/cattrs#774 ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
python-attrs/cattrs#746 · 2 comments ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
python-attrs/cattrs#743 · 2 comments ·
Maintainers usually reply within 2 days
All issues in python-attrs/cattrs
Similar issues
-
upstream update
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conan-io/conan-center-index#31098 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
john-kurkowski/tldextract#382 ·
-
comp/tools duplicate P2 sweeper:risk-compatibility tool/mcp type/bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
NousResearch/hermes-agent#132042 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
deepset-ai/haystack#13092 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
feder-cr/invisible_playwright_mcp#1408 ·
Maintainers usually reply within 1 day