⚡ Sangsakala Proxy 🏠 Home
Skip to content

Align OrderedDict update and serialization controls - #9682

Draft
youknowdot wants to merge 2 commits into
RustPython:mainfrom
youknowdot:ordered-dict-controls-group-20261104
Draft

youknowdot wants to merge 2 commits into
RustPython:mainfrom
youknowdot:ordered-dict-controls-group-20261104

Conversation

@youknowdot

Copy link
Copy Markdown
Contributor

Summary

  • Reuse shared update/init argument binding and exact-dictionary snapshots before destination callbacks.
  • Match keys/items/sequence fallback and bounded three-value pair unpacking without length-hint calls.
  • Preserve source, pair and iterator lifetimes with explicit cleanup order.
  • Obtain reduction state before items, retain custom empty state, and reuse normal iterator checks without advancing the original iterator.

Reference: CPython 3.15.0 OrderedDict update and serialization.

Validation

  • Independent source review and bounded CPython 3.15 probes cover mapping fallback, pair limits, callback mutation, finalizer lifetimes, reduction state and iterator mutation.
  • Formatting and whitespace checks passed.
  • Focused cargo check --locked --offline -j1 -p rustpython-host_env -p rustpython-vm -p rustpython-stdlib --features rustpython-stdlib/threading passed.
  • Strict Clippy with the same packages/features and -- -D warnings passed. This is a focused threading-enabled subset of CI, not the full workspace/all-targets suite.
  • RustPython runtime, full workspace/C-API suites and cross-platform execution were not run. No test, Lib, workflow or marker edits.

Unrelated pop/move/clear internals and iterator error-state behavior are outside this change.

AI assistance: OpenAI Codex performed source comparison, implementation, reference probes and independent source review; model version was not exposed.

Reuse shared argument binding, snapshot exact dictionary inputs, and
match mapping fallback and bounded pair unpacking. Preserve source and
pair lifetimes through callbacks, order state reduction before items,
and reuse iterator mutation checks during reduction.

Assisted-by: OpenAI Codex:model version not exposed
Keep the items container alive until its iterator and pair callbacks have finished on both success and failure.

Assisted-by: OpenAI Codex:model version not exposed
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

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

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