Closed as not planned
Description
Bug report
For Python3.8
-Python3.10
we have
from typing import Tuple, get_args
assert get_args(Tuple) == ()
assert get_args(Tuple[()]) == ((),)
For Python3.11
behavior changed
from typing import Tuple, get_args
assert get_args(Tuple) == ()
assert get_args(Tuple[()]) == ()
which is a problem since it returns the same output for different cases: when there's no info about tuple
elements and when there's no elements in a tuple
.
Your environment
- CPython versions tested on: Python3.8.16, Python3.9.16, Python3.10.9, Python3.11.1.
- Operating system and architecture: macOS 13.1 i386, but I expect it to be OS-independent, reproduces in docker for
python:3.10.9
(sha256:b4b8149f2ff93c993d9b752dd4298493975e341a6b542a33cdfb86ce52555f36
) &python:3.11.1
(sha256:a46b962871434568d186ef17ae7038055e17c670833ca5320fc107435fa146d7
) images.