FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove typing._promote by srittau · Pull Request #14958 · python/typeshed · GitHub

Repository navigation

Remove typing._promote - #14958

Merged
hauntsaninja merged 1 commit into
python:mainfrom
srittau:rm-promote
Nov 3, 2025
Merged

hauntsaninja merged 1 commit into
python:mainfrom
srittau:rm-promote

Conversation

srittau commented Nov 1, 2025

Copy link
Copy Markdown
Collaborator

Part of #7580

github-actions Bot commented Nov 1, 2025

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

discord.py (https://github.com/Rapptz/discord.py)
- ...typeshed_to_test/stdlib/typing.pyi:1040: note: "update" of "TypedDict" defined here
+ ...typeshed_to_test/stdlib/typing.pyi:1036: note: "update" of "TypedDict" defined here

srittau marked this pull request as ready for review November 1, 2025 13:59

Copy link
Copy Markdown
Member

Mypy still support this (search for @_promote in its test suite), but it's undocumented and I have no idea whether anyone still uses it. (Evidently nobody in the mypy-primer corpus does, but that's not all code.) I'm fine with removing this: mypy can add it to mypy-extensions if someone still wants this feature.

Copy link
Copy Markdown
Collaborator

Yes, okay to remove. There's no winning with promotion, on the one hand we have "isinstance(5, Number)" crowd and on the other we have the "(5).hex()" crowd

hauntsaninja merged commit ce3094c into python:main Nov 3, 2025
63 checks passed
srittau deleted the rm-promote branch November 3, 2025 09:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL