Update wptrunner for compatibility with a change in Python 3.13.#58985
Merged
jonathan-j-lee merged 1 commit intoweb-platform-tests:masterfrom Apr 4, 2026
Merged
Conversation
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.
073e51c
into
web-platform-tests:master
36 of 37 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.