Skip to content

🐛 fix(annotations): use class role for Ellipsis/NotImplementedType on 3.13+#707

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix-main
Jun 3, 2026
Merged

🐛 fix(annotations): use class role for Ellipsis/NotImplementedType on 3.13+#707
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix-main

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Jun 3, 2026

Copy link
Copy Markdown
Member

The scheduled CI job on main started failing because the Python documentation changed the intersphinx inventory entries for types.EllipsisType and types.NotImplementedType from py:data to py:class. 🐛 The role test resolves the expected role from the live docs.python.org inventory, so once the upstream docs shifted, the run broke on Python 3.13 and 3.14 while 3.12 kept passing since its docs still expose py:data.

The upstream change is python/cpython#150682 (gh-89554: Document NoneType, NotImplementedType and EllipsisType as classes), backported to 3.13 in python/cpython#150757, to 3.14 in python/cpython#150756, and to 3.15 in python/cpython#150755. It was merged on 2026-06-02 and not backported to 3.12, which is why only the 3.13+ inventories are affected.

The fix makes the role selection version-aware: emit the class role for these two types on Python 3.13 and newer, and keep data on 3.12 and earlier. This mirrors the existing version-conditional handling already in place for typing.Union.

Reviewers should note this only affects how these two types members are cross-referenced in generated docs; everything else in the annotation formatting path is unchanged.

… 3.13+

The Python 3.13 docs changed the inventory entries for
``types.EllipsisType`` and ``types.NotImplementedType`` from ``py:data``
to ``py:class``, which broke the scheduled CI job that resolves the
expected role from the live docs.python.org inventory. Emit the
``class`` role for these two types on Python 3.13+ and keep ``data`` on
3.12 and earlier.
@gaborbernat gaborbernat added the bug label Jun 3, 2026
@gaborbernat
gaborbernat merged commit bf535f6 into tox-dev:main Jun 3, 2026
8 checks passed
@gaborbernat
gaborbernat deleted the fix-main branch June 10, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant