]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42233: Correctly repr GenericAlias when used with typing module (GH-23081)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 7 Nov 2020 16:46:08 +0000 (08:46 -0800)
committerGitHub <noreply@github.com>
Sat, 7 Nov 2020 16:46:08 +0000 (08:46 -0800)
commite81e09bfc8a29a44a649a962870a26fe0c097cfa
tree813e841dbe1c915c3b68ef0d85262462f6878327
parent4c239a3222296c7d85ccd46e27835cc7880350be
bpo-42233: Correctly repr GenericAlias when used with typing module (GH-23081)

Noticed by @serhiy-storchaka in the bpo.  `typing`'s types were not showing the parameterized generic.
Eg. previously:
```python
>>> typing.Union[dict[str, float], list[int]]
'typing.Union[dict, list]'
```
Now:
```python
>>> typing.Union[dict[str, float], list[int]]
'typing.Union[dict[str, float], list[int]]'
```

Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit 1f7dfb277e5b88cddc13e5024766be787a3e9127)

Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
Lib/test/test_typing.py
Lib/typing.py
Misc/NEWS.d/next/Library/2020-11-02-01-31-15.bpo-42233.YxRj-h.rst [new file with mode: 0644]