René's URL Explorer Experiment


Title: Honor charmap callbacks and retire the codec callback xfail by youknowdot · Pull Request #9736 · RustPython/RustPython · GitHub

Open Graph Title: Honor charmap callbacks and retire the codec callback xfail by youknowdot · Pull Request #9736 · RustPython/RustPython

X Title: Honor charmap callbacks and retire the codec callback xfail by youknowdot · Pull Request #9736 · RustPython/RustPython

Description: Summary Stacked on #9733 (which includes #9732). The new commits complete the remaining expected failure in Lib/test/test_codeccallbacks.py. Replace the Python-delegated charmap decoder with a native implementation that honors error-handler restart positions. Preserve string and general mapping behavior, registered standard-handler overrides, callback replacement of exception.object, and the original consumed-byte count. Keep bytearray borrows out of Python callbacks. Mapping callbacks can modify live input before the first decoding error; subsequent decoding follows the exception's bytes snapshot, matching CPython. Regenerate the test through scripts/update_lib quick Lib/test/test_codeccallbacks.py --no-build --no-commit. The only test change removes its sole expected-failure decorator. No assertions, test logic, or skips change, and no duplicate snippets are added. Validation Passed on the final source: Release build with stdlib,stdio,importlib,host_env,doc,threading,ucd_3_2_0. Entire test_codeccallbacks: 43 tests, no skips or expected failures. Entire test_codecs: 288 tests, 14 existing skips. Entire test_charmapcodec: 4 tests. 125-case differential probe covering mappings, handler overrides, restart indexes, replacement input, mutable buffers, and retained exceptions. Results match the available CPython 3.14.9 runtime; behavior was also checked against CPython 3.15 source at d220409a13b77de7a6c30abe16ea90db01528edc. Normal commit hooks and formatting checks. Still running locally: workspace tests/Clippy and the separate C API tests/Clippy. This section will be updated when those checks finish. CI and stack The final commit uses [skip ci] to avoid redundant hosted CI while the parent stack is pending. No CI label is applied. Hosted platform checks are intentionally deferred, not claimed as passing. Rebase after the parent PRs land and remove the skip directive before requesting full platform checks. Summary by CodeRabbit New Features Charmap decoding supports bytes-like input, optional error handlers, and mappings that produce characters, code points, or undefined entries. When no mapping is provided, charmap decoding uses Latin-1. Custom error handlers receive an immutable copy of the original input. Bug Fixes Registered error handlers are honored for standard error names during decoding. Invalid handler names, mapping results, and out-of-range code points produce appropriate errors. Error handlers that set an exception’s object attribute to a non-bytes value receive a clear TypeError.

Open Graph Description: Summary Stacked on #9733 (which includes #9732). The new commits complete the remaining expected failure in Lib/test/test_codeccallbacks.py. Replace the Python-delegated charmap decoder with a nat...

