⚡ Sangsakala Proxy 🏠 Home
Skip to content

Preserve surrogate code points in CSV dialect names - #9639

Merged
youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:fix/csv-dialect-surrogate-names-20261103
Nov 4, 2026
Merged

youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:fix/csv-dialect-surrogate-names-20261103

Conversation

@youknowdot

Copy link
Copy Markdown
Contributor

Summary

Store CSV dialect registry names as WTF-8 instead of requiring valid UTF-8. Python strings may contain lone surrogate code points; CPython accepts such names when registering, selecting, listing, and unregistering a dialect. Lookups borrow the string key and do not allocate a new key.

The existing registry is process-global and is not a Python dict. Its insertion order, key identity, and custom string-subclass or non-string hash/equality behavior remain outside this change. General WTF-8 representation limitations and support for surrogate characters in CSV data or dialect options are also not addressed.

This combines cleanly at file level with #9635 and #9636; no merge was performed.

Validation

  • Compared with CPython 3.15.0's Unicode-name registration and reproduced register/get/list/unregister plus reader and writer selection with lone-surrogate names.
  • Independent source review of the patch and its composition with Require callable write method for CSV writers #9635/Handle CSV writer callbacks safely #9636, normal commit hooks, and diff checks passed.
  • RustPython was not built or executed locally. No tests were added or changed; hosted CI can run the existing test_csv suite.

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

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 18fc82b and 6df0454.

Files selected for processing: 1
  • crates/stdlib/src/csv.rs
  • 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

@codspeed

codspeed Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 62 untouched benchmarks
⏩ 4 skipped benchmarks1


Comparing youknowdot:fix/csv-dialect-surrogate-names-20261103 (6df0454) with main (18fc82b)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@youknowone
youknowone marked this pull request as ready for review November 4, 2026 01:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T01:26:23.239127Z 6df0454 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@youknowone
youknowone enabled auto-merge (squash) November 4, 2026 01:24
@youknowone
youknowone merged commit 9c77b33 into RustPython:main Nov 4, 2026
21 checks passed
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.

2 participants