René's URL Explorer Experiment


Title: Share borrowed str and bytes checks by youknowdot · Pull Request #9625 · RustPython/RustPython · GitHub

Open Graph Title: Share borrowed str and bytes checks by youknowdot · Pull Request #9625 · RustPython/RustPython

X Title: Share borrowed str and bytes checks by youknowdot · Pull Request #9625 · RustPython/RustPython

Description: Summary Recognize b'*' as the all-elements wildcard in Element.iter, including bytes subclasses without calling an overridden equality method. Add ArgBytesOrStr for owned str/bytes arguments, with with_ref borrowing their byte payload and with_object_ref probing a borrowed object without allocation or Python conversion. Strings retain their raw WTF-8 representation; other buffer exporters are not accepted. Share the checks in ElementTree iteration, path detection, parser reads and event names, struct format matching, and bytes/bytearray hex separators. Event names no longer need a temporary byte vector. Original event objects and the hex separator's __len__ callback are preserved. Validation cargo check --locked --offline -p rustpython-vm -p rustpython-stdlib --tests passed. cargo clippy --locked --offline -p rustpython-vm -p rustpython-stdlib --tests passed with the existing arc_with_non_send_sync warning at crates/vm/src/stdlib/_ctypes/base.rs:2246. A strict -D warnings run stops on that unchanged code. Two new Rust unit tests cover object identity, direct payload borrowing, owned lifetime, WTF-8, and rejection without calling the probe closure. They were compiled but not executed locally. Independent source review, normal commit hooks, and git diff --check passed. The original bytes wildcard behavior was compared with CPython 3.15.0. RustPython runtime tests and the full workspace/C-API suites were not run locally; hosted CI is still required. AI assistance Implementation and source review were assisted by OpenAI Codex.

Open Graph Description: Summary Recognize b'*' as the all-elements wildcard in Element.iter, including bytes subclasses without calling an overridden equality method. Add ArgBytesOrStr for owned str/bytes argumen...

X Description: Summary Recognize b'*' as the all-elements wildcard in Element.iter, including bytes subclasses without calling an overridden equality method. Add ArgBytesOrStr for owned str/bytes...

