Title: `type(...).__name__` is `'EllipsisType'` instead of `'ellipsis'` · Issue #8052 · RustPython/RustPython · GitHub
Open Graph Title: `type(...).__name__` is `'EllipsisType'` instead of `'ellipsis'` · Issue #8052 · RustPython/RustPython
X Title: `type(...).__name__` is `'EllipsisType'` instead of `'ellipsis'` · Issue #8052 · RustPython/RustPython
Description: Feature In CPython the type of the ... singleton is named ellipsis (lowercase); types.EllipsisType is just an alias to it. RustPython named the type EllipsisType, so its __name__ and repr disagree with CPython. Surfaced by running CPytho...
Open Graph Description: Feature In CPython the type of the ... singleton is named ellipsis (lowercase); types.EllipsisType is just an alias to it. RustPython named the type EllipsisType, so its __name__ and repr disagree ...
X Description: Feature In CPython the type of the ... singleton is named ellipsis (lowercase); types.EllipsisType is just an alias to it. RustPython named the type EllipsisType, so its __name__ and repr disagree ...
Opengraph URL: https://github.com/RustPython/RustPython/issues/8052
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`type(...).__name__` is `'EllipsisType'` instead of `'ellipsis'`","articleBody":"## Feature\n\nIn CPython the type of the `...` singleton is named `ellipsis` (lowercase); `types.EllipsisType` is just an alias to it. RustPython named the type `EllipsisType`, so its `__name__` and `repr` disagree with CPython.\n\nSurfaced by running CPython's own stdlib test suite under RustPython — `test_json.test_default::test_bad_default` fails (its error text embeds `type(o).__name__`). The minimal standalone reproduction:\n\n### Reproduction\n\n```python\nprint(type(...).__name__)\nprint(repr(type(...)))\n```\n\n**CPython 3.14:**\n\n```\nellipsis\n\u003cclass 'ellipsis'>\n```\n\n**RustPython:**\n\n```\nEllipsisType\n\u003cclass 'EllipsisType'>\n```\n\n(`types.EllipsisType is type(...)` is `True` on both — only the name differs. A user-visible consequence: the `json` encoder's PEP 678 note `when serializing {type(o).__name__} object` reads `EllipsisType` instead of `ellipsis`.)\n\n## Python Documentation or reference to CPython source code\n\n- [`types.EllipsisType`](https://docs.python.org/3/library/types.html#types.EllipsisType) — documented as the type of `Ellipsis`; its `__name__` is `ellipsis`.\n- CPython's [`PyEllipsis_Type`](https://github.com/python/cpython/blob/v3.14.3/Objects/sliceobject.c) has `tp_name = \"ellipsis\"`.\n- RustPython's [`PyEllipsis`](https://github.com/RustPython/RustPython/blob/8e35cc9e72ea243df2705acb2cfb1a63fb8fbe0b/crates/vm/src/builtins/slice.rs#L372) is declared `#[pyclass(module = false, name = \"EllipsisType\")]`; that `name` is the type's `tp_name`.\n\n### Suggested fix\n\nRename the pyclass `name` to `\"ellipsis\"`. `types.EllipsisType` still resolves (it is defined as an alias), and now reports `__name__ == 'ellipsis'`, so the `test_bad_default` failure above then passes.\n\n---\n*Investigated and drafted with AI assistance (Claude Code), reviewed by a human before filing, per RustPython's AI policy.*\n","author":{"url":"https://github.com/myers","@type":"Person","name":"myers"},"datePublished":"2026-06-05T16:24:29Z","url":"https://github.com/RustPython/RustPython/issues/8052"}
| 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:f7b02efc-b83e-b073-fb5c-f1a4f8942670 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDAC:30263F:21D562F:2E07EB1:6B002717 |
| html-safe-nonce | 6530b026fa8564f45f66b95dd04498115362ae5c0e73fe994eef5ec948c55274 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREFDOjMwMjYzRjoyMUQ1NjJGOjJFMDdFQjE6NkIwMDI3MTciLCJ2aXNpdG9yX2lkIjoiNDQ2NjI1NTY4NzM5MDg2NTE3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3a6bb34e2d3561549b8415aeecc48f180fc7d1059ae25efbdea4d76f2627fefe |
| hovercard-subject-tag | issue:4598423192 |
| 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/RustPython/RustPython/8052/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3371f20bc43ed379e501e873494738148429964e5ca08605592ec814c8cf1597/RustPython/RustPython/issues/8052 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3371f20bc43ed379e501e873494738148429964e5ca08605592ec814c8cf1597/RustPython/RustPython/issues/8052 |
| og:image:alt | Feature In CPython the type of the ... singleton is named ellipsis (lowercase); types.EllipsisType is just an alias to it. RustPython named the type EllipsisType, so its __name__ and repr disagree ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | myers |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width