From d7be53a70e34cfa9c2b4bf0b4eb423af0febfc1f Mon Sep 17 00:00:00 2001 From: Andreu Botella Date: Tue, 3 Jan 2023 21:56:55 +0100 Subject: [PATCH 1/2] Make `mach` work on Python 3.11 --- python/mach/mach/decorators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/mach/mach/decorators.py b/python/mach/mach/decorators.py index 15b8ca58387..be12deb4af4 100644 --- a/python/mach/mach/decorators.py +++ b/python/mach/mach/decorators.py @@ -112,7 +112,7 @@ def CommandProvider(cls): isfunc = inspect.ismethod if sys.version_info < (3, 0) else inspect.isfunction if isfunc(cls.__init__): - spec = inspect.getargspec(cls.__init__) + spec = inspect.getfullargspec(cls.__init__) if len(spec.args) > 2: msg = 'Mach @CommandProvider class %s implemented incorrectly. ' + \ From 2c1d67642f1c207fad9396ed71bfa4b845ac0199 Mon Sep 17 00:00:00 2001 From: Andreu Botella Date: Tue, 3 Jan 2023 21:58:04 +0100 Subject: [PATCH 2/2] Revert "Updated README to fix compatibility issues on Fedora." This reverts commit 4e997ff334b7e7a9569ba9bde92242900e283c76. --- README.md | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 9fcff9d0ae7..819fdf13263 100644 --- a/README.md +++ b/README.md @@ -93,26 +93,12 @@ If you get an undefined symbol error on `gst_player_get_config` try removing `gi #### On Fedora -```sh -sudo dnf install python3.7 python3-devel +``` sh +sudo dnf install python3 python3-virtualenv python3-pip python3-devel +python3 ./mach bootstrap ``` -Installing pip 3.7 alongside Python 3.7 is vital. You might run into issues with virtualenv -when trying to use Mach tools. You can install pip3.7 alongside virtualenv by executing: - -```sh -curl https://bootstrap.pypa.io/get-pip.py | sudo -H python3.7 -python3.7 -m pip install virtualenv -``` - -Fedora 37 aliases python3.11 as `python3` by default. For this reason, when running Mach tools, make sure you -execeute them with Python 3.7: - -```py -python3.7 ./mach run https://servo.org/ -``` - -If `python3.7 ./mach bootstrap` doesn't work, file a bug, and run the commands below: +If `python3 ./mach bootstrap` doesn't work, file a bug, and, run the commands below: ``` sh sudo dnf install curl libtool gcc-c++ libXi-devel libunwind-devel \ @@ -125,7 +111,6 @@ sudo dnf install curl libtool gcc-c++ libXi-devel libunwind-devel \ libjpeg-turbo-devel zlib libjpeg ``` - #### On CentOS ``` sh