Repository navigation
Align itertools constructor binding and conversions - #9632
Draft
youknowdot wants to merge 8 commits into
Draft
youknowdot wants to merge 8 commits into
youknowdot wants to merge 8 commits into
Conversation
Assisted-by: OpenAI Codex:model version not exposed
Assisted-by: OpenAI Codex:model version not exposed
Assisted-by: OpenAI Codex:model version not exposed
Assisted-by: OpenAI Codex:model version not exposed
Assisted-by: OpenAI Codex:model version not exposed
Assisted-by: OpenAI Codex:model version not exposed
Assisted-by: OpenAI Codex:model version not exposed
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. CodeRabbit Verify
|
Bind the two required and two optional raw positional arguments together. Preserve explicit None values and deferred index conversion while removing the per-arity parsing branches. Assisted-by: OpenAI Codex:model version not exposed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
__iter__in ten itertools constructors, and bindtee's optional count before invoking__index__. Preserve positional/keyword kinds and subclass keyword handling. This addresses unexpected-keyword side effects; Report a missing argument before converting any #9513 separately handles missing-argument precedence globally.batchedsigned-size conversion, strict truth testing, partial-batch and source-error behavior, and alignislicestart/stop/step conversion ordering and ValueErrors with CPython 3.15.0.Validation
prek run --files crates/vm/src/stdlib/itertools.rsand normal commit hooks passed.test_itertoolscovers standard constructor and iteration behavior, but direct coverage for some callback ordering, overflow and terminal-error cases was not found. No tests were edited and RustPython was not run locally; hosted CI is needed for build/runtime evidence.This does not claim complete constructor parity: existing arity-versus-keyword diagnostic precedence, some allocation and argument/source lifetime differences,
try_indexnormalization details, and concurrent iteration remain outside scope. Deferred iterator conversion retains the original argument for the constructor call and adds bounded reference-management work; no benchmark was run.zip_longestvariadic iterator binding remains unchanged because deferring it would require a separately assessed temporary allocation.