Skip to content

Bytecode parity#7885

Merged
youknowone merged 5 commits into
RustPython:mainfrom
youknowone:bytecode-parity
May 19, 2026
Merged

Bytecode parity#7885
youknowone merged 5 commits into
RustPython:mainfrom
youknowone:bytecode-parity

Conversation

@youknowone

@youknowone youknowone commented May 16, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Updated spelling validation to recognize additional technical terms (csock, TESTFN, TZPATH) so tooling reports fewer false-positive spelling warnings during review and editing.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 1246526d-e6ff-4d89-b8cb-21596a641710

📥 Commits

Reviewing files that changed from the base of the PR and between 8e2f90d and a1a6c30.

⛔ Files ignored due to path filters (2)
  • Lib/test/test_patma.py is excluded by !Lib/**
  • crates/stdlib/src/snapshots/rustpython_stdlib___opcode__tests__nested_double_async_with.snap is excluded by !**/*.snap
📒 Files selected for processing (3)
  • .cspell.json
  • crates/codegen/src/compile.rs
  • crates/codegen/src/ir.rs
✅ Files skipped from review due to trivial changes (1)
  • .cspell.json

📝 Walkthrough

Walkthrough

The PR updates .cspell.json, adding three entries to the global words allowlist: csock, TESTFN, and TZPATH to avoid spell-check failures.

Changes

Spell Check Configuration

Layer / File(s) Summary
Add spell check exceptions
.cspell.json
The words allowlist is expanded with csock, TESTFN, and TZPATH to prevent spell checker validation errors for these project-specific terms.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

A rabbit hops through words so rare,
Adding csock, TESTFN with care,
TZPATH joins the approved list,
CI sings, no typos to be missed! 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Bytecode parity' does not relate to the actual change, which is updating .cspell.json to add spelling allowlist entries (csock, TESTFN, TZPATH). Update the title to accurately reflect the changeset, such as 'Add spelling allowlist entries for csock, TESTFN, TZPATH' or 'Update cspell configuration'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@youknowone youknowone force-pushed the bytecode-parity branch 2 times, most recently from f2c08fe to 60fb81f Compare May 19, 2026 02:20
@github-actions

github-actions Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

The following Lib/ modules were modified. Here are their dependencies:

[ ] test: cpython/Lib/test/test_patma.py (TODO: 14)

dependencies:

dependent tests: (no tests depend on patma)

Legend:

  • [+] path exists in CPython
  • [x] up-to-date, [ ] outdated

@youknowone youknowone marked this pull request as ready for review May 19, 2026 05:47
The pass dropped a same-line NOP at the start of any jump-targeted block
whose body advanced to a later line, but CPython's basicblock_remove_redundant_nops
only consults the previous/next instruction inside the same block. The
extra pass deleted the else-body line trace anchor exercised by
test_nested_double_async_with.

Ignore test_conditional_break_finally_does_not_keep_break_cleanup_nop;
the break NOP lands in a separate block from the inlined finally body,
so same-line successor elision does not apply here.
After convert_pseudo_ops lowers SETUP_FINALLY to a plain NOP, the only
remaining link from the try body to the except_handler block was the
per-instruction except_handler annotation. When earlier passes had
already removed every NOP that carried that annotation (e.g. an empty
try body with `pass`), the handler block became unreachable from the
entry block and its instructions were cleared, dropping the handler
entirely. Seed reachability with blocks already marked except_handler
so handler dispatch survives independent of the in-block annotation.

Also drop two expectedFailure markers in test_patma whose match-tracing
expectations now pass.
@youknowone youknowone merged commit d8dee81 into RustPython:main May 19, 2026
27 checks passed
@youknowone youknowone deleted the bytecode-parity branch May 19, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant