René's URL Explorer Experiment


Title: Align text and bytes argument and buffer controls by youknowdot · Pull Request #9698 · RustPython/RustPython · GitHub

Open Graph Title: Align text and bytes argument and buffer controls by youknowdot · Pull Request #9698 · RustPython/RustPython

X Title: Align text and bytes argument and buffer controls by youknowdot · Pull Request #9698 · RustPython/RustPython

Description: Summary Group related CPython 3.15 text/bytes controls in 357 substantive changed lines (+200/-157): Share startswith/endswith argument conversion and validate affix items before invalid-range short-circuits, preserving tuple success short-circuiting and exporter errors. Reuse one borrowed bytes/buffer helper for bytes affixes and translation, including direct bytes-subclass access where CPython bypasses buffer overrides. Make bytes/bytearray maketrans use the last mapping for duplicate source bytes and the native length-error diagnostic. Preserve bytes.translate table/delete buffer acquisition, mutation visibility and release order. Return unchanged exact bytes by identity while normalizing subclasses. Validate bytes results before fallback conversion and fix exact bytes.bytes identity. Four production Rust files only. No Python, Lib, test, expected-failure marker or workflow changes. Partition/rpartition remain unchanged: pinned CPython intentionally retains the supplied separator object. Reference and validation Compared with CPython commit d220409a13b77de7a6c30abe16ea90db01528edc: bytes implementation, bytes helpers, and Unicode implementation. 50,330 bounded CPython/source-model assertions and 12,028 independent assertions passed. Coverage includes Unicode/surrogate bounds, tuple item validation, repeated mappings, bytes/bytearray consumers, exact/subclass identities and PEP 688 buffer acquisition/release callbacks with mutation and error paths. These are reference/model checks, not Rust implementation execution. Independent exact-source review passed, including the final two lazy-default Clippy corrections. Bytearray #9694 composition passed git apply --check. Final focused host-env/VM/stdlib threading cargo check, normal all-targets Clippy and ordinary commit hooks passed. Clippy emitted exactly four unchanged main-baseline diagnostics: one POSIX needless-collect and three ElementTree lints. Strict -D warnings remains blocked by that baseline; no warnings were suppressed. Native RustPython execution was not performed because the required execution guard has not been verified. Full workspace/C-API suites and cross-platform runtime validation remain unrun. Hosted CI is required; no expected failure is claimed resolved without runtime evidence. Remaining limits The existing qualified-type-name formatter does not preserve surrogate-containing type metadata. Generic binder diagnostics and pre-existing bytearray translation/export behavior outside these shared changes remain unchanged. Older architecture/GC/fallible-allocation PRs overlap some files and may need later textual reconciliation; no duplicate behavior fix was found in the 210-PR overlap audit. AI-assisted contribution by OpenAI Codex, disclosed in the commit trailer. Shared type-name compatibility The bytes constructor diagnostic uses the existing WTF-8 concatenation helper so it remains lossless when composed with #9700. Other text/bytes control-flow changes are byte-identical to the previously reviewed head. Independent in-memory composition review verified the exact previous head plus this narrow formatting change. Final focused host-env/VM/stdlib threading check, normal all-targets Clippy and ordinary hooks passed; the same four unchanged baseline diagnostics remain. No new runtime execution or test changes are claimed.

Open Graph Description: Summary Group related CPython 3.15 text/bytes controls in 357 substantive changed lines (+200/-157): Share startswith/endswith argument conversion and validate affix items before invalid-range sho...

