]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.10] bpo-46581: Propagate private vars via _GenericAlias.copy_with (GH-31061) ...
authorMatt Bogosian <matt@bogosian.net>
Fri, 11 Mar 2022 14:57:52 +0000 (08:57 -0600)
committerGitHub <noreply@github.com>
Fri, 11 Mar 2022 14:57:52 +0000 (16:57 +0200)
commit3bc801960655ea265599805eac24173164b511a6
treeffc6d64510a05d17d56910a584707883a093c4aa
parent4199b7ffbbaa5fe52a4c85c8672ac6773a75ba8f
[3.10] bpo-46581: Propagate private vars via _GenericAlias.copy_with (GH-31061) (GH-31821)

(Cherry-picked from 32bf3597922ac3f613989582afa2bff43bea8a2f.)

GH-26091 added the _typevar_types and _paramspec_tvars instance
variables to _GenericAlias. However, they were not propagated
consistently. This commit addresses the most prominent deficiency
identified in bpo-46581 (namely their absence from
_GenericAlias.copy_with), but there could be others.

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_typing.py
Lib/typing.py
Misc/ACKS
Misc/NEWS.d/next/Library/2022-02-01-11-32-47.bpo-46581.t7Zw65.rst [new file with mode: 0644]