Repository navigation
Share borrowed str and bytes checks - #9625
youknowone merged 2 commits into
Conversation
Treat b"*" like the string wildcard, including bytes subclasses, without invoking equality overrides. Assisted-by: OpenAI Codex:model version not exposed
|
Caution Review failedThe pull request is closed.
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. |
Add ArgBytesOrStr and reuse zero-copy payload checks in ElementTree, struct format matching, and hex separator validation. Keep original Python objects and explicit callback ordering. Assisted-by: OpenAI Codex:model version not exposed
Merging this PR will not alter performance
Comparing Footnotes
|
youknowone
left a comment
There was a problem hiding this comment.
ok. I still suspect with_object_ref is the best idea rather than using ArgBytesOrStr directly there. but looks better
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
b'*'as the all-elements wildcard inElement.iter, including bytes subclasses without calling an overridden equality method.ArgBytesOrStrfor owned str/bytes arguments, withwith_refborrowing their byte payload andwith_object_refprobing a borrowed object without allocation or Python conversion. Strings retain their raw WTF-8 representation; other buffer exporters are not accepted.__len__callback are preserved.Validation
cargo check --locked --offline -p rustpython-vm -p rustpython-stdlib --testspassed.cargo clippy --locked --offline -p rustpython-vm -p rustpython-stdlib --testspassed with the existingarc_with_non_send_syncwarning atcrates/vm/src/stdlib/_ctypes/base.rs:2246. A strict-D warningsrun stops on that unchanged code.git diff --checkpassed.AI assistance
Implementation and source review were assisted by OpenAI Codex.