In https://github.com/servo/servo/pull/26395/files#diff-3fe97584f564214ec8e7ebbf91747e03L253-R318,
we moved from `recursive checking` of dependency status to check only the
_current module_'s dependency status and its descendant dependency status and
also circular dependency status.
However, it will cause an issue.
For example, if the module dependency is like following
```
a -> b -> c -> d -> e
f -> g -> h -> c -> d -> e
```
In this example, if the d module is still under fetching but g is trying
to advance to finish. Then, it will cause a panic because module d is
g's grand-grand-grand-descendant which means it's still under fetching
and we can't instantiate module g.
Ideally, we should get rid of the checking in #26903 so, before #26903
fixed, we can just move back to the recursive checking way which will
ensure all descendants are not fetching.
Upgrade flake8/pyflakes for Py3 compatibility
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./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. -->
Do not raise StopIteration: PEP 479
<!-- Please describe your changes on the following line: -->
This fixes `test-tidy` Py3 compatibility, as [PEP 479](https://www.python.org/dev/peps/pep-0479/) says `return` must be used to stop iteration inside generator instead of `raise StopIteration`.
This introduces subtle behavior change where `FileList()` constructor now won't implicitly stop the caller generator when the list is empty. `wpt_lint.py` is modified to explicitly stop when empty, to match the change.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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. -->
Initialize colorama only once
<!-- Please describe your changes on the following line: -->
Repeated initialization wraps colorama inside colorama, making the loop O(n^2) and causes stack overflow when running `mach test-tidy --all`.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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. -->
Fix Py3 environment setting failures
<!-- Please describe your changes on the following line: -->
`python3 mach build -d` now proceeds to actual build. Since Gecko landed full Python 3 support, updating mozjs should allow us to drop Python 2 to build Servo. (I still see failures on other commands e.g. `test-tidy`.)
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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. -->
Fix Py3 failures when installing MSVC dependencies
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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. -->
Don't run multiprocessing hack on Python 3
<!-- Please describe your changes on the following line: -->
This ports https://phabricator.services.mozilla.com/D42016.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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. -->
build(deps): bump rayon-core from 1.7.0 to 1.7.1
Bumps [rayon-core](https://github.com/rayon-rs/rayon) from 1.7.0 to 1.7.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/rayon-rs/rayon/blob/master/RELEASES.md">rayon-core's changelog</a>.</em></p>
<blockquote>
<h1>Release rayon 1.3.1 / rayon-core 1.7.1 (2020-06-15)</h1>
<ul>
<li>Fixed a use-after-free race in calls blocked between two rayon thread pools.</li>
<li>Collecting to an indexed <code>Vec</code> now drops any partial writes while unwinding,
rather than just leaking them. If dropping also panics, Rust will abort.
<ul>
<li>Note: the old leaking behavior is considered <em>safe</em>, just not ideal.</li>
</ul>
</li>
<li>The new <code>IndexedParallelIterator::step_by()</code> adapts an iterator to step
through items by the given count, like <code>Iterator::step_by()</code>.</li>
<li>The new <code>ParallelSlice::par_chunks_exact()</code> and mutable equivalent
<code>ParallelSliceMut::par_chunks_exact_mut()</code> ensure that the chunks always have
the exact length requested, leaving any remainder separate, like the slice
methods <code>chunks_exact()</code> and <code>chunks_exact_mut()</code>.</li>
</ul>
<h2>Contributors</h2>
<p>Thanks to all of the contributors for this release!</p>
<ul>
<li><a href="https://github.com/adrian5">@adrian5</a></li>
<li><a href="https://github.com/bluss">@bluss</a></li>
<li><a href="https://github.com/cuviper">@cuviper</a></li>
<li><a href="https://github.com/FlyingCanoe">@FlyingCanoe</a></li>
<li><a href="https://github.com/GuillaumeGomez">@GuillaumeGomez</a></li>
<li><a href="https://github.com/matthiasbeyer">@matthiasbeyer</a></li>
<li><a href="https://github.com/picoHz">@picoHz</a></li>
<li><a href="https://github.com/zesterer">@zesterer</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a798276590"><code>a798276</code></a> Merge <a href="https://github-redirect.dependabot.com/rayon-rs/rayon/issues/769">#769</a></li>
<li><a href="4bce3c8f27"><code>4bce3c8</code></a> Update ci/compat-Cargo.lock</li>
<li><a href="c5b6e1cd28"><code>c5b6e1c</code></a> Release rayon 1.3.1 and rayon-core 1.7.1</li>
<li><a href="983866d421"><code>983866d</code></a> Merge <a href="https://github-redirect.dependabot.com/rayon-rs/rayon/issues/740">#740</a></li>
<li><a href="eac386f1e3"><code>eac386f</code></a> Merge <a href="https://github-redirect.dependabot.com/rayon-rs/rayon/issues/766">#766</a></li>
<li><a href="8f58a12b51"><code>8f58a12</code></a> Fix wrong examples of find_map variants</li>
<li><a href="b5e81efdda"><code>b5e81ef</code></a> Merge <a href="https://github-redirect.dependabot.com/rayon-rs/rayon/issues/759">#759</a></li>
<li><a href="94baa8232c"><code>94baa82</code></a> Add collect unwinding test for zero-sized elements</li>
<li><a href="b5869e4553"><code>b5869e4</code></a> Remove redundant Send impl for CollectFolder</li>
<li><a href="7a0c42e649"><code>7a0c42e</code></a> Move collect test to its own file</li>
<li>Additional commits viewable in <a href="https://github.com/rayon-rs/rayon/compare/rayon-core-v1.7.0...rayon-core-v1.7.1">compare view</a></li>
</ul>
</details>
<br />
[](https://dependabot.com/compatibility-score/?dependency-name=rayon-core&package-manager=cargo&previous-version=1.7.0&new-version=1.7.1)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
</details>
Make url for "client" referrer mandatory
<!-- Please describe your changes on the following line: -->
I added a url attribute to `Referrer::Client` so that the referrer header can be set accordingly when fetching.
`Referrer::Client` has to be kept separate from `Referrer::ReferrerUrl` as they differ in this method
6b0d9afd6f/components/script/dom/request.rs (L566-L576)
---
<!-- 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#26570 (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. -->