X Description: Summary Stacked on #9733 (which includes #9732). The new commits complete the remaining expected failure in Lib/test/test_codeccallbacks.py. Replace the Python-delegated charmap decoder with a nat...

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

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:e2e9d4ae-caaf-c0d4-407e-66cd5f66ee02
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE948:6365:32CBC97:43C9075:6B01F9F5
html-safe-nonce084602b5c2e190a5cc270a9076cf4a3d35234634d87e79a22707c84a1072c3c5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTQ4OjYzNjU6MzJDQkM5Nzo0M0M5MDc1OjZCMDFGOUY1IiwidmlzaXRvcl9pZCI6IjQ0ODUwNDI0OTcxMTM5NDY2MTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc2d6b989d979756f91f63244c8b201e5eefaba09c3ff878c331a3d4342e54dc2
hovercard-subject-tagpull_request:5196288157
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/9736/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 Stacked on #9733 (which includes #9732). The new commits complete the remaining expected failure in Lib/test/test_codeccallbacks.py. Replace the Python-delegated charmap decoder with a nat...
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/9736/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9736%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%2F9736%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/9736/files
Reloadhttps://github.com/RustPython/RustPython/pull/9736/files
Reloadhttps://github.com/RustPython/RustPython/pull/9736/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/charmap-callback-batch-20261107https://github.com/youknowdot/RustPython/tree/fix/charmap-callback-batch-20261107
Conversation 6 https://github.com/RustPython/RustPython/pull/9736
Commits 5 https://github.com/RustPython/RustPython/pull/9736/commits
Checks 28 https://github.com/RustPython/RustPython/pull/9736/checks
Files changed https://github.com/RustPython/RustPython/pull/9736/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9736/files
Honor charmap callbacks and retire the codec callback xfail https://github.com/RustPython/RustPython/pull/9736/files#top
Show all changes 5 commits https://github.com/RustPython/RustPython/pull/9736/files
f0dc468 Honor charmap decode callback restarts in native codec codex Nov 6, 2026 https://github.com/RustPython/RustPython/pull/9736/commits/f0dc468fc6db2231134e432e6ba5e16c1d54ee79
93c5861 Retire the remaining codec callback expected failure codex Nov 6, 2026 https://github.com/RustPython/RustPython/pull/9736/commits/93c58618d7e48112c357049c8d8dd366d98eddf3
7d5a199 Match CPython's invalid decode callback object diagnostic codex Nov 8, 2026 https://github.com/RustPython/RustPython/pull/9736/commits/7d5a1997b359d0f0f66cfd5a0af0edf82abe4dd5
09c5569 Adapt owned decode context to current main codex Nov 8, 2026 https://github.com/RustPython/RustPython/pull/9736/commits/09c556936ffb84b77faa3e8433268d1bc8dfdeaa
2039610 Let charmap error handlers repair retained exception input codex Nov 8, 2026 https://github.com/RustPython/RustPython/pull/9736/commits/2039610d6e52af6de883b2f18b681020168bdb17
Clear filters https://github.com/RustPython/RustPython/pull/9736/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9736/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9736/files
test_codeccallbacks.py https://github.com/RustPython/RustPython/pull/9736/files#diff-00bad81fa1fbaab8668c6dcf044f0fedf98f8b68803c3d4e2e4cfce3f04a81c8
codecs.rs https://github.com/RustPython/RustPython/pull/9736/files#diff-5cbadb2b300a5f24fb3fac28ebe23139a4015307b8f9100dff82423ecedf64b4
_codecs.rs https://github.com/RustPython/RustPython/pull/9736/files#diff-b2a9b9730c8278dc0964ea9e0b1fb0d3dc472e23ce20b5264bba3f1f6c585226
stdlib_codecs_wide.py https://github.com/RustPython/RustPython/pull/9736/files#diff-df0602b393096da9a8fc2f562042275fc9c05c41de86cc46e2e699b9a0b47df9
Lib/test/test_codeccallbacks.pyhttps://github.com/RustPython/RustPython/pull/9736/files#diff-00bad81fa1fbaab8668c6dcf044f0fedf98f8b68803c3d4e2e4cfce3f04a81c8
View file https://github.com/youknowdot/RustPython/blob/2039610d6e52af6de883b2f18b681020168bdb17/Lib/test/test_codeccallbacks.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9736/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9736/files#diff-00bad81fa1fbaab8668c6dcf044f0fedf98f8b68803c3d4e2e4cfce3f04a81c8
https://github.com/RustPython/RustPython/pull/9736/files#diff-00bad81fa1fbaab8668c6dcf044f0fedf98f8b68803c3d4e2e4cfce3f04a81c8
crates/vm/src/codecs.rshttps://github.com/RustPython/RustPython/pull/9736/files#diff-5cbadb2b300a5f24fb3fac28ebe23139a4015307b8f9100dff82423ecedf64b4
View file https://github.com/youknowdot/RustPython/blob/2039610d6e52af6de883b2f18b681020168bdb17/crates/vm/src/codecs.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9736/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9736/files#diff-5cbadb2b300a5f24fb3fac28ebe23139a4015307b8f9100dff82423ecedf64b4
https://github.com/RustPython/RustPython/pull/9736/files#diff-5cbadb2b300a5f24fb3fac28ebe23139a4015307b8f9100dff82423ecedf64b4
https://github.com/RustPython/RustPython/pull/9736/files#diff-5cbadb2b300a5f24fb3fac28ebe23139a4015307b8f9100dff82423ecedf64b4
https://github.com/RustPython/RustPython/pull/9736/files#diff-5cbadb2b300a5f24fb3fac28ebe23139a4015307b8f9100dff82423ecedf64b4
https://github.com/RustPython/RustPython/pull/9736/files#diff-5cbadb2b300a5f24fb3fac28ebe23139a4015307b8f9100dff82423ecedf64b4
https://github.com/RustPython/RustPython/pull/9736/files#diff-5cbadb2b300a5f24fb3fac28ebe23139a4015307b8f9100dff82423ecedf64b4
https://github.com/RustPython/RustPython/pull/9736/files#diff-5cbadb2b300a5f24fb3fac28ebe23139a4015307b8f9100dff82423ecedf64b4
https://github.com/RustPython/RustPython/pull/9736/files#diff-5cbadb2b300a5f24fb3fac28ebe23139a4015307b8f9100dff82423ecedf64b4
crates/vm/src/stdlib/_codecs.rshttps://github.com/RustPython/RustPython/pull/9736/files#diff-b2a9b9730c8278dc0964ea9e0b1fb0d3dc472e23ce20b5264bba3f1f6c585226
View file https://github.com/youknowdot/RustPython/blob/2039610d6e52af6de883b2f18b681020168bdb17/crates/vm/src/stdlib/_codecs.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9736/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9736/files#diff-b2a9b9730c8278dc0964ea9e0b1fb0d3dc472e23ce20b5264bba3f1f6c585226
https://github.com/RustPython/RustPython/pull/9736/files#diff-b2a9b9730c8278dc0964ea9e0b1fb0d3dc472e23ce20b5264bba3f1f6c585226
https://github.com/RustPython/RustPython/pull/9736/files#diff-b2a9b9730c8278dc0964ea9e0b1fb0d3dc472e23ce20b5264bba3f1f6c585226
https://github.com/RustPython/RustPython/pull/9736/files#diff-b2a9b9730c8278dc0964ea9e0b1fb0d3dc472e23ce20b5264bba3f1f6c585226
https://github.com/RustPython/RustPython/pull/9736/files#diff-b2a9b9730c8278dc0964ea9e0b1fb0d3dc472e23ce20b5264bba3f1f6c585226
https://github.com/RustPython/RustPython/pull/9736/files#diff-b2a9b9730c8278dc0964ea9e0b1fb0d3dc472e23ce20b5264bba3f1f6c585226
extra_tests/snippets/stdlib_codecs_wide.pyhttps://github.com/RustPython/RustPython/pull/9736/files#diff-df0602b393096da9a8fc2f562042275fc9c05c41de86cc46e2e699b9a0b47df9
View file https://github.com/youknowdot/RustPython/blob/2039610d6e52af6de883b2f18b681020168bdb17/extra_tests/snippets/stdlib_codecs_wide.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9736/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9736/files#diff-df0602b393096da9a8fc2f562042275fc9c05c41de86cc46e2e699b9a0b47df9
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9736/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.