René's URL Explorer Experiment


Title: Support Python single-byte codecs in pyexpat by youknowone · Pull Request #9938 · RustPython/RustPython · GitHub

Open Graph Title: Support Python single-byte codecs in pyexpat by youknowone · Pull Request #9938 · RustPython/RustPython

X Title: Support Python single-byte codecs in pyexpat by youknowone · Pull Request #9938 · RustPython/RustPython

Description: Summary Support Python single-byte text codecs in pyexpat, including the ISO-8859, Windows code-page, KOI8 and Mac codec families exercised by CPython 3.15.2. Build and validate Expat-style 256-entry maps through Python's codec registry, then decode lazily on the XML reader rather than rewriting complete documents. Preserve declared versus explicit encoding lookup order, XML-declaration callbacks, BOM/preamble handling, terminal codec failures and original-byte position accounting. Share the bridge between threaded and synchronous readers without calling Python from the parser thread. Remove nine stale expected-failure markers, enabling ten test occurrences across pyexpat, both ElementTree implementations and XML-RPC. Add one focused custom-codec/streaming regression to the existing XML snippet. This is independent of #9662's DTD/entity work and does not implement missing namespace, DTD, external-entity or amplification-accounting features. Validation Relevant canonical modules: test_pyexpat test_xml_etree test_xml_etree_c test_sax test_minidom test_plistlib: 979 tests, 36 skips, success (remaining unrelated expected failures retained). Existing stdlib_xml.py snippet passes on RustPython and CPython 3.15.2. cargo test -p rustpython-stdlib --lib: 64 passed, 0 failed or ignored. 43 custom-codec differential cases exercised with the threaded reader and post-fork synchronous fallback. Exception classes match CPython; callback/codec ordering matches except the pre-existing xml-rs buffered-text loss immediately before invalid input. Workspace Rust/doc tests excluding wasm, venvlauncher and C-API: 1,619 passed, 21 ignored. Workspace Clippy succeeded; final scoped Clippy succeeded after resolving local style warnings (existing wasi-host manifest / VM warnings remain). Final exact-commit binary reran all six canonical modules, the XML snippet and both differential-reader paths successfully. Eight alternating development-build smoke benchmark pairs for ordinary UTF-8 parsing: baseline median 0.16883s, candidate 0.16613s. This is a non-regression smoke check, not a release-profile speedup claim. Exact CPython diagnostic parity is not claimed: existing event positions and mixed UTF-16-header/single-byte-body column behavior still differ. No synthetic markup or test weakening hides those limitations. Windows/macOS/WASI execution and C-API tests have not been performed locally; C-API work is deferred. AI disclosure: implementation, review and validation were assisted by OpenAI Codex; the exact model identifier is unavailable in this session. Maintainer review remains pending. CI follow-up The first head exposed three additional XML-RPC encoding XPASS cases on Linux, macOS and Windows. Their obsolete expected-failure markers are removed in 25cc0ba; all 94 XML-RPC tests pass locally with walltime resources enabled. The updated XML snippet passes both RustPython and CPython 3.15.2 through the pytest harness (2 passed). The review-bot suggestion to return None explicitly for unrecognized codec names is addressed. The first Windows run also failed the unrelated asyncio SSL shutdown/backpressure test with “the transport never paused writing”, including its retry. This is not claimed fixed by the XML change; a separate investigation is underway. Checks after failed Python suites were skipped. Rust tests, Clippy, Miri and WASI checks passed on the first head. CodSpeed's benchmark build/execution and pyperformance were skipped, so there is no hosted performance measurement. CI for the updated head is pending.

Open Graph Description: Summary Support Python single-byte text codecs in pyexpat, including the ISO-8859, Windows code-page, KOI8 and Mac codec families exercised by CPython 3.15.2. Build and validate Expat-style 256-en...

