mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Auto merge of #29288 - andreubotella:support-python3.11, r=jdm
Make `mach` work on Python 3.11 This PR fixes the bug where `mach` fails when run on Python 3.11. It also reverts #29124, which added a workaround for this bug on the documentation. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #29107 (already closed due to the workaround in #29124, but this PR fixes it) <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because they only involve tooling and documentation <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
82b3d1043c
2 changed files with 5 additions and 20 deletions
21
README.md
21
README.md
|
@ -94,25 +94,11 @@ If you get an undefined symbol error on `gst_player_get_config` try removing `gi
|
||||||
#### On Fedora
|
#### On Fedora
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
sudo dnf install python3.7 python3-devel
|
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
|
If `python3 ./mach bootstrap` doesn't work, file a bug, and, run the commands below:
|
||||||
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:
|
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
sudo dnf install curl libtool gcc-c++ libXi-devel libunwind-devel \
|
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
|
libjpeg-turbo-devel zlib libjpeg
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
#### On CentOS
|
#### On CentOS
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
|
|
|
@ -112,7 +112,7 @@ def CommandProvider(cls):
|
||||||
|
|
||||||
isfunc = inspect.ismethod if sys.version_info < (3, 0) else inspect.isfunction
|
isfunc = inspect.ismethod if sys.version_info < (3, 0) else inspect.isfunction
|
||||||
if isfunc(cls.__init__):
|
if isfunc(cls.__init__):
|
||||||
spec = inspect.getargspec(cls.__init__)
|
spec = inspect.getfullargspec(cls.__init__)
|
||||||
|
|
||||||
if len(spec.args) > 2:
|
if len(spec.args) > 2:
|
||||||
msg = 'Mach @CommandProvider class %s implemented incorrectly. ' + \
|
msg = 'Mach @CommandProvider class %s implemented incorrectly. ' + \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue