-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port some code to Python3 #27999
Port some code to Python3 #27999
Conversation
Heads up! This PR modifies the following files:
|
I updated and rebased the PR. My last issue needs a WPT fix (and is specific to Python 3.9) I can run bootstrap, build, test-wpt, fmt and test-tidy. |
This is an interesting failure. |
@bors-servo try |
Port some code to Python3 With this PR i wish to share modifications to run `mach` with `./mach` instead of `python3 ./mach`. I'm using a Debian machine. The following commands work for me: * `./mach build --dev` * `./mach test-tidy` * `./mach fmt` I still have errors with the WPT scripts, but maybe the root causes is a bad resolution of `requirements.txt` I used `2to3` to migrate some code before applying some manual fixes. For PLY, I copied/paste the code from the github repository. If someone can test... For now i'm not sure how to continue the migration while i can't run WPT :-/ --- <!-- 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 - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes look fine to me.
💔 Test failed - status-taskcluster |
We should update https://github.com/servo/servo/blob/master/etc/taskcluster/decision_task.py to always use python3. |
I proposed a PR to fix it |
I added |
etc/taskcluster/decisionlib.py
Outdated
python -m ensurepip | ||
pip install virtualenv==20.2.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these may need to be python3
and pip3
respectively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
.with_early_script(""" | ||
python -m ensurepip | ||
pip install virtualenv==20.2.1 | ||
""") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this also requires .with_path_from_homedir("python3", "python3\\Scripts")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
☔ The latest upstream changes (presumably #28094) made this pull request unmergeable. Please resolve the merge conflicts. |
How did you get ./mach build --dev without changes to mozjs? |
Presumably it was still using python2 for the mozjs build. |
Oh, that makes sense. I'm trying to build in Debian unstable with no python2 in sight. |
59fe92e
to
b964306
Compare
I rebased and squashed the commit. The WPT PR has been merged \o/ |
I'm working on incorporating these changes into #28092. |
I'm going to attempt to wrestle CI into shape in #28141. |
☔ The latest upstream changes (presumably #28147) made this pull request unmergeable. Please resolve the merge conflicts. |
With this PR i wish to share modifications to run
mach
with./mach
instead ofpython3 ./mach
.I'm using a Debian machine. The following commands work for me:
./mach build --dev
./mach test-tidy
./mach fmt
I still have errors with the WPT scripts, but maybe the root causes is a bad resolution of
requirements.txt
I used
2to3
to migrate some code before applying some manual fixes. For PLY, I copied/paste the code from the github repository.If someone can test...
For now i'm not sure how to continue the migration while i can't run WPT :-/
./mach build -d
does not report any errors./mach test-tidy
does not report any errors