Title: 3.14 regression: `Union[int, str] is Union[int, str]` does not hold · Issue #131933 · python/cpython · GitHub
Open Graph Title: 3.14 regression: `Union[int, str] is Union[int, str]` does not hold · Issue #131933 · python/cpython
X Title: 3.14 regression: `Union[int, str] is Union[int, str]` does not hold · Issue #131933 · python/cpython
Description: Bug report Bug description: Python 3.13.2 >>> from typing import Union >>> Union[int, str] is Union[int, str] True Python 3.14.0a6 >>> from typing import Union >>> Union[int, str] is Union[int, str] False Is this change desired, is it do...
Open Graph Description: Bug report Bug description: Python 3.13.2 >>> from typing import Union >>> Union[int, str] is Union[int, str] True Python 3.14.0a6 >>> from typing import Union >>> Union[int, str] is Union[int, str...
X Description: Bug report Bug description: Python 3.13.2 >>> from typing import Union >>> Union[int, str] is Union[int, str] True Python 3.14.0a6 >>> from typing import Union >>&g...
Opengraph URL: https://github.com/python/cpython/issues/131933
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"3.14 regression: `Union[int, str] is Union[int, str]` does not hold","articleBody":"# Bug report\n\n### Bug description:\n\n### Python 3.13.2\n\n```pycon\n\u003e\u003e\u003e from typing import Union\n\u003e\u003e\u003e Union[int, str] is Union[int, str]\nTrue\n```\n\n### Python 3.14.0a6\n\n```pycon\n\u003e\u003e\u003e from typing import Union\n\u003e\u003e\u003e Union[int, str] is Union[int, str]\nFalse\n```\n\nIs this change desired, is it documented? This breaks tests in https://github.com/python-attrs/cattrs/blob/d8f17b7e7e57006171027df4d647a6fe068b623e/tests/test_disambiguators.py#L211\n\n```python\nassert fn({\"op\": 0, \"t\": \"MESSAGE_CREATE\"}) is Union[F, G]\n```\n\n### CPython versions tested on:\n\n3.14\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-131941\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/hroncok","@type":"Person","name":"hroncok"},"datePublished":"2025-03-31T10:41:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/131933/cpython/issues/131933"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f33392b9-ecb7-1eed-16fd-59e344b55963 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA54:6C43E:48C8B5:64AAA6:696A745E |
| html-safe-nonce | 669a6b753d055b5607c43dfa89983ee4f3b41aae3e20f7b0fb27bee467510bf3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTU0OjZDNDNFOjQ4QzhCNTo2NEFBQTY6Njk2QTc0NUUiLCJ2aXNpdG9yX2lkIjoiMTU3NzcwODg5MDIzNDcxMzE4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3446b9dbb5713e35c0b93bb51259cba4e5435a68f1679e8a054439308078f573 |
| hovercard-subject-tag | issue:2960134419 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/131933/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c2dff428335b491442f3fe7fd602fd01fcab4d54061c66fec0c19db8ba38a6d9/python/cpython/issues/131933 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c2dff428335b491442f3fe7fd602fd01fcab4d54061c66fec0c19db8ba38a6d9/python/cpython/issues/131933 |
| og:image:alt | Bug report Bug description: Python 3.13.2 >>> from typing import Union >>> Union[int, str] is Union[int, str] True Python 3.14.0a6 >>> from typing import Union >>> Union[int, str] is Union[int, str... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hroncok |
| hostname | github.com |
| expected-hostname | github.com |
| None | cfa223d62d272274e0b68350b4bd7741f3ca7498b8c4b8b1bc1e6deabbdbc09d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6a0b6893c221f98f607598e939299fdf5763435d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width