]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-115165: Fix `typing.Annotated` for immutable types (GH-115213) (#115228)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 9 Feb 2024 22:43:24 +0000 (23:43 +0100)
committerGitHub <noreply@github.com>
Fri, 9 Feb 2024 22:43:24 +0000 (22:43 +0000)
commit7542210a95dda6e9eb3e7f0c606940d6f3b75c72
tree693fe964718d36ae0cf9ac6d07d261afb3823eae
parentca3eca1584c948d075eee904ad8f1bb910894212
[3.11] gh-115165: Fix `typing.Annotated` for immutable types (GH-115213) (#115228)

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]