GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Complete PEP 798 operands and Python 3.15 diagnostics by youknowdot · Pull Request #7 · RustPython/ruff

Conversation

@youknowdot

@youknowdot youknowdot commented Oct 19, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Summary

Complete PEP 798 unpacking operands and selected Python 3.15 parser diagnostics on the RustPython 0.17.1 parser branch.

The original operand changes accept full expressions in dictionary comprehensions and starred generator expressions, preserving deferred-error ordering and valid recovered AST ranges. The appended diagnostics cover:

  • Parameter terminology and repeated-star wording.
  • Standalone case clauses, assertion assignment/walrus syntax, mapping-rest ordering, and misplaced lazy imports.
  • Unclosed multiline f-string/t-string replacement fields, identifying the opening brace's line.
  • Missing-comma hints after multiline literal concatenation, displayed on the final literal line without changing original-expression error precedence.

Diagnostic speculation restores parser recovery state. Existing raise/from and trailing-with diagnostics retain their messages and ranges while gaining structured variants for standalone-case inner-error selection. No new Cargo feature or diagnostic version gate is introduced.

The oracle is CPython 3.15.0 at d220409a13b77de7a6c30abe16ea90db01528edc, including its grammar, replacement-field tests, and syntax tests. This builds on rustpython-0.17.1; older-version work in #6 remains separate. RustPython consumers still need the resulting revision and separate compiler/VM integration; this is not a crates.io release.

Validation of the appended diagnostics

Baseline: existing PR head e72c1058999264cad17a01119a6fa57b3946a493.

  • Unchanged baseline: 617 parser fixture tests passed.
  • Candidate: 643 parser fixture tests passed with snapshot updates disabled after reviewing the generated snapshots.
  • All 22 snapshots changed by the original PEP 798 work remain byte-identical. All 14 changed existing diagnostic snapshots retain their AST sections.
  • Four selected canonical CPython methods passed, covering 48 multiline replacement-field cases, multiline concatenation, and valid case()/match() calls. Their 51 compile calls were recorded without executing payloads and included in the finite native-parser comparison.
  • Across 90 finite sources, the candidate's first diagnostic message matches CPython in 85 cases, versus 19 on the baseline. All 90 recovered AST and token streams are identical between baseline and candidate.
  • Parser-only strict all-target Clippy passed with --no-deps. Dependency-wide strict Clippy failed on the same nine unexpected_cfgs errors for cache/salsa in both the exact baseline and candidate; the AST dependency is unchanged.
  • The exact existing parser::tests::cells_module_range_spans_source unit passed: one executed, 253 filtered. No other parser unit or workspace runtime suite was rerun.
  • Normal configured changed-file hooks passed without modifying the validated source; logical commits also use the installed hooks.

Five comparison cases retain pre-existing classification/priority differences: unclosed assertion RHS; an assertion RHS with an invalid f-string escape; a slash-only parameter list without a comma; an unclosed misplaced-lazy import list; and a misplaced-lazy alias containing an invalid f-string escape. Four complete error lists are unchanged. The slash-only list retains the pre-existing overbroad error classification with updated parameter wording. This change does not claim complete diagnostic parity.

Earlier PEP 798 validation

Before the appended diagnostics, the existing head passed 254 unit tests, 617 fixture tests, one integration test, and ten doctests; parser-only strict Clippy; and normal commit hooks. Its separate RustPython integration passed canonical test_unpack_ex, 41 compile/error-order observations, eight bytecode/position observations, 482 related tests with 18 existing skips, and 31 selected async-generator tests. Those are historical results for the original operand change, not newly rerun proof for this append. The RustPython integration includes compiler changes outside this parser PR.

Assistance

Prepared and tested with OpenAI Codex at the maintainer's explicit request for the RustPython-managed fork. No claim of manual maintainer review is implied.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@youknowdot
Support full PEP 798 unpacking operands and diagnostics
e72c105
Parse full expression operands in dictionary and starred generator comprehensions. Preserve conditional-unpacking fallback ordering and recover malformed dictionary unpacking without invalid AST ranges. Add parser fixtures and regenerated snapshots.

Assisted-by: OpenAI Codex:model version unavailable
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youknowdot added 4 commits October 22, 2026 02:41
@youknowdot
Use Python 3.15 parameter diagnostic wording
47a8b0d
Update parameter terminology and repeated-star wording without changing
parameter parsing or recovered syntax. Regenerate affected snapshots.

Assisted-by: OpenAI Codex:model-version-unavailable
@youknowdot
Add focused Python 3.15 statement diagnostics
0371327
Diagnose standalone case clauses, assertion assignments, mapping rest
ordering and misplaced lazy imports. Preserve ordinary recovered ASTs
and restore speculative recovery state, including lexical-error paths.

Assisted-by: OpenAI Codex:model-version-unavailable
@youknowdot
Locate concatenation comma hints on the final literal line
dbeb3f7
Project multiline literal-concatenation diagnostics onto the final
literal line while retaining original expression ranges for lexical
error precedence.

Assisted-by: OpenAI Codex:model-version-unavailable
@youknowdot
Identify unclosed multiline replacement fields
90bd525
Report the opening brace line for multiline f-string and t-string
replacement fields. Track lexical hint boundaries without changing
recovered syntax or existing PEP 798 deferred-error state.

Assisted-by: OpenAI Codex:model-version-unavailable
@youknowdot youknowdot changed the title Complete PEP 798 unpacking operands and diagnostics Complete PEP 798 operands and Python 3.15 diagnostics Oct 21, 2026
This was referenced Oct 24, 2026
Implement PEP 798 comprehension unpacking RustPython/RustPython#9342
Merged
Update the RustPython Ruff fork to 0.17.2 #8
Draft

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@youknowdot
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.