X Description: Summary Group related CPython 3.15 text/bytes controls in 357 substantive changed lines (+200/-157): Share startswith/endswith argument conversion and validate affix items before invalid-range sho...

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

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:afe5dfe9-8c42-3f39-9783-8c6186cf2d9e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBCF4:2A7C1C:1535609:1C0FCFC:6B01FA72
html-safe-nonce7c8e0b279f0a921489b32b8bbb782f4a98d79e1ea04efab569bf233231398c95
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0Y0OjJBN0MxQzoxNTM1NjA5OjFDMEZDRkM6NkIwMUZBNzIiLCJ2aXNpdG9yX2lkIjoiNzU3MzE5MzY0NzMwNzQ4Nzg1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd47b8842dd9e2d5226c9113424a563a01c9493cb524ed7613a564b09cb8b9433
hovercard-subject-tagpull_request:5153007742
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/9698/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 Group related CPython 3.15 text/bytes controls in 357 substantive changed lines (+200/-157): Share startswith/endswith argument conversion and validate affix items before invalid-range sho...
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-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/9698/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9698%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%2F9698%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/9698/files
Reloadhttps://github.com/RustPython/RustPython/pull/9698/files
Reloadhttps://github.com/RustPython/RustPython/pull/9698/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/text-bytes-controls-20261104https://github.com/youknowdot/RustPython/tree/fix/text-bytes-controls-20261104
Conversation 4 https://github.com/RustPython/RustPython/pull/9698
Commits 4 https://github.com/RustPython/RustPython/pull/9698/commits
Checks 19 https://github.com/RustPython/RustPython/pull/9698/checks
Files changed https://github.com/RustPython/RustPython/pull/9698/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9698/files
Align text and bytes argument and buffer controls https://github.com/RustPython/RustPython/pull/9698/files#top
Show all changes 4 commits https://github.com/RustPython/RustPython/pull/9698/files
24a4a64 Align text and bytes argument controls with CPython youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9698/commits/24a4a6431a7099eba778c5fda0ef946a8c2a06e5
b72e268 Keep bytes conversion diagnostics WTF-8 compatible youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9698/commits/b72e26837dce3c5f20e462950d5fd21608da4bfc
bd9380a Merge main into text and bytes controls youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9698/commits/bd9380ad21c1f816652f7122b63c9c2b5f1f5ad6
f539764 Share byte translation tables without buffer ownership youknowdot Nov 5, 2026 https://github.com/RustPython/RustPython/pull/9698/commits/f5397644f35d81648d3e2849814ce7262b982da8
Clear filters https://github.com/RustPython/RustPython/pull/9698/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9698/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9698/files
anystr.rs https://github.com/RustPython/RustPython/pull/9698/files#diff-dd35a1000e2e6c0e7e4310bf9339045337d1db8ef9795c3cd7f2dbbb8f3dd809
bytes.rs https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
str.rs https://github.com/RustPython/RustPython/pull/9698/files#diff-a04ea1f7734fe40189e756196e034e6dedfcd5c82f2925e58cfd51ba7432073a
bytes_inner.rs https://github.com/RustPython/RustPython/pull/9698/files#diff-94a4e578864d9ec94d59e2b7f57ea8f5a67aa734d28847c8921202237f2156b7
crates/vm/src/anystr.rshttps://github.com/RustPython/RustPython/pull/9698/files#diff-dd35a1000e2e6c0e7e4310bf9339045337d1db8ef9795c3cd7f2dbbb8f3dd809
View file https://github.com/youknowdot/RustPython/blob/f5397644f35d81648d3e2849814ce7262b982da8/crates/vm/src/anystr.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9698/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9698/files#diff-dd35a1000e2e6c0e7e4310bf9339045337d1db8ef9795c3cd7f2dbbb8f3dd809
https://github.com/RustPython/RustPython/pull/9698/files#diff-dd35a1000e2e6c0e7e4310bf9339045337d1db8ef9795c3cd7f2dbbb8f3dd809
https://github.com/RustPython/RustPython/pull/9698/files#diff-dd35a1000e2e6c0e7e4310bf9339045337d1db8ef9795c3cd7f2dbbb8f3dd809
https://github.com/RustPython/RustPython/pull/9698/files#diff-dd35a1000e2e6c0e7e4310bf9339045337d1db8ef9795c3cd7f2dbbb8f3dd809
https://github.com/RustPython/RustPython/pull/9698/files#diff-dd35a1000e2e6c0e7e4310bf9339045337d1db8ef9795c3cd7f2dbbb8f3dd809
https://github.com/RustPython/RustPython/pull/9698/files#diff-dd35a1000e2e6c0e7e4310bf9339045337d1db8ef9795c3cd7f2dbbb8f3dd809
https://github.com/RustPython/RustPython/pull/9698/files#diff-dd35a1000e2e6c0e7e4310bf9339045337d1db8ef9795c3cd7f2dbbb8f3dd809
crates/vm/src/builtins/bytes.rshttps://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
View file https://github.com/youknowdot/RustPython/blob/f5397644f35d81648d3e2849814ce7262b982da8/crates/vm/src/builtins/bytes.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9698/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
https://github.com/RustPython/RustPython/pull/9698/files#diff-6b402f3feb41119eef6e230cb7efe615c9804a4ed5ce25dc9121ed85ed495343
crates/vm/src/builtins/str.rshttps://github.com/RustPython/RustPython/pull/9698/files#diff-a04ea1f7734fe40189e756196e034e6dedfcd5c82f2925e58cfd51ba7432073a
View file https://github.com/youknowdot/RustPython/blob/f5397644f35d81648d3e2849814ce7262b982da8/crates/vm/src/builtins/str.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9698/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9698/files#diff-a04ea1f7734fe40189e756196e034e6dedfcd5c82f2925e58cfd51ba7432073a
https://github.com/RustPython/RustPython/pull/9698/files#diff-a04ea1f7734fe40189e756196e034e6dedfcd5c82f2925e58cfd51ba7432073a
https://github.com/RustPython/RustPython/pull/9698/files#diff-a04ea1f7734fe40189e756196e034e6dedfcd5c82f2925e58cfd51ba7432073a
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9698/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9698/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.