Running browser chrome tests locally with python 3.12 fails
Categories
(Testing :: Mochitest, defect, P2)
Tracking
(firefox129 fixed)
Tracking | Status | |
---|---|---|
firefox129 | --- | fixed |
People
(Reporter: bytesized, Assigned: ahochheiden)
References
(Blocks 3 open bugs)
Details
Attachments
(2 files)
When I try to run browser chrome mochitests locally on macOS, I get an error. It seems to be consistent no matter which browser chrome test I attempt to run:
> ./mach test browser/components/urlbar/tests/browser-tips/suppress-tips/browser_suppressTips.js
Error running mach:
mach test browser/components/urlbar/tests/browser-tips/suppress-tips/browser_suppressTips.js
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 test`` 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:
ModuleNotFoundError: No module named 'distutils'
File "/Users/tester/mozilla-unified/testing/mach_commands.py", line 454, in test
res = command_context._mach_context.commands.dispatch(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tester/mozilla-unified/python/mach/mach/registrar.py", line 182, in dispatch
if handler.parser:
^^^^^^^^^^^^^^
File "/Users/tester/mozilla-unified/python/mach/mach/decorators.py", line 105, in parser
self._parser = self._parser()
^^^^^^^^^^^^^^
File "/Users/tester/mozilla-unified/testing/mochitest/mach_commands.py", line 193, in setup_argument_parser
load_source("mochitest", path)
File "/Users/tester/mozilla-unified/testing/mozbase/mozfile/mozfile/mozfile.py", line 645, in load_source
loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/Users/tester/mozilla-unified/obj-clean/_tests/testing/mochitest/runtests.py", line 37, in <module>
from distutils import spawn
Sentry event ID: 2f9e8baae3054258bb5f0b595625b0a0
Reporter | ||
Comment 1•6 months ago
|
||
I tried this on a clean checkout of mozilla-central with a mozconfig with only this line uncommented:
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-clean
Updated•6 months ago
|
Comment 2•6 months ago
|
||
I doubt macOS ships with python 3.12 itself. Try uninstalling python 3.12 and use the python3 that comes with the command line tools.
Comment 3•6 months ago
|
||
Ran into this after a brew upgrade
. brew unlink python@3.12
fixed the issue.
Reporter | ||
Comment 4•6 months ago
|
||
If I try to remove it, I get a warning that uninstalling it will break watchman. If I uninstall it and watchman and then rerun ./mach bootstrap
it just installs python 3.12 again, presumably in order to install watchman.
Reporter | ||
Comment 5•6 months ago
|
||
(In reply to Paul Zühlcke [:pbz] from comment #3)
Ran into this after a
brew upgrade
.brew unlink python@3.12
fixed the issue.
This did seem to work for me.
Comment 6•6 months ago
|
||
The severity field is not set for this bug.
:jmaher, could you have a look please?
For more information, please visit BugBot documentation.
Comment 7•6 months ago
|
||
we will end up needing to support newer versions of python both from mach
and in CI. For now this has a workaround.
Assignee | ||
Comment 8•4 months ago
|
||
Updated•4 months ago
|
Assignee | ||
Comment 9•4 months ago
|
||
Updated•4 months ago
|
Comment 11•4 months ago
|
||
Comment 12•4 months ago
|
||
Backed out 8 changesets (Bug 1899681, Bug 1888570, Bug 1898817) as requested by the dev CLOSED TREE
Failure Log: https://treeherder.mozilla.org/logviewer?job_id=462065796&repo=autoland&lineNumber=890
Backout: https://hg.mozilla.org/integration/autoland/rev/48183268590c481e37309299d130508c7d1dc43e
Comment 14•3 months ago
|
||
Comment 15•3 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a7b92246bd4d
https://hg.mozilla.org/mozilla-central/rev/5621ba683661
Description
•