-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rollup of 5 pull requests #62448
Closed
Closed
Rollup of 5 pull requests #62448
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-Authored-By: varkor <[email protected]>
The auxiliary file arc_wake.rs is in run-pass/auxiliary and also ui/async-await/auxiliary. Remove the former one as their contents are same. Move run-pass/futures-api.rs to ui/async-await/futures-api.rs as it needs to use arc_wake.rs.
…varkor Refactor unicode.py script Hi, I noticed that the `unicode.py` script used some deprecated escapes in regular expressions. E.g. `\d`, `\w`, `\.` will be illegal in the future without "raw strings". This is now fixed. I have also cleaned up the script quite a bit. ## Escape deprecation OK (note the `r`): `re.compile(r"\d")` Deprecated (from Python 3.6 onwards, see [here][link1] and [here][link2]): `re.compile("\d")`. [link1]: https://docs.python.org/3.6/whatsnew/3.6.html#deprecated-python-behavior [link2]: https://bugs.python.org/issue27364 This was evident running the script using Python 3.7 like so: ``` $ python3 -Wall unicode.py unicode.py:227: DeprecationWarning: invalid escape sequence \w re1 = re.compile("^ *([0-9A-F]+) *; *(\w+)") unicode.py:228: DeprecationWarning: invalid escape sequence \. re2 = re.compile("^ *([0-9A-F]+)\.\.([0-9A-F]+) *; *(\w+)") unicode.py:453: DeprecationWarning: invalid escape sequence \d pattern = "for Version (\d+)\.(\d+)\.(\d+) of the Unicode" ``` The documentation states that > A backslash-character pair that is not a valid escape sequence now generates a DeprecationWarning. Although this will eventually become a SyntaxError, that will not be for several Python releases. ## Testing To test my changes, I had to add support for choosing the Unicode version to use. The script will default to latest release (which is 12.0.0 at the moment, repo has 11.0.0 checked in). The script generates the exact same output for version 11.0.0 with Python 2.7 and 3.7 and no longer generates any deprecation warnings: ``` $ python3 -Wall unicode.py -v 11.0.0 Using Unicode version: 11.0.0 Regenerated tables.rs. $ git diff tables.rs $ python2 -Wall unicode.py -v 11.0.0 Using Unicode version: 11.0.0 Regenerated tables.rs. $ git diff tables.rs $ python2 --version Python 2.7.16 $ python3 --version Python 3.7.3 ``` ## Extra functionality Furthermore, the script will check and download the latest Unicode version by default (without the `-v` argument). The `--help` is below: ``` $ ./unicode.py --help usage: unicode.py [-h] [-v VERSION] Regenerate Unicode tables (tables.rs). optional arguments: -h, --help show this help message and exit -v VERSION, --version VERSION Unicode version to use (if not specified, defaults to latest available final release). ``` ## Cleanups I have cleaned up the code quite a bit, with Python best practices and code style in mind. I'm happy to provide more details and rationale for all my changes if the reviewers so desire. One externally visible change is that the Unicode data will now be downloaded into `src/libcore/unicode/downloaded` directory suffixed by Unicode version: ``` $ pwd .../rust/src/libcore/unicode $ exa -T downloaded/ downloaded ├── 11.0.0 │ ├── DerivedCoreProperties.txt │ ├── DerivedNormalizationProps.txt │ ├── PropList.txt │ ├── ReadMe.txt │ ├── Scripts.txt │ ├── SpecialCasing.txt │ └── UnicodeData.txt └── 12.0.0 ├── DerivedCoreProperties.txt ├── DerivedNormalizationProps.txt ├── PropList.txt ├── ReadMe.txt ├── Scripts.txt ├── SpecialCasing.txt └── UnicodeData.txt ```
Move async-await tests from run-pass to ui fix rust-lang#62236 r? @Centril
…xcrichton Remove some uses of mem::uninitialized cc rust-lang#62397 r? @RalfJung
Update rustfmt to 1.3.2 This PR is a successor of rust-lang#62244. r? @Centril
…_compiler_messages_1, r=Centril normalize use of backticks/lowercase in compiler messages for librustc_mir normalize use of backticks/lowercase in compiler messages for librustc_mir rust-lang#60532 r? @alexreg
@bors r+ p=5 rollup=never |
📌 Commit c5528c5 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Jul 6, 2019
⌛ Testing commit c5528c5 with merge 12be5cb5e11e0162c170a3fa0e32e7c8075c916c... |
💔 Test failed - checks-azure |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Jul 6, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
Failed merges:
r? @ghost