Skip to content

Update wptrunner for compatibility with a change in Python 3.13.#58985

Merged
jonathan-j-lee merged 1 commit intoweb-platform-tests:masterfrom
dpranke:fix_wptrunner_for_3.13
Apr 4, 2026
Merged

Update wptrunner for compatibility with a change in Python 3.13.#58985
jonathan-j-lee merged 1 commit intoweb-platform-tests:masterfrom
dpranke:fix_wptrunner_for_3.13

Conversation

@dpranke
Copy link
Copy Markdown
Contributor

@dpranke dpranke commented Apr 4, 2026

This addresses #58984.

In Python 3.13, they upgraded to version 7.0.0 of importlib_metadata; as part of that upgrade, the EntryPoints class changed to something that no longer supported indexed access (it became more of a dict-like thing than a list- or tuple-like thing)
changed so that the EntryPoint class no longer supported getitem.
(See https://un5uj6rmx4tef66j5bkfwk348hk9pc2nn6g7hpg.julianrbryant.com/en/latest/history.html#v7-0-0).

As a result, if you were using a custom entry point to register an external test runner, tools/wptrunner/wptrunner.products.py would crash in a call to reverse().

This fixes the issue by converting the "tuple" of EntryPoints into a list of values, which can then be accessed by index (and hence reverse() would work.

This addresses web-platform-tests#58984.

In Python 3.13, they upgraded to version 7.0.0 of
importlib_metadata; as part of that upgrade, the
EntryPoints class changed to something that no
longer supported indexed access (it became more of a
dict-like thing than a list- or tuple-like thing)
changed so that the EntryPoint class no longer supported
 __getitem__.
(See https://un5uj6rmx4tef66j5bkfwk348hk9pc2nn6g7hpg.julianrbryant.com/en/latest/history.html#v7-0-0).

As a result, if you were using a custom entry point to register
an external test runner, tools/wptrunner/wptrunner.products.py
would crash in a call to `reverse()`.

This fixes the issue by converting the "tuple" of EntryPoints into a list
of values, which can then be accessed by index (and hence `reverse()`
would work.
@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels Apr 4, 2026
Copy link
Copy Markdown
Contributor

@jonathan-j-lee jonathan-j-lee left a comment

Choose a reason for hiding this comment

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

Thank you!

@jonathan-j-lee jonathan-j-lee merged commit 073e51c into web-platform-tests:master Apr 4, 2026
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra wptrunner The automated test runner, commonly called through ./wpt run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants