Title: 2.1 changelog is incorrect · Issue #21561 · python/mypy · GitHub
Open Graph Title: 2.1 changelog is incorrect · Issue #21561 · python/mypy
X Title: 2.1 changelog is incorrect · Issue #21561 · python/mypy
Description: Bug Report Hi! I've just installed mypy 2.1.0 and tried it against the snippet posted for the issue 16093 (#16093 (comment)). It seems that the change is still not active in mypy 2.1.0? The changelog states that the fix was implemented i...
Open Graph Description: Bug Report Hi! I've just installed mypy 2.1.0 and tried it against the snippet posted for the issue 16093 (#16093 (comment)). It seems that the change is still not active in mypy 2.1.0? The changel...
X Description: Bug Report Hi! I've just installed mypy 2.1.0 and tried it against the snippet posted for the issue 16093 (#16093 (comment)). It seems that the change is still not active in mypy 2.1.0? The cha...
Opengraph URL: https://github.com/python/mypy/issues/21561
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"2.1 changelog is incorrect","articleBody":"**Bug Report**\n\nHi! I've just installed mypy 2.1.0 and tried it against the snippet posted for the issue 16093 (https://github.com/python/mypy/issues/16093#issue-1892078601).\n\nIt seems that the change is still not active in mypy 2.1.0?\n\nThe changelog states that the fix was implemented in 2.1.0:\nhttps://mypy.readthedocs.io/en/stable/changelog.html#other-notable-fixes-and-improvements\n\nNotably:\nhttps://github.com/python/mypy/pull/21456\n\n**To Reproduce**\n\nHere's the content of the exact snippet I ran mypy on, just for reference:\n\n```python\nfrom enum import Enum\nfrom typing import assert_never\n\n\nclass MyEnum(Enum):\n A = 1\n B = 2\n C = 3\n\n\ndef my_function(a: MyEnum) -> bool:\n if a == MyEnum.A:\n return True\n elif a in (MyEnum.B, MyEnum.C):\n return False\n assert_never(a)\n\n\nmy_function(MyEnum.A)\n```\n**Expected Behavior**\n\nI expected no error.\n\n**Actual Behavior**\n\nI get:\n```\nscratch_6.py:16: error: Argument 1 to \"assert_never\" has incompatible type \"Literal[MyEnum.B, MyEnum.C]\"; expected \"Never\" [arg-type] \nFound 1 error in 1 file (checked 1 source file)\n```\n\n**Your Environment**\n\n```\n$ mypy --version\nmypy 2.1.0 (compiled: yes)\n```\n\nCommand line:\n```\nmypy --strict scratch_6.py\n```","author":{"url":"https://github.com/mristin","@type":"Person","name":"mristin"},"datePublished":"2026-05-29T10:46:14Z","url":"https://github.com/python/mypy/issues/21561"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:fd71c193-e028-3069-633e-39d6242bc291 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AFCA:D064:252A080:3285DB4:6B003469 |
| html-safe-nonce | dea5721c110770bbd9df1cdb048444195c3410f158899af70c6cf6d5935a2307 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkNBOkQwNjQ6MjUyQTA4MDozMjg1REI0OjZCMDAzNDY5IiwidmlzaXRvcl9pZCI6Ijg0NzExOTU1NjI4NTc3MzkzNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 60e81eb427c2e8b74bd2ae08d00beaf414fbe0b12615320557f3912b2412ec2d |
| hovercard-subject-tag | issue:4547815523 |
| 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/mypy/21561/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3a82a64573c65df94c57ed52d8a3b3df2ddb0b33474399009f2098925ab79f68/python/mypy/issues/21561 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3a82a64573c65df94c57ed52d8a3b3df2ddb0b33474399009f2098925ab79f68/python/mypy/issues/21561 |
| og:image:alt | Bug Report Hi! I've just installed mypy 2.1.0 and tried it against the snippet posted for the issue 16093 (#16093 (comment)). It seems that the change is still not active in mypy 2.1.0? The changel... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mristin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width