8000 gh-132139: Document that you can no longer set attributes on unions by JelleZijlstra · Pull Request #132146 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-132139: Document that you can no longer set attributes on unions #132146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-132139: Document that you can no longer set attributes on unions
Closes #132139.
  • Loading branch information
JelleZijlstra committed Apr 6, 2025
commit 7ab23c37023395cb479dd440a49daaa21a0db27c
2 changes: 2 additions & 0 deletions Doc/whatsnew/3.14.rst
6826
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,8 @@ typing
For example, ``isinstance(int | str, typing.Union)`` will return ``True``; previously
this raised :exc:`TypeError`.
- The ``__args__`` attribute of :class:`typing.Union` objects is no longer writable.
- It is no longer possible to set arbitrary dunder attributes on :class:`typing.Union`
objects.

(Contributed by Jelle Zijlstra in :gh:`105499`.)

Expand Down
Loading
0