Skip to content

Remove builtins.ellipsis pseudo-type - #15712

Merged
srittau merged 6 commits into
mainfrom
rm-ellipsis
Oct 8, 2026
Merged

srittau merged 6 commits into
mainfrom
rm-ellipsis

Conversation

@srittau

@srittau srittau commented May 7, 2026 •

Copy link
Copy Markdown
Collaborator

This type never existed at runtime, and was replaced by types.EllipsisType.

Part of #7580.

This type never existed at runtime, and was replaced by `types.EllipsisType`.
@github-actions

This comment has been minimized.

hamdanal added a commit to hamdanal/typeshed that referenced this pull request Aug 16, 2026
AlexWaygood pushed a commit that referenced this pull request Aug 16, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

JelleZijlstra pushed a commit to python/mypy that referenced this pull request Aug 29, 2026
Part of #8240

Unblocks python/typeshed#15712

The actual change is one line in checkexpr and the other changes are for
tests, mostly mechanical.
I used the try except trick used for `types.ModuleType` in the name
lookup so that tests that don't import the `types` module don't crash
with `KeyError` when they use `...` (which is used in almost all tests
as empty function body).

Most test changes are caused by modules now correctly resolving to
module type instead of `object` because some fixtures started importing
`types`.

The changes are mine, I only used a coding agent to fix the
`fine-grained-modules.test` and `testexportjson.py` tests and the
missing visitor method.
@hamdanal

Copy link
Copy Markdown
Contributor

@srittau we have python/mypy#21911 now. Hopefully it will be included in the next mypy release and this PR will be unblocked.

@AlexWaygood

Copy link
Copy Markdown
Member

Woah, thanks so much @hamdanal!

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@srittau
srittau marked this pull request as ready for review October 8, 2026 13:49
@srittau
srittau merged commit 0d9b192 into main Oct 8, 2026
88 checks passed
@srittau
srittau deleted the rm-ellipsis branch October 8, 2026 13:51
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