⚡ Sangsakala Proxy 🏠 Home
Skip to content

Align CSV dialect binding and validation with CPython 3.15 - #9684

Draft
youknowdot wants to merge 3 commits into
RustPython:mainfrom
youknowdot:csv-dialect-controls-group-20261104
Draft

youknowdot wants to merge 3 commits into
RustPython:mainfrom
youknowdot:csv-dialect-controls-group-20261104

Conversation

@youknowdot

@youknowdot youknowdot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Replace the bespoke format-options parser with shared FromArgs binding for all nine Dialect options.
  • Keep reader, writer and register_dialect limited to their own positional inputs, then bind format parameters after their input handling.
  • Match dialect character/lineterminator validation order and diagnostics, preserving missing-versus-None behavior and conversion lifetimes.

Reference: CPython 3.15.0 CSV dialect construction and validation.

Validation

  • Independent source review and bounded CPython 3.15 reference probes cover all nine positional options, callback/error precedence, quotechar=None defaults and validation collisions.
  • Independently reconstructed the current-main merge and the single import-block resolution. Main’s surrogate-safe registry and writer-operation changes are preserved; 68 additional combined CPython reference assertions passed.
  • Formatting and whitespace checks passed.
  • Normal commit hooks passed.
  • Focused cargo check --locked --offline -j1 -p rustpython-host_env -p rustpython-vm -p rustpython-stdlib --features rustpython-stdlib/threading passed.
  • The final current-main composition passed normal all-targets Clippy for the same focused packages/features. Four diagnostic headings and locations match the unchanged-main baseline: one POSIX needless-collect and three ElementTree lints. Strict -D warnings is no longer clean on this newer base; no warning suppression or unrelated baseline edits.
  • RustPython runtime, full workspace/C-API suites and cross-platform execution were not run. No test, Lib, workflow or marker edits.

This change does not address existing dialect identity or the parser/writer scalar-string limitation for lone surrogates. Shared binder errors may name Dialect where CPython uses an anonymous parser; no bespoke error formatter is added. The branch now includes main through 9c77b331a9e4, including #9636 and #9639. The import conflict retains both the shared binder types and PyStrRef; the cumulative diff from main remains confined to CSV (+83/-110). Related #9635 is not included.

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

Replace bespoke format-option parsing with shared derived binders, allow
all nine positional Dialect options, and preserve the outer constructor's
input handling before dialect callbacks. Match dialect validation order
and diagnostics without changing the parser's string representation.

Assisted-by: OpenAI Codex:model version not exposed
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

Keep surrogate-safe registry names alongside shared dialect binding and validation.

Assisted-by: OpenAI Codex:model version not exposed
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