From dbfc6a417a5db237ff16a8a75f09c1bd5d5bd349 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 6 Apr 2025 05:43:09 -0700 Subject: gh-132139: Document that you can no longer set attributes on unions (#132146) --- Doc/whatsnew/3.14.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 13448d1..b20d75c 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -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`.) -- cgit v0.12