]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-132139: Document that you can no longer set attributes on unions (#132146)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Sun, 6 Apr 2025 12:43:09 +0000 (05:43 -0700)
committerGitHub <noreply@github.com>
Sun, 6 Apr 2025 12:43:09 +0000 (13:43 +0100)
Doc/whatsnew/3.14.rst

index 13448d1fc07654cfabac822a5a5b77166b128f43..b20d75c11807133c5438872934928c0f2f9ad77b 100644 (file)
@@ -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`.)