]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42576: Raise TypeError when passing in keyword arguments to GenericAlias (GH...
authorkj <28750310+Fidget-Spinner@users.noreply.github.com>
Sat, 5 Dec 2020 16:02:14 +0000 (23:02 +0700)
committerGitHub <noreply@github.com>
Sat, 5 Dec 2020 16:02:14 +0000 (08:02 -0800)
commit804d6893b801e8f30318afc38c20d4d0e6161db3
tree54ab5cd365ec99fa0cd95cb690bb9ef3d02f9658
parentda3d2abe6be9fcf18cac12ec5d7d9f1180d94b5e
bpo-42576: Raise TypeError when passing in keyword arguments to GenericAlias (GH-23656)

Use `_PyArg_NoKeywords` instead of `_PyArg_NoKwnames` when checking the `kwds` tuple when creating `GenericAlias`. This fixes an interpreter crash when passing in keyword arguments to `GenericAlias`'s constructor.

Needs backport to 3.9.

Automerge-Triggered-By: GH:gvanrossum
Lib/test/test_genericalias.py
Misc/NEWS.d/next/Core and Builtins/2020-12-05-22-34-47.bpo-42576.lEeEl7.rst [new file with mode: 0644]
Objects/genericaliasobject.c