Open Bug 2008653 Opened 3 days ago Updated 2 days ago

mach wpt fails with python 3.14

Categories

(Testing :: web-platform-tests, defect)

defect

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: emilio, Assigned: emilio)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 obsolete file)

New python version upgrade, new bustage :)

Running wpt tests locally fails after updating to python 3.14. It works with 3.13 (confirmed by manually downgrading).

$ mach wpt testing/web-platform/tests/css/css-anchor-position/at-position-try-cssom.html
Creating the 'mach' site at /home/emilio/.mozbuild/srcdirs/firefox-4-f84830a4f6ef/_virtualenvs/mach
Creating the 'wpt' site at /home/emilio/.mozbuild/srcdirs/firefox-4-f84830a4f6ef/_virtualenvs/wpt
 0:00.01 INFO Skipping manifest download because existing file is recent
 0:01.51 mozversion INFO application_buildid: 20260106003019
 0:01.51 mozversion INFO application_display_name: Nightly
 0:01.51 mozversion INFO application_id: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
 0:01.51 mozversion INFO application_name: Firefox
 0:01.51 mozversion INFO application_remotingname: firefox-default
 0:01.51 mozversion INFO application_vendor: Mozilla
 0:01.51 mozversion INFO application_version: 148.0a1
 0:01.51 mozversion INFO platform_buildid: 20260106003019
 0:01.51 mozversion INFO platform_version: 148.0a1
 0:03.00 wptserve INFO Starting http server on http://127.0.0.1:8002
 0:03.00 wptserve INFO Starting http server on http://127.0.0.1:8000
 0:03.00 wptserve INFO Starting http server on http://127.0.0.1:8001
 0:03.00 wptserve INFO Starting http server on http://127.0.0.1:8003
 0:03.01 wptserve INFO Starting https server on https://127.0.0.1:8443
 0:03.01 wptserve INFO Starting https server on https://127.0.0.1:8445
 0:03.01 wptserve INFO Starting https server on https://127.0.0.1:8444
 0:03.01 wptserve INFO Starting https server on https://127.0.0.1:8446
 0:03.01 wptserve INFO Create socket on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
 0:03.01 wptserve INFO Bind on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
 0:03.01 wptserve INFO Listen on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
 0:03.02 wptserve INFO Create socket on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
 0:03.02 wptserve INFO Starting http2 server on https://127.0.0.1:9000
 0:03.02 wptserve INFO Bind on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
 0:03.02 wptserve INFO Listen on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
 0:03.04 wptserve INFO Stopped http server on 127.0.0.1:8000
 0:03.04 wptserve INFO Stopped http server on 127.0.0.1:8001
 0:03.04 wptserve INFO Stopped http server on 127.0.0.1:8003
 0:03.04 wptserve INFO Stopped http server on 127.0.0.1:8002
 0:03.04 wptserve INFO Stopped http server on 127.0.0.1:8443
 0:03.04 wptserve INFO Stopped http server on 127.0.0.1:8444
 0:03.04 wptserve INFO Stopped http server on 127.0.0.1:8445
 0:03.04 wptserve INFO Stopped http server on 127.0.0.1:8446
 0:03.04 wptserve INFO Stopped http server on 127.0.0.1:9000
 0:03.08 wptserve INFO Starting WebTransport over HTTP/3 server on 127.0.0.1:11000
/home/emilio/src/moz/firefox-4/testing/web-platform/tests/tools/webtransport/h3/webtransport_h3_server.py:589: RuntimeWarning: coroutine 'WebTransportH3Server._stop_on_server_thread' was never awaited
  self.loop)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Process webtransport-h3 on port 11000:
 0:03.12 wptserve CRITICAL Traceback (most recent call last):
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/tests/tools/serve/serve.py", line 911, in create_daemon
    self.daemon.stop()
    ~~~~~~~~~~~~~~~~^^
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/tests/tools/webtransport/h3/webtransport_h3_server.py", line 589, in stop
    self.loop)
    ^^^^^^^^^
AttributeError: 'WebTransportH3Server' object has no attribute 'loop'

Traceback (most recent call last):
  File "/usr/lib/python3.14/multiprocessing/process.py", line 320, in _bootstrap
    self.run()
    ~~~~~~~~^^
  File "/usr/lib/python3.14/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/tests/tools/serve/serve.py", line 911, in create_daemon
    self.daemon.stop()
    ~~~~~~~~~~~~~~~~^^
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/tests/tools/webtransport/h3/webtransport_h3_server.py", line 589, in stop
    self.loop)
    ^^^^^^^^^
AttributeError: 'WebTransportH3Server' object has no attribute 'loop'
 0:03.50 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
 0:03.51 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
 0:03.59 INFO Closing logging queue
 0:03.59 INFO queue closed
Error running mach:

    mach wpt testing/web-platform/tests/css/css-anchor-position/at-position-try-cssom.html

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke ``./mach busted`` to check if this issue is already on file. If it
isn't, please use ``./mach busted file wpt`` to report it. If ``./mach busted`` is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

Traceback (most recent call last):
  File "/home/emilio/src/moz/firefox-4/python/mach/mach/main.py", line 390, in _run
    return Registrar._run_command_handler(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        handler,
        ^^^^^^^^
    ...<4 lines>...
        **vars(args.command_args),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/emilio/src/moz/firefox-4/python/mach/mach/registrar.py", line 124, in _run_command_handler
    result = fn(instance, **kwargs)
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/mach_commands.py", line 540, in run_wpt
    return run_web_platform_tests(command_context, **params)
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/mach_commands.py", line 528, in run_web_platform_tests
    return wpt_runner.run(logger, **params)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/mach_commands_base.py", line 81, in run
    result = wptrunner.start(**kwargs)
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py", line 591, in start
    rv = int(not run_tests(**kwargs)[0])
                 ~~~~~~~~~^^^^^^^^^^
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py", line 486, in run_tests
    test_environment.ensure_started()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/tests/tools/wptrunner/wptrunner/environment.py", line 295, in ensure_started
    failed, pending = self.test_servers()
                      ~~~~~~~~~~~~~~~~~^^
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/tests/tools/wptrunner/wptrunner/environment.py", line 324, in test_servers
    if not webtranport_h3_server_is_running(host, port, timeout=5):
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/tests/tools/wptrunner/wptrunner/environment.py", line 58, in webtranport_h3_server_is_running
    return server_is_running(host, port, timeout)
  File "/home/emilio/src/moz/firefox-4/testing/web-platform/tests/tools/webtransport/h3/webtransport_h3_server.py", line 604, in server_is_running
    loop = asyncio.get_event_loop()
  File "/usr/lib/python3.14/asyncio/events.py", line 715, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
                       % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'MainThread'.

It seems python 3.14 throws when there's no event loop even in the main thread.

This works, but I'm not sure this is the right place to do this.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Duplicate of this bug: 2002432

I've made a PR upstream with a slightly different change + updating upstream CI to run with 3.14: https://github.com/web-platform-tests/wpt/pull/57004

Attachment #9535831 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: