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 — Use the Ruff fork 0.17.1 for CPython syntax error messages and the obsolete '<>' hint by youknowone · Pull Request #9212 · RustPython/RustPython

Conversation

@youknowone

@youknowone youknowone commented Oct 19, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Summary

  • The ruff crates come from the RustPython/ruff rustpython-0.17.1 branch by git rev, not from crates.io. That branch is ruff 0.17.1 with the RustPython fork patches on top. The crates are not published yet.
  • Fork changes used here:
    • A forced : after def/try/finally/else reports "expected ':'".
    • raise from / raise x from report the did you forget an expression ... messages.
    • Empty del/global/nonlocal, async + other token, decorator without definition, missing module or as name, and with without items report "invalid syntax".
    • The import and with trailing comma messages are added.
    • An adjacent < > in a comparison reports "invalid syntax. Maybe you meant '!=' instead of '<>'?" (invalid_noteq).
  • The compiler places an error on the token made up at the end of the input according to the error kind (EofErrorLocation). The keyword scan that guessed forced tokens is removed.
  • Outside Barry mode, BarrySource no longer searches the source text for <>. The parser's error is used unchanged, so 2 <<> 3 is no longer matched. This covers the parser-owned approach discussed in Match obsolete comparison diagnostics #9074.

Testing

  • cargo clippy --workspace --all-targets (with the usual excludes): no new warnings.
  • cargo test --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher --exclude rustpython-capi
  • (cd crates/capi && cargo test)
  • rustpython -m test --dont-add-python-opts: 37 modules passed, including test_syntax, test_codeop, test_repl, test_grammar, test_exceptions, test_compile, test_ast, test_tokenize, test_eof and test_flufl.

AI assistance

Written with Claude Code (claude-opus-5-5).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved the locations shown for syntax errors at the end of a file, including errors involving missing tokens, empty imports, and invalid syntax.
    • Empty-import diagnostics now retain the parser’s reported range.
    • Improved guidance for the obsolete <> operator, with clearer error spans and a “Maybe you meant” hint for comparisons.
    • Legacy <> handling is now limited to Barry mode.

Sorry, something went wrong.

Uh oh!

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

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
youknowone added 2 commits October 19, 2026 20:27
@youknowone
Use the RustPython Ruff fork 0.17.1 from git and place EOF errors by …
914ffad
…kind

- The ruff crates come from the RustPython/ruff `rustpython-0.17.1`
  branch at 93967836c8 instead of the 0.16.10 crates.io release.
- `EofToken.known_location` is replaced by `EofErrorLocation`
  (Tokenizer, Token, StartingFromToken), chosen from the parse error kind.
  The keyword scan in `clause_keyword` is removed, since the parser now
  reports a forced `:` as `ExpectedForcedToken`.
- An empty import at EOF ends at the end of the line read, and an empty
  import before a newline is an empty range at the newline.

Assisted-by: Claude Code:claude-opus-5-5
@youknowone
Report the obsolete <> from the parser outside Barry mode
24e2b77
- Bump the RustPython/ruff fork to 9290a88495, where the parser reports an
  adjacent `<` and `>` in a comparison as "invalid syntax.  Maybe you meant
  '!=' instead of '<>'?" over both tokens.
- Outside Barry mode, `BarrySource` no longer searches the source text for
  `<>`, so the parser's error is reported unchanged. A `<>` that starts a
  statement is reported at the `<` only, and `<<>` at the `>`.

Assisted-by: Claude Code:claude-opus-5-5
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T11:59:24.970231Z 24e2b77 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

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

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: RustPython/RustPython/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4f3f63b3-ff5a-4b8e-a12b-7fd9845145fd
📥 Commits

Reviewing files that changed from the base of the PR and between 5235a89 and 24e2b77.

⛔ Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 2
  • Cargo.toml
  • crates/compiler/src/lib.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

The compiler changes EOF error location classification and parse-diagnostic spans. It also changes how legacy <> operators are recorded and diagnosed. Four Ruff dependencies now use a pinned RustPython fork revision.

Changes: Parser diagnostics

Layer / File(s) Summary
EOF diagnostic locations
Cargo.toml, crates/compiler/src/lib.rs
The compiler classifies EOF errors as tokenizer-positioned, token-positioned, or spanning from the token to the tokenizer stop. EmptyImportNames retains the parser’s original locations. Four Ruff dependencies now resolve from a pinned RustPython fork revision.
Legacy not-equal operator handling
crates/compiler/src/lib.rs
The compiler records legacy <> operators only in Barry mode. Updated tests cover the comparison hint and spans for bare <> and 2 <<> 3.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: youknowdot

Merge Risk: ⚪ Minimal · up to 24e2b

No actionable issue remains identified in the dependency or parser-diagnostic changes; the PR is mergeable after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately summarizes the main changes: adopting the RustPython Ruff fork for CPython syntax error messages and updating the obsolete "<>" hint behavior.
Docstring Coverage Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 1 files. (1 skipped: 1 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 1 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • 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.

@youknowone
youknowone merged commit cdb5cca into RustPython:main Oct 20, 2026
30 checks passed

Uh oh!

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

@youknowone
youknowone deleted the ruff-0.17.1-syntax-errors branch October 20, 2026 11:09
youknowdot added a commit to youknowdot/RustPython that referenced this pull request Nov 4, 2026
@youknowdot
Merge main and defer obsolete comparison diagnostics to the parser
16773b8
Preserve the parser-owned implementation introduced by RustPython#9212 instead of restoring the old BarrySource override. Retain the existing Python-visible diagnostic regressions.

Assisted-by: OpenAI Codex:model identifier unavailable
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

@youknowone
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 01402520 — 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.