mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1823972 - Reintroduce maximum python version warning in Raptor. r=perftest-reviewers,afinder
This patch brings back a warning message for users in case the system python being used is greater than a version officially supported by Raptor. (e.g. bug 1778573) Going forward it makes sense to keep this warning and increment the value `max_py_minor` whenever an upgrade has been completed. Differential Revision: https://phabricator.services.mozilla.com/D173755
This commit is contained in:
parent
cbf0e96bfa
commit
22ab649ea7
@ -33,6 +33,14 @@ class RaptorRunner(MozbuildObject):
|
||||
2. Make the config for Raptor mozharness
|
||||
3. Run mozharness
|
||||
"""
|
||||
# Validate that the user is using a supported python version before doing anything else
|
||||
max_py_major, max_py_minor = 3, 10
|
||||
sys_maj, sys_min = sys.version_info.major, sys.version_info.minor
|
||||
if sys_min > max_py_minor:
|
||||
raise PythonVersionException(
|
||||
f"Please downgrade your Python version as Raptor does not yet support Python versions greater than {max_py_major}.{max_py_minor}. "
|
||||
f"You seem to currently be using Python {sys_maj}.{sys_min}"
|
||||
)
|
||||
self.init_variables(raptor_args, kwargs)
|
||||
self.make_config()
|
||||
self.write_config()
|
||||
@ -444,3 +452,7 @@ def run_raptor(command_context, **kwargs):
|
||||
)
|
||||
def run_raptor_test(command_context, **kwargs):
|
||||
return run_raptor(command_context, **kwargs)
|
||||
|
||||
|
||||
class PythonVersionException(Exception):
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user