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
More changes for Python3 compatibility #24512
Conversation
This is done in order to be compatible with Python3
Heads up! This PR modifies the following files:
|
…orm module platform.linux_distribution() is deprecated since Python 3.5 and will be removed with Python 3.8.
0e1352c
to
c6e4d7a
Compare
@jdm i don't know how to add you as reviewer so i thought i would just ping you 👍 |
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.
Very nice
r? @jdm
This is how 😁 |
r? @SimonSapin |
Yeah i did not imply to remove @SimonSapin from reviewers, just wanted to add you |
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’d like to also get some testing so we don’t accidentally regress this. If ./mach build
is supposed to work on Python 3 now, please change it to python3 mach build
here, for example:
servo/etc/taskcluster/decision_task.py
Line 180 in 5fb941d
./mach build --dev |
It passes on a branch based on this one with a few more tweaks. We can either merge this one, and i'll come back in a few days with the everything sorted out to build with python3 or i add the remaining bits in this one. Also about just changing |
I’ll leave it up to you whether you prefer to add a commit in this PR for those few more tweaks (maybe they’re already ready) or if you prefer not to block landing this PR and make a new one later. I don’t expect that a Python 3 command followed by a Python 2 command would cause any trouble, they’re independent processes. Finding out for sure is what CI is for! |
Then i would prefer merging this now and come back later with the remaining bits. My other branch actually only check that you have python3, not python2 anymore (even though the code remains compatible) and will take some time to make python version detection compatible as its not ready yet.
We might have to remove |
Oh yeah, there’s virtualenv. It may be worth having it at a different location based on the Python version. |
This also pin the six module version to 1.12 in order to be sure six.ensure_text is available.
This is done in order to be compatible with Python3
c6e4d7a
to
7fdd0b9
Compare
Looks good, thanks! @bors-servo r+ |
📌 Commit 7fdd0b9 has been approved by |
More changes for Python3 compatibility Following #24435 for #23607 here are even more changes to be compatible with Python3. I managed to get `./mach build` properly work with Python3 but `test-tidy` does not work yet because of a lot of problems in `web-platform-tests` which i will have to deal with at some point. Because flake8 appears to be incompatible with the distro package in some way, i had to change to way we call flake8 (which was deprecated anyway). With this change, we should be able to update flake8 to a recent version but subprocess can be surprising on Windows platform so i'd like someone to try out those changes. --- <!-- 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 <!-- 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. -->
💔 Test failed - status-taskcluster |
@bors-servo retry
|
I don't think the |
@marmeladema: 🔑 Insufficient privileges: not in try users |
It does work; there is a queue at https://build.servo.org/homu/queue/servo. |
More changes for Python3 compatibility Following #24435 for #23607 here are even more changes to be compatible with Python3. I managed to get `./mach build` properly work with Python3 but `test-tidy` does not work yet because of a lot of problems in `web-platform-tests` which i will have to deal with at some point. Because flake8 appears to be incompatible with the distro package in some way, i had to change to way we call flake8 (which was deprecated anyway). With this change, we should be able to update flake8 to a recent version but subprocess can be surprising on Windows platform so i'd like someone to try out those changes. --- <!-- 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 <!-- 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. -->
☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster |
HSTS & CA updates; Fix Debian bootstrap; Default to https on Android, too. - Updated HSTS Preload list using ./mach update-hsts-preload - Updated CA [database](https://ccadb-public.secure.force.com/mozilla/IncludedCACertificateReportPEMCSV) using etc/cert_generator.sh. - No additions. - [bug 1552374](https://bugzilla.mozilla.org/show_bug.cgi?id=1552374) removed Certinomis - Root CA - [bug 1574670](https://bugzilla.mozilla.org/show_bug.cgi?id=1574670) removed Class 2 Primary CA and Deutsche Telekom Root CA 2 - [bug 1586081](https://bugzilla.mozilla.org/show_bug.cgi?id=1586081) removed GlobalSign Extended Validation CA - SHA256 - G2 - Updated Public Suffix list using ./mach update-pub-domains - Default to https on Android, too. Desktop was done in #23363. Keep http:// after `android.webkit.URLUtil.guessUrl()` url sanitization only if the user explicitly typed it into the address bar. Small warning: I don't have an Android build environment yet, but still wanted to try to contribute these two lines. - Fixed `./mach bootstrap` for Debian Testing. Regression from #24512. After `pip install distro` (#24561) I finally got `Exception: mach bootstrap does not support Debian GNU/Linux, please file a bug`. distrib and version were "debian" and "bullseye/sid" before, now they are "debian gnu/linux" and "testing". - Use HSTS preload list for private HttpState, too. Private HttpState currently [creates an empty HSTS list](https://github.com/servo/servo/blob/f7fb130a2a21ae19cf0996251134ad23fea9068d/components/net/http_loader.rs#L93-L95). In contrast, regular HttpState first creates HstsList from Preload list and then adds further HSTS entries previously saved on disk. --- <!-- 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. -->
Following #24435 for #23607 here are even more changes to be compatible with Python3.
I managed to get
./mach build
properly work with Python3 buttest-tidy
does not work yet because of a lot of problems inweb-platform-tests
which i will have to deal with at some point.Because flake8 appears to be incompatible with the distro package in some way, i had to change to way we call flake8 (which was deprecated anyway). With this change, we should be able to update flake8 to a recent version but subprocess can be surprising on Windows platform so i'd like someone to try out those changes.
./mach build -d
does not report any errors./mach test-tidy
does not report any errors