X Description: Summary Support Python single-byte text codecs in pyexpat, including the ISO-8859, Windows code-page, KOI8 and Mac codec families exercised by CPython 3.15.2. Build and validate Expat-style 256-en...

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

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:192a94f4-85dc-09ab-68e0-7e43f561a664
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCD0A:A70A9:F2A20E:1413A44:6B01D7F6
html-safe-nonce08d7a218a82a5427845e464443bb8f5b23a643542438204c1ea63fa2b96b6a53
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDBBOkE3MEE5OkYyQTIwRToxNDEzQTQ0OjZCMDFEN0Y2IiwidmlzaXRvcl9pZCI6Ijc1NDE0MTk3ODQxOTQzNDkwNDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7ebbcbd64c103b275867f92be975444331444bdc0dcd86b69249e9ae76d68b5f
hovercard-subject-tagpull_request:5373588222
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/9938/files
twitter:imagehttps://avatars.githubusercontent.com/u/69878?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/69878?s=400&v=4
og:image:altSummary Support Python single-byte text codecs in pyexpat, including the ISO-8859, Windows code-page, KOI8 and Mac codec families exercised by CPython 3.15.2. Build and validate Expat-style 256-en...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/9938/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9938%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%2F9938%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/9938/files
Reloadhttps://github.com/RustPython/RustPython/pull/9938/files
Reloadhttps://github.com/RustPython/RustPython/pull/9938/files
RustPythonhttps://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Codehttps://github.com/RustPython/RustPython
Issues195 (195)https://github.com/RustPython/RustPython/issues
Pull requests132 (132)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
mainhttps://github.com/RustPython/RustPython/tree/main
dot/xml-single-byte-codecs-3152https://github.com/RustPython/RustPython/tree/dot/xml-single-byte-codecs-3152
Conversation 3 https://github.com/RustPython/RustPython/pull/9938
Commits 2 https://github.com/RustPython/RustPython/pull/9938/commits
Checks 31 https://github.com/RustPython/RustPython/pull/9938/checks
Files changed 5 https://github.com/RustPython/RustPython/pull/9938/files
Support Python single-byte codecs in pyexpat https://github.com/RustPython/RustPython/pull/9938/files#top
Show all changes 2 commits https://github.com/RustPython/RustPython/pull/9938/files
7db364e Support Python single-byte codecs in pyexpat youknowone Nov 18, 2026 https://github.com/RustPython/RustPython/pull/9938/commits/7db364efe6a2f30906da7621b3092af2d219f23f
25cc0ba Enable XML-RPC encoding cases fixed by the codec bridge youknowone Nov 18, 2026 https://github.com/RustPython/RustPython/pull/9938/commits/25cc0ba0f0f4e13c388b61358c76b986d853e26a
Clear filters https://github.com/RustPython/RustPython/pull/9938/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9938/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9938/files
test_pyexpat.py https://github.com/RustPython/RustPython/pull/9938/files#diff-bdb65b60742876d0828ee1d7f2c168d36fa02cc202ace32d27c46a7b4a17605d
test_xml_etree.py https://github.com/RustPython/RustPython/pull/9938/files#diff-cd2315ff25ab49e653d363de2d213e390ecb1b01bbc86e2be3b700db4b0bf454
test_xmlrpc.py https://github.com/RustPython/RustPython/pull/9938/files#diff-81a998365ca0823c9f1129137fce9dc0258b080728b165bcb498f06af30cc7d0
pyexpat.rs https://github.com/RustPython/RustPython/pull/9938/files#diff-7f4c525df38078045fcc6955c53f774ac806800c790e024f06fd3ce2b188f33b
stdlib_xml.py https://github.com/RustPython/RustPython/pull/9938/files#diff-183ab5f0e956d06bd4a4905edd051c400eed06c96dcc37e9632b30984a935245
Lib/test/test_pyexpat.pyhttps://github.com/RustPython/RustPython/pull/9938/files#diff-bdb65b60742876d0828ee1d7f2c168d36fa02cc202ace32d27c46a7b4a17605d
View file https://github.com/RustPython/RustPython/blob/25cc0ba0f0f4e13c388b61358c76b986d853e26a/Lib/test/test_pyexpat.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9938/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9938/files#diff-bdb65b60742876d0828ee1d7f2c168d36fa02cc202ace32d27c46a7b4a17605d
https://github.com/RustPython/RustPython/pull/9938/files#diff-bdb65b60742876d0828ee1d7f2c168d36fa02cc202ace32d27c46a7b4a17605d
https://github.com/RustPython/RustPython/pull/9938/files#diff-bdb65b60742876d0828ee1d7f2c168d36fa02cc202ace32d27c46a7b4a17605d
https://github.com/RustPython/RustPython/pull/9938/files#diff-bdb65b60742876d0828ee1d7f2c168d36fa02cc202ace32d27c46a7b4a17605d
https://github.com/RustPython/RustPython/pull/9938/files#diff-bdb65b60742876d0828ee1d7f2c168d36fa02cc202ace32d27c46a7b4a17605d
https://github.com/RustPython/RustPython/pull/9938/files#diff-bdb65b60742876d0828ee1d7f2c168d36fa02cc202ace32d27c46a7b4a17605d
https://github.com/RustPython/RustPython/pull/9938/files#diff-bdb65b60742876d0828ee1d7f2c168d36fa02cc202ace32d27c46a7b4a17605d
https://github.com/RustPython/RustPython/pull/9938/files#diff-bdb65b60742876d0828ee1d7f2c168d36fa02cc202ace32d27c46a7b4a17605d
https://github.com/RustPython/RustPython/pull/9938/files#diff-bdb65b60742876d0828ee1d7f2c168d36fa02cc202ace32d27c46a7b4a17605d
https://github.com/RustPython/RustPython/pull/9938/files#diff-bdb65b60742876d0828ee1d7f2c168d36fa02cc202ace32d27c46a7b4a17605d
Lib/test/test_xml_etree.pyhttps://github.com/RustPython/RustPython/pull/9938/files#diff-cd2315ff25ab49e653d363de2d213e390ecb1b01bbc86e2be3b700db4b0bf454
View file https://github.com/RustPython/RustPython/blob/25cc0ba0f0f4e13c388b61358c76b986d853e26a/Lib/test/test_xml_etree.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9938/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9938/files#diff-cd2315ff25ab49e653d363de2d213e390ecb1b01bbc86e2be3b700db4b0bf454
https://github.com/RustPython/RustPython/pull/9938/files#diff-cd2315ff25ab49e653d363de2d213e390ecb1b01bbc86e2be3b700db4b0bf454
Lib/test/test_xmlrpc.pyhttps://github.com/RustPython/RustPython/pull/9938/files#diff-81a998365ca0823c9f1129137fce9dc0258b080728b165bcb498f06af30cc7d0
View file https://github.com/RustPython/RustPython/blob/25cc0ba0f0f4e13c388b61358c76b986d853e26a/Lib/test/test_xmlrpc.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9938/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9938/files#diff-81a998365ca0823c9f1129137fce9dc0258b080728b165bcb498f06af30cc7d0
https://github.com/RustPython/RustPython/pull/9938/files#diff-81a998365ca0823c9f1129137fce9dc0258b080728b165bcb498f06af30cc7d0
https://github.com/RustPython/RustPython/pull/9938/files#diff-81a998365ca0823c9f1129137fce9dc0258b080728b165bcb498f06af30cc7d0
https://github.com/RustPython/RustPython/pull/9938/files#diff-81a998365ca0823c9f1129137fce9dc0258b080728b165bcb498f06af30cc7d0
https://github.com/RustPython/RustPython/pull/9938/files#diff-81a998365ca0823c9f1129137fce9dc0258b080728b165bcb498f06af30cc7d0
https://github.com/RustPython/RustPython/pull/9938/files#diff-81a998365ca0823c9f1129137fce9dc0258b080728b165bcb498f06af30cc7d0
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9938/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9938/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.