Opengraph URL: https://github.com/RustPython/RustPython/pull/9625

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b55cd7bd-9402-3891-8c3d-9e9b19a7b547
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB9FC:3E4205:34AF2B3:46609C7:6B020873
html-safe-noncee65a16d3be707604db548bb40f06e2080791efc705b651ed5f79f275bb347f6a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUZDOjNFNDIwNTozNEFGMkIzOjQ2NjA5Qzc6NkIwMjA4NzMiLCJ2aXNpdG9yX2lkIjoiNDU3NjA3NDYyNTMwNTQxMzc0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6006767fd3d5006b869b87c5e5ea8a1a3549a5c78b5b8b0eb7681257d96f402a
hovercard-subject-tagpull_request:5138245882
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9625/files
twitter:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
og:image:altSummary Recognize b'*' as the all-elements wildcard in Element.iter, including bytes subclasses without calling an overridden equality method. Add ArgBytesOrStr for owned str/bytes argumen...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/9625/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9625%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9625%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/pull/9625/files
Reloadhttps://github.com/RustPython/RustPython/pull/9625/files
Reloadhttps://github.com/RustPython/RustPython/pull/9625/files
RustPythonhttps://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Codehttps://github.com/RustPython/RustPython
Issues195 (195)https://github.com/RustPython/RustPython/issues
Pull requests133 (133)https://github.com/RustPython/RustPython/pulls
Discussionshttps://github.com/RustPython/RustPython/discussions
Actionshttps://github.com/RustPython/RustPython/actions
Projectshttps://github.com/RustPython/RustPython/projects
Wikihttps://github.com/RustPython/RustPython/wiki
Security and qualityhttps://github.com/RustPython/RustPython/security
Insightshttps://github.com/RustPython/RustPython/insights
Sign up for GitHub https://github.com/signup?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
youknowonehttps://github.com/youknowone
RustPython:mainhttps://github.com/RustPython/RustPython/tree/main
youknowdot:fix/element-iter-bytes-wildcard-20261103https://github.com/youknowdot/RustPython/tree/fix/element-iter-bytes-wildcard-20261103
Conversation 5 https://github.com/RustPython/RustPython/pull/9625
Commits 2 https://github.com/RustPython/RustPython/pull/9625/commits
Checks 20 https://github.com/RustPython/RustPython/pull/9625/checks
Files changed https://github.com/RustPython/RustPython/pull/9625/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9625/files
Share borrowed str and bytes checks https://github.com/RustPython/RustPython/pull/9625/files#top
Show all changes 2 commits https://github.com/RustPython/RustPython/pull/9625/files
e28c768 Recognize bytes wildcard in Element.iter youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9625/commits/e28c768d6e803cd1597a8e6685a6438650a671f5
6487fc8 Share borrowed str and bytes argument checks youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9625/commits/6487fc879b3ffa74f53d76161b73c0fb8371e583
Clear filters https://github.com/RustPython/RustPython/pull/9625/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9625/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9625/files
elementtree.rs https://github.com/RustPython/RustPython/pull/9625/files#diff-12e3ee061fcf107011823a4f5e3d07ed2c3b4328009cf508345e347624e826b6
pystruct.rs https://github.com/RustPython/RustPython/pull/9625/files#diff-399bd78b8c0a565ea9cd285a9b663037b08439722ecbfdf8011fedc30f7c1d66
bytes_inner.rs https://github.com/RustPython/RustPython/pull/9625/files#diff-94a4e578864d9ec94d59e2b7f57ea8f5a67aa734d28847c8921202237f2156b7
buffer.rs https://github.com/RustPython/RustPython/pull/9625/files#diff-43143e7152649713a58a1aa03a980cde968a08ee81bc572dcc9d7d40d7da1b8a
mod.rs https://github.com/RustPython/RustPython/pull/9625/files#diff-c2fa22f10e57d8883fb9de7511a7345f799c1c3e87cda5ac557e3d513020d950
crates/stdlib/src/elementtree.rshttps://github.com/RustPython/RustPython/pull/9625/files#diff-12e3ee061fcf107011823a4f5e3d07ed2c3b4328009cf508345e347624e826b6
View file https://github.com/youknowdot/RustPython/blob/6487fc879b3ffa74f53d76161b73c0fb8371e583/crates/stdlib/src/elementtree.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9625/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9625/files#diff-12e3ee061fcf107011823a4f5e3d07ed2c3b4328009cf508345e347624e826b6
https://github.com/RustPython/RustPython/pull/9625/files#diff-12e3ee061fcf107011823a4f5e3d07ed2c3b4328009cf508345e347624e826b6
https://github.com/RustPython/RustPython/pull/9625/files#diff-12e3ee061fcf107011823a4f5e3d07ed2c3b4328009cf508345e347624e826b6
https://github.com/RustPython/RustPython/pull/9625/files#diff-12e3ee061fcf107011823a4f5e3d07ed2c3b4328009cf508345e347624e826b6
https://github.com/RustPython/RustPython/pull/9625/files#diff-12e3ee061fcf107011823a4f5e3d07ed2c3b4328009cf508345e347624e826b6
https://github.com/RustPython/RustPython/pull/9625/files#diff-12e3ee061fcf107011823a4f5e3d07ed2c3b4328009cf508345e347624e826b6
https://github.com/RustPython/RustPython/pull/9625/files#diff-12e3ee061fcf107011823a4f5e3d07ed2c3b4328009cf508345e347624e826b6
https://github.com/RustPython/RustPython/pull/9625/files#diff-12e3ee061fcf107011823a4f5e3d07ed2c3b4328009cf508345e347624e826b6
https://github.com/RustPython/RustPython/pull/9625/files#diff-12e3ee061fcf107011823a4f5e3d07ed2c3b4328009cf508345e347624e826b6
https://github.com/RustPython/RustPython/pull/9625/files#diff-12e3ee061fcf107011823a4f5e3d07ed2c3b4328009cf508345e347624e826b6
crates/stdlib/src/pystruct.rshttps://github.com/RustPython/RustPython/pull/9625/files#diff-399bd78b8c0a565ea9cd285a9b663037b08439722ecbfdf8011fedc30f7c1d66
View file https://github.com/youknowdot/RustPython/blob/6487fc879b3ffa74f53d76161b73c0fb8371e583/crates/stdlib/src/pystruct.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9625/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9625/files#diff-399bd78b8c0a565ea9cd285a9b663037b08439722ecbfdf8011fedc30f7c1d66
https://github.com/RustPython/RustPython/pull/9625/files#diff-399bd78b8c0a565ea9cd285a9b663037b08439722ecbfdf8011fedc30f7c1d66
https://github.com/RustPython/RustPython/pull/9625/files#diff-399bd78b8c0a565ea9cd285a9b663037b08439722ecbfdf8011fedc30f7c1d66
https://github.com/RustPython/RustPython/pull/9625/files#diff-399bd78b8c0a565ea9cd285a9b663037b08439722ecbfdf8011fedc30f7c1d66
crates/vm/src/bytes_inner.rshttps://github.com/RustPython/RustPython/pull/9625/files#diff-94a4e578864d9ec94d59e2b7f57ea8f5a67aa734d28847c8921202237f2156b7
View file https://github.com/youknowdot/RustPython/blob/6487fc879b3ffa74f53d76161b73c0fb8371e583/crates/vm/src/bytes_inner.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9625/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9625/files#diff-94a4e578864d9ec94d59e2b7f57ea8f5a67aa734d28847c8921202237f2156b7
https://github.com/RustPython/RustPython/pull/9625/files#diff-94a4e578864d9ec94d59e2b7f57ea8f5a67aa734d28847c8921202237f2156b7
https://github.com/RustPython/RustPython/pull/9625/files#diff-94a4e578864d9ec94d59e2b7f57ea8f5a67aa734d28847c8921202237f2156b7
https://github.com/RustPython/RustPython/pull/9625/files#diff-94a4e578864d9ec94d59e2b7f57ea8f5a67aa734d28847c8921202237f2156b7
https://github.com/RustPython/RustPython/pull/9625/files#diff-94a4e578864d9ec94d59e2b7f57ea8f5a67aa734d28847c8921202237f2156b7
crates/vm/src/function/buffer.rshttps://github.com/RustPython/RustPython/pull/9625/files#diff-43143e7152649713a58a1aa03a980cde968a08ee81bc572dcc9d7d40d7da1b8a
View file https://github.com/youknowdot/RustPython/blob/6487fc879b3ffa74f53d76161b73c0fb8371e583/crates/vm/src/function/buffer.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9625/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9625/files#diff-43143e7152649713a58a1aa03a980cde968a08ee81bc572dcc9d7d40d7da1b8a
https://github.com/RustPython/RustPython/pull/9625/files#diff-43143e7152649713a58a1aa03a980cde968a08ee81bc572dcc9d7d40d7da1b8a
https://github.com/RustPython/RustPython/pull/9625/files#diff-43143e7152649713a58a1aa03a980cde968a08ee81bc572dcc9d7d40d7da1b8a
https://github.com/RustPython/RustPython/pull/9625/files#diff-43143e7152649713a58a1aa03a980cde968a08ee81bc572dcc9d7d40d7da1b8a
crates/vm/src/function/mod.rshttps://github.com/RustPython/RustPython/pull/9625/files#diff-c2fa22f10e57d8883fb9de7511a7345f799c1c3e87cda5ac557e3d513020d950
View file https://github.com/youknowdot/RustPython/blob/6487fc879b3ffa74f53d76161b73c0fb8371e583/crates/vm/src/function/mod.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9625/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9625/files#diff-c2fa22f10e57d8883fb9de7511a7345f799c1c3e87cda5ac557e3d513020d950
https://github.com/RustPython/RustPython/pull/9625/files#diff-c2fa22f10e57d8883fb9de7511a7345f799c1c3e87cda5ac557e3d513020d950
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9625/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.