]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-115165: Fix `typing.Annotated` for immutable types (GH-115213) (#115227)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 9 Feb 2024 22:31:57 +0000 (23:31 +0100)
committerGitHub <noreply@github.com>
Fri, 9 Feb 2024 22:31:57 +0000 (22:31 +0000)
commit321ec5e0fe87220c5ed5711926bb0212f963e5fd
tree5eab6f4087dbc893aef6c4443b63f99b10d89a04
parent3539b02873525ffbb81f34491c982c52393ae87e
[3.12] gh-115165: Fix `typing.Annotated` for immutable types (GH-115213) (#115227)

gh-115165: Fix `typing.Annotated` for immutable types (GH-115213)

The return value from an annotated callable can raise any exception from
__setattr__ for the `__orig_class__` property.
(cherry picked from commit 564385612cdf72c2fa8e629a68225fb2cd3b3d99)

Co-authored-by: dave-shawley <daveshawley@gmail.com>
Lib/test/test_typing.py
Lib/typing.py
Misc/NEWS.d/next/Library/2024-02-09-07-20-16.gh-issue-115165.yfJLXA.rst [new file with mode: 0644]