./mach perftest only seems to work with python 3.11
Categories
(Firefox Build System :: Mach Core, defect)
Tracking
(Not tracked)
People
(Reporter: mgaudet, Unassigned)
References
(Blocks 2 open bugs)
Details
Trying to run anything with mach perftest is failing for me.
Revision: 5223a9e8f62812d59d3daaedadb64d1be3c8757b
M1MacBook:unified-git mgaudet$ ./mach perftest
Creating the 'common' site at /Users/mgaudet/.mozbuild/srcdirs/unified-git-0c9f9c149629/_virtualenvs/common
Error running mach:
mach perftest
The error occurred in mach itself. This is likely a bug in mach itself or a
fundamental problem with a loaded module.
You can invoke ``./mach busted`` to check if this issue is already on file. If it
isn't, please use ``./mach busted file general`` 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:
TypeError: PerftestArgumentParser._parse_known_args() takes 3 positional arguments but 4 were given
File "/Users/mgaudet/unified-git/python/mach/mach/main.py", line 267, in run
return self._run(argv)
~~~~~~~~~^^^^^^
File "/Users/mgaudet/unified-git/python/mach/mach/main.py", line 328, in _run
args = parser.parse_args(argv)
File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 1889, in parse_args
args, argv = self.parse_known_args(args, namespace)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 1899, in parse_known_args
return self._parse_known_args2(args, namespace, intermixed=False)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 1928, in _parse_known_args2
namespace, args = self._parse_known_args(args, namespace, intermixed)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 2183, in _parse_known_args
stop_index = consume_positionals(start_index)
File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 2135, in consume_positionals
take_action(action, args)
~~~~~~~~~~~^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 2004, in take_action
action(self, namespace, argument_values, option_string)
~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mgaudet/unified-git/python/mach/mach/dispatcher.py", line 216, in __call__
command_namespace, extra = subparser.parse_known_args(args)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/Users/mgaudet/unified-git/python/mozperftest/mozperftest/argparser.py", line 214, in parse_known_args
return super().parse_known_args(args, namespace)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 1899, in parse_known_args
return self._parse_known_args2(args, namespace, intermixed=False)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 1928, in _parse_known_args2
namespace, args = self._parse_known_args(args, namespace, intermixed)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This appears to work on Linux however.
| Reporter | ||
Comment 1•1 year ago
|
||
Tried downgrading to python3.10... now I get a different problem
| Reporter | ||
Comment 2•1 year ago
|
||
Ah! I got it working, sort of, by forcing python 3.11 (and -only- Python 3.11 seems to work)
| Reporter | ||
Comment 3•1 year ago
|
||
Oh, lies.
python3.11 ./mach ... still fails
python3.11 python/mozperftest/mozperftest/runner.py --flavor custom-script --app fenix testing/performance/mobile-startup/cvne.sh --perfherder.
does work on the other hand.
Updated•1 year ago
|
Comment 4•1 year ago
|
||
I don't know what I'm doing with Python, but commenting out these lines fixed the issue for me: https://searchfox.org/mozilla-central/rev/29184ec2b107c8b9dd8c9a594711c27545dfb2c7/python/mozperftest/mozperftest/argparser.py#187-201
Comment 5•10 months ago
|
||
dup of bug 1966090?
Comment 6•10 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox Build System::Mach Core' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Description
•