GeezerVison is showing github.com — Prohibit AI PR submit by youknowone · Pull Request #6813 · RustPython/RustPython
Conversation
youknowone
commented
Jan 20, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
This PR is made by CI by accident. Try not to allow it.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Jan 20, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
📝 Walkthrough
Walkthrough
This PR introduces three new bytecode instructions (DictMerge, ListExtend, SetUpdate) with corresponding VM frame handlers and compiler codegen support. Additionally, it adds stdlib directory path tracking throughout the VM's runtime configuration and sys module, refactors collection construction in the code generator to optimize starred/unstarred elements via threshold-based branching, and improves Windows path resolution robustness.
Changes
| Cohort / File(s) |
Summary |
Configuration & Metadata .cspell.dict/cpython.txt, .gitattributes, crates/vm/src/vm/setting.rs |
Added three spell-check dictionary entries (kwnames, nkwelts, subkwargs), configured test resource attributes in git for importlib and email test data with binary/CRLF settings, and added new stdlib_dir: Option<String> field to Paths struct. |
Compiler Codegen crates/codegen/src/compile.rs |
Reworked collection construction with threshold-based branching to choose between fast single-build path (no stars, small collections) and streaming path (stars or large sizes). Introduced new codegen_subkwargs helper for efficient keyword argument emission, and updated call/class building to support the new strategies with improved MapAdd handling. |
Bytecode Instruction Definitions crates/compiler-core/src/bytecode/instruction.rs |
Updated stack effects for three instructions: DictMerge, ListExtend, and SetUpdate now have stack effect -1 (previously 0), reflecting the operations' consumption of values during execution. |
VM Frame Execution crates/vm/src/frame.rs |
Added three new instruction handlers (DictMerge, ListExtend, SetUpdate) with validation and type checking; DictMerge enforces string keys and detects duplicates, while ListExtend and SetUpdate safely downcast and extend/update collections. Extended BuildList with intermediate size variable and renamed indexing variables (i → idx) in LoadDeref and LoadFromDictOrDeref. |
Path Configuration & Initialization crates/vm/src/getpath.rs, crates/vm/src/stdlib/sys.rs, src/interpreter.rs |
Added new calculate_stdlib_dir function to compute platform-specific stdlib paths, exposed _stdlib_dir attribute in sys module, and refactored interpreter setup to move stdlib_dir configuration from sys module hacks to centralized state-based initialization for both frozen and dynamic stdlib scenarios. |
Windows Build Path Handling crates/pylib/build.rs |
Rewrote Windows Lib path resolution to handle two cases: text files containing relative paths and symlinks/directories, with proper canonicalization and extended-length prefix stripping for robustness in Git-enabled environments. |
Sequence Diagram(s)
sequenceDiagram
participant Compiler as Compiler<br/>(codegen)
participant Codegen as Codegen Helper<br/>(codegen_subkwargs)
participant Bytecode as Bytecode<br/>(DictMerge instr)
participant VM as VM Frame<br/>(Execution)
participant Dict as Target Dict
Compiler->>Codegen: compile dict merge<br/>with **kwargs
Codegen->>Codegen: choose fast or<br/>streaming path
alt Streaming Path (stars present)
Codegen->>Codegen: emit MapAdd ops
else Fast Path (no stars)
Codegen->>Codegen: build single map
end
Codegen->>Bytecode: emit DictMerge<br/>{index}
Bytecode->>Bytecode: stack effect: -1
VM->>VM: execute DictMerge
VM->>VM: validate source<br/>is mapping
VM->>Dict: iterate keys & merge<br/>with validation
VM-->>VM: return Ok(None)<br/>on success
Loading
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~50 minutes
Possibly related PRs
Suggested reviewers
Poem
🐰 A hop through bytecode, paths aligned!
DictMerge, ListExtend, SetUpdate designed,
Stdlib paths now tracked with care,
Fast paths chosen, streaming paths fair,
Windows paths robust, no more despair! 🌟
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
| Check name |
Status |
Explanation |
Resolution |
| Title check |
⚠️ Warning |
The PR title 'Prohibit AI PR submit' is unrelated to the changeset, which contains CI fixes, opcode changes, stdlib_dir configuration, and keyword argument handling optimizations. |
Update the title to reflect the actual changes, such as 'Fix CI test failures from PR 6798' or 'Add stdlib_dir support and fix CI test failures'. |
✅ Passed checks (2 passed)
| Check name |
Status |
Explanation |
| Docstring Coverage |
✅ Passed |
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. |
| Description Check |
✅ Passed |
Check skipped - CodeRabbit’s high-level summary is enabled. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
youknowone
pushed a commit
that referenced
this pull request
Aug 1, 2026
The "Repository Structure" section listed pre-`crates/` paths (`vm/`,
`compiler/`, `derive/`, etc.) that no longer exist; `CONTRIBUTING.md`
already documents the current layout under "Code organization". Replace
the stale list with a link to that section.
Also generalized the title and intro from "GitHub Copilot Instructions"
to "AI Agent Instructions" — the file was already renamed from
`.github/copilot-instructions.md` to `AGENTS.md` in #6813 to follow the
cross-vendor AGENTS.md standard (https://agents.md/), but the title text
was never updated to match.
Assisted-by: Claude Code:claude-sonnet-5
youknowone
pushed a commit
that referenced
this pull request
Sep 16, 2026
The "Repository Structure" section listed pre-`crates/` paths (`vm/`,
`compiler/`, `derive/`, etc.) that no longer exist; `CONTRIBUTING.md`
already documents the current layout under "Code organization". Replace
the stale list with a link to that section.
Also generalized the title and intro from "GitHub Copilot Instructions"
to "AI Agent Instructions" — the file was already renamed from
`.github/copilot-instructions.md` to `AGENTS.md` in #6813 to follow the
cross-vendor AGENTS.md standard (https://agents.md/), but the title text
was never updated to match.
Assisted-by: Claude Code:claude-sonnet-5
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.
|