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 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:
Reproduction
print(type(...).__name__)
print(repr(type(...)))
CPython 3.14:
ellipsis
<class 'ellipsis'>
RustPython:
EllipsisType
<class 'EllipsisType'>
(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.)
Python Documentation or reference to CPython source code
types.EllipsisType — documented as the type of Ellipsis; its __name__ is ellipsis.
- CPython's
PyEllipsis_Type has tp_name = "ellipsis".
- RustPython's
PyEllipsis is declared #[pyclass(module = false, name = "EllipsisType")]; that name is the type's tp_name.
Suggested fix
Rename 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.
Investigated and drafted with AI assistance (Claude Code), reviewed by a human before filing, per RustPython's AI policy.
Feature
In CPython the type of the
...singleton is namedellipsis(lowercase);types.EllipsisTypeis just an alias to it. RustPython named the typeEllipsisType, so its__name__andreprdisagree with CPython.Surfaced by running CPython's own stdlib test suite under RustPython —
test_json.test_default::test_bad_defaultfails (its error text embedstype(o).__name__). The minimal standalone reproduction:Reproduction
CPython 3.14:
RustPython:
(
types.EllipsisType is type(...)isTrueon both — only the name differs. A user-visible consequence: thejsonencoder's PEP 678 notewhen serializing {type(o).__name__} objectreadsEllipsisTypeinstead ofellipsis.)Python Documentation or reference to CPython source code
types.EllipsisType— documented as the type ofEllipsis; its__name__isellipsis.PyEllipsis_Typehastp_name = "ellipsis".PyEllipsisis declared#[pyclass(module = false, name = "EllipsisType")]; thatnameis the type'stp_name.Suggested fix
Rename the pyclass
nameto"ellipsis".types.EllipsisTypestill resolves (it is defined as an alias), and now reports__name__ == 'ellipsis', so thetest_bad_defaultfailure above then passes.Investigated and drafted with AI assistance (Claude Code), reviewed by a human before filing, per RustPython's AI policy.