Skip to content
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

Upgrade RustPython #4900

Merged
merged 3 commits into from
Jun 8, 2023
Merged

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Jun 6, 2023

Summary

This pulls in astral-sh/RustPython-Parser#5 and astral-sh/RustPython-Parser#7. It changes RustPython to include the ( and ) in the arguments range and introduces a new Decorator node.

Test Plan

  • A few comments got reordered in the snapshot tests because they are ordered by the node's start position.
  • The range of some decorator messages now include the @. I think that's preferred. Let me know if you prefer the way it was before.

@MichaReiser
Copy link
Member Author

MichaReiser commented Jun 6, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

PR Check Results

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.02      5.5±0.02ms     7.4 MB/sec    1.00      5.4±0.02ms     7.5 MB/sec
formatter/numpy/ctypeslib.py               1.00   1079.0±3.02µs    15.4 MB/sec    1.00   1076.4±4.06µs    15.5 MB/sec
formatter/numpy/globals.py                 1.00    120.1±0.16µs    24.6 MB/sec    1.02    123.0±0.28µs    24.0 MB/sec
formatter/pydantic/types.py                1.01      2.4±0.01ms    10.6 MB/sec    1.00      2.4±0.01ms    10.7 MB/sec
linter/all-rules/large/dataset.py          1.00     14.0±0.09ms     2.9 MB/sec    1.01     14.2±0.09ms     2.9 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      3.4±0.03ms     5.0 MB/sec    1.00      3.4±0.04ms     5.0 MB/sec
linter/all-rules/numpy/globals.py          1.00    411.6±0.69µs     7.2 MB/sec    1.01    413.7±2.97µs     7.1 MB/sec
linter/all-rules/pydantic/types.py         1.00      5.9±0.04ms     4.4 MB/sec    1.00      5.8±0.04ms     4.4 MB/sec
linter/default-rules/large/dataset.py      1.00      6.7±0.02ms     6.1 MB/sec    1.01      6.7±0.04ms     6.0 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1430.4±4.19µs    11.6 MB/sec    1.01   1443.9±4.20µs    11.5 MB/sec
linter/default-rules/numpy/globals.py      1.00    156.9±0.24µs    18.8 MB/sec    1.01    159.0±1.13µs    18.6 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.0±0.01ms     8.5 MB/sec    1.01      3.0±0.01ms     8.4 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.00      8.9±0.74ms     4.6 MB/sec    1.00      8.9±0.33ms     4.6 MB/sec
formatter/numpy/ctypeslib.py               1.01  1773.9±90.93µs     9.4 MB/sec    1.00  1748.7±73.84µs     9.5 MB/sec
formatter/numpy/globals.py                 1.00    196.9±7.12µs    15.0 MB/sec    1.02   200.6±13.93µs    14.7 MB/sec
formatter/pydantic/types.py                1.03      4.0±0.17ms     6.3 MB/sec    1.00      3.9±0.13ms     6.5 MB/sec
linter/all-rules/large/dataset.py          1.00     22.8±0.80ms  1830.5 KB/sec    1.01     23.0±0.83ms  1813.5 KB/sec
linter/all-rules/numpy/ctypeslib.py        1.02      5.7±0.17ms     2.9 MB/sec    1.00      5.6±0.28ms     3.0 MB/sec
linter/all-rules/numpy/globals.py          1.02   657.0±24.44µs     4.5 MB/sec    1.00   642.4±32.08µs     4.6 MB/sec
linter/all-rules/pydantic/types.py         1.01      9.7±0.36ms     2.6 MB/sec    1.00      9.5±0.47ms     2.7 MB/sec
linter/default-rules/large/dataset.py      1.03     11.0±0.32ms     3.7 MB/sec    1.00     10.7±0.22ms     3.8 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.02      2.3±0.09ms     7.3 MB/sec    1.00      2.2±0.06ms     7.4 MB/sec
linter/default-rules/numpy/globals.py      1.03   277.3±30.47µs    10.6 MB/sec    1.00    269.8±9.70µs    10.9 MB/sec
linter/default-rules/pydantic/types.py     1.00      5.0±0.25ms     5.1 MB/sec    1.00      5.0±0.17ms     5.1 MB/sec

@MichaReiser MichaReiser changed the title Include parentheses in Arguments range Upgrade RustPython Jun 6, 2023
@MichaReiser MichaReiser requested a review from charliermarsh June 6, 2023 12:49
@MichaReiser MichaReiser force-pushed the include-parentheses-in-arguments-range branch from f3502c6 to e2fcfb5 Compare June 6, 2023 12:52
Base automatically changed from any-function-definition to main June 6, 2023 18:37
@MichaReiser MichaReiser added internal An internal refactor or improvement formatter Related to the formatter labels Jun 7, 2023
@MichaReiser MichaReiser force-pushed the include-parentheses-in-arguments-range branch 2 times, most recently from c217c0a to 829d1c6 Compare June 7, 2023 13:05
@@ -1,5 +1,6 @@
[workspace]
members = ["crates/*"]
resolver = "2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust nightly complains because some workspace members use edition 2021 but the workspace does not. This fixes this warning (yes, I'm now using nightly because I can't live without CLions test runner integration)

@MichaReiser MichaReiser force-pushed the include-parentheses-in-arguments-range branch from 4db87e0 to a52d4ea Compare June 8, 2023 05:45
@MichaReiser MichaReiser enabled auto-merge (squash) June 8, 2023 05:46
@MichaReiser MichaReiser merged commit 39a1f39 into main Jun 8, 2023
@MichaReiser MichaReiser deleted the include-parentheses-in-arguments-range branch June 8, 2023 05:53
konstin pushed a commit that referenced this pull request Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Related to the formatter internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants