René's URL Explorer Experiment


Title: host_env: locale grouping, byte/UTF-16 readers, local-machine cert stores, PlaySound memory by youknowone · Pull Request #9706 · RustPython/RustPython · GitHub

Open Graph Title: host_env: locale grouping, byte/UTF-16 readers, local-machine cert stores, PlaySound memory by youknowone · Pull Request #9706 · RustPython/RustPython

X Title: host_env: locale grouping, byte/UTF-16 readers, local-machine cert stores, PlaySound memory by youknowone · Pull Request #9706 · RustPython/RustPython

Description: Host-environment fixes and additions, one commit each: locale: the host grouping reader stopped before CHAR_MAX, so a grouping of "\x7f" came out empty. It now keeps CHAR_MAX. locale.localeconv() and the 'n' format add the trailing 0 only when the list does not already end in CHAR_MAX. On macOS, bg_BG.CP1251 mon_grouping was [] and is now [127], the same as CPython. socket: adds if_nameindex_bytes and if_indextoname_bytes, which return interface names without a lossy UTF-8 conversion. The existing String functions now call them. posix: adds sendfile_no_offset on Linux, which sends from the file's current offset. cert_store (Windows): adds enum_certificates_local_machine and enum_crls_local_machine, which read a read-only CERT_SYSTEM_STORE_LOCAL_MACHINE store, including each entry's encoding and enhanced key usage. winsound (Windows): copies a Memory source into u16-aligned storage before calling PlaySoundW, so an empty slice no longer passes a dangling pointer. SND_MEMORY is now rejected only for a Name source. wmi (Windows): adds exec_query_wide, which takes and returns UTF-16 without conversion. exec_query now calls it. Testing: cargo test -p rustpython-host_env passes, including a new copy_grouping test. cargo clippy -p rustpython-host_env --lib passes for x86_64-pc-windows-msvc and x86_64-unknown-linux-gnu. test_locale, test__locale, test_format and the interface-name tests in test_socket pass. The localeconv() grouping values match CPython for every locale in /usr/share/locale on macOS. Rebase verification (2026-11-07) Rebased onto ea5fbcc00. Kept both the new locale snapshot implementation and the grouping regression test, and adapted the interface-name readers to propagate errors from the now-fallible fsdecode API. Workspace tests: 1,519 passed, 20 ignored; C-API tests: 149 passed, 2 ignored. Workspace/all-targets clippy and configured commit hooks passed. Debug-interpreter test__locale and test_format passed. Three locale-alias errors and two interface-enumeration EPERM errors reproduced with system CPython in this environment. Release-mode and Windows validation were not rerun during this rebase. Rebase, conflict resolution, API adaptation, and verification assisted by Codex (gpt-6.1-sol). 🤖 Generated with Claude Code Summary by CodeRabbit New Features Added read-only access to local-machine certificates and revocation lists. Added byte-preserving network interface name lookups, improved handling of non-UTF-8 interface names, and support for wide-character WMI queries. Added Linux file transfer support that uses the input file’s current position. Bug Fixes Corrected locale number-grouping results when a grouping ends with a stop marker. Improved sound playback handling for in-memory audio and stop requests.

Open Graph Description: Host-environment fixes and additions, one commit each: locale: the host grouping reader stopped before CHAR_MAX, so a grouping of "\x7f" came out empty. It now keeps CHAR_MAX. locale.loc...

X Description: Host-environment fixes and additions, one commit each: locale: the host grouping reader stopped before CHAR_MAX, so a grouping of "\x7f" came out empty. It now keeps CHAR_MAX. lo...

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

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:84d4b4ff-6dd7-44f0-1f7b-d78481382f3b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id94E6:3DD488:38E0317:484E238:6B01FA4D
html-safe-nonce993cb5fd50db0a0390b1d3546f7a3e2717a28911a6ee0d9b10e51d07f9601108
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEU2OjNERDQ4ODozOEUwMzE3OjQ4NEUyMzg6NkIwMUZBNEQiLCJ2aXNpdG9yX2lkIjoiNDEyODkyNTY5NjA4Mjk2NzExNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacff080dbf9f74c9f4a7a4330ef19f57e90a4da5ba44afba38579461c0917cdcd1
hovercard-subject-tagpull_request:5155734338
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/9706/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:altHost-environment fixes and additions, one commit each: locale: the host grouping reader stopped before CHAR_MAX, so a grouping of "\x7f" came out empty. It now keeps CHAR_MAX. locale.loc...
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/9706/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9706%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%2F9706%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/9706/files
Reloadhttps://github.com/RustPython/RustPython/pull/9706/files
Reloadhttps://github.com/RustPython/RustPython/pull/9706/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
youknowone:host_env-fixeshttps://github.com/youknowone/RustPython/tree/host_env-fixes
Conversation 9 https://github.com/RustPython/RustPython/pull/9706
Commits 8 https://github.com/RustPython/RustPython/pull/9706/commits
Checks 27 https://github.com/RustPython/RustPython/pull/9706/checks
Files changed https://github.com/RustPython/RustPython/pull/9706/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9706/files
host_env: locale grouping, byte/UTF-16 readers, local-machine cert stores, PlaySound memory https://github.com/RustPython/RustPython/pull/9706/files#top
Show all changes 8 commits https://github.com/RustPython/RustPython/pull/9706/files
ce1c76b locale: keep a CHAR_MAX grouping terminator youknowone Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9706/commits/ce1c76b6135b88206c3d04d5d20d89740fff696d
691fd83 host_env: add byte readers for interface names youknowone Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9706/commits/691fd83566a7307bb8607dd805af341213201817
4e42047 host_env: add sendfile from the current offset on Linux youknowone Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9706/commits/4e42047beee340d408bbc323069def7b8340186b
0719886 host_env: enumerate local-machine certificate and CRL stores youknowone Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9706/commits/071988642002714270494b52fcddb8c8f814d148
cd58c82 host_env: copy PlaySound memory into u16-aligned storage youknowone Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9706/commits/cd58c8272cd74ce55383ce780d41ff42c9add069
b663a60 host_env: add a WMI query that keeps UTF-16 text youknowone Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9706/commits/b663a60464e7bc08f9bbe8eef9e25865236ad8d3
b0a340d address review: stop 'n' grouping at CHAR_MAX, drop PlaySound copy, f… youknowone Nov 5, 2026 https://github.com/RustPython/RustPython/pull/9706/commits/b0a340d293a946d4c960d082fd0886f2b1fd9894
d07694f Propagate filesystem decoding errors in interface name readers codex Nov 7, 2026 https://github.com/RustPython/RustPython/pull/9706/commits/d07694f1f09a43d7e3fda2355fd9b667d4c20265
Clear filters https://github.com/RustPython/RustPython/pull/9706/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9706/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9706/files
format.rs https://github.com/RustPython/RustPython/pull/9706/files#diff-47d8fa943b6ea1840ae9d06a3785a14c7a57610a113e4a7958709acb47e87e4c
cert_store.rs https://github.com/RustPython/RustPython/pull/9706/files#diff-9cd251dd5f7516dd9986abed6433e7f621ba3dfe6f5b7aef2c6f29b914ca55ac
locale.rs https://github.com/RustPython/RustPython/pull/9706/files#diff-798379dfb19a491e0c442f8cf72284b966e32d4cce542c2748e0d62e5e3f850f
posix.rs https://github.com/RustPython/RustPython/pull/9706/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
socket.rs https://github.com/RustPython/RustPython/pull/9706/files#diff-e700a2482e618f0d67e0b1f7bbc4e5eef1bc7da702aaef7fa30d487372d19b72
winsound.rs https://github.com/RustPython/RustPython/pull/9706/files#diff-197edf8f208d8bbbde011fd270ee0129ce8a59bd76c07377e41206862942ccf8
wmi.rs https://github.com/RustPython/RustPython/pull/9706/files#diff-bb4f85e920bfd89a1d89c313dbf5349de2d7204dee7a6a0ffe10271f1e6b1167
locale.rs https://github.com/RustPython/RustPython/pull/9706/files#diff-61d5a70e6148ba89da5915f4cceadf572fe87de304986a9506ac420f761461de
socket.rs https://github.com/RustPython/RustPython/pull/9706/files#diff-184374c26b267e900965c88a05d2c963f9c2fcdc8419201b0fa39b9ed462b5c7
format.rs https://github.com/RustPython/RustPython/pull/9706/files#diff-43fb8f046cebfbb782eb9a4c87fc7c9eb590451c182695489c6070dc7f881b4f
crates/common/src/format.rshttps://github.com/RustPython/RustPython/pull/9706/files#diff-47d8fa943b6ea1840ae9d06a3785a14c7a57610a113e4a7958709acb47e87e4c
View file https://github.com/youknowone/RustPython/blob/d07694f1f09a43d7e3fda2355fd9b667d4c20265/crates/common/src/format.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9706/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9706/files#diff-47d8fa943b6ea1840ae9d06a3785a14c7a57610a113e4a7958709acb47e87e4c
https://github.com/RustPython/RustPython/pull/9706/files#diff-47d8fa943b6ea1840ae9d06a3785a14c7a57610a113e4a7958709acb47e87e4c
https://github.com/RustPython/RustPython/pull/9706/files#diff-47d8fa943b6ea1840ae9d06a3785a14c7a57610a113e4a7958709acb47e87e4c
https://github.com/RustPython/RustPython/pull/9706/files#diff-47d8fa943b6ea1840ae9d06a3785a14c7a57610a113e4a7958709acb47e87e4c
https://github.com/RustPython/RustPython/pull/9706/files#diff-47d8fa943b6ea1840ae9d06a3785a14c7a57610a113e4a7958709acb47e87e4c
https://github.com/RustPython/RustPython/pull/9706/files#diff-47d8fa943b6ea1840ae9d06a3785a14c7a57610a113e4a7958709acb47e87e4c
https://github.com/RustPython/RustPython/pull/9706/files#diff-47d8fa943b6ea1840ae9d06a3785a14c7a57610a113e4a7958709acb47e87e4c
crates/host_env/src/cert_store.rshttps://github.com/RustPython/RustPython/pull/9706/files#diff-9cd251dd5f7516dd9986abed6433e7f621ba3dfe6f5b7aef2c6f29b914ca55ac
View file https://github.com/youknowone/RustPython/blob/d07694f1f09a43d7e3fda2355fd9b667d4c20265/crates/host_env/src/cert_store.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9706/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9706/files#diff-9cd251dd5f7516dd9986abed6433e7f621ba3dfe6f5b7aef2c6f29b914ca55ac
https://github.com/RustPython/RustPython/pull/9706/files#diff-9cd251dd5f7516dd9986abed6433e7f621ba3dfe6f5b7aef2c6f29b914ca55ac
https://github.com/RustPython/RustPython/pull/9706/files#diff-9cd251dd5f7516dd9986abed6433e7f621ba3dfe6f5b7aef2c6f29b914ca55ac
crates/host_env/src/locale.rshttps://github.com/RustPython/RustPython/pull/9706/files#diff-798379dfb19a491e0c442f8cf72284b966e32d4cce542c2748e0d62e5e3f850f
View file https://github.com/youknowone/RustPython/blob/d07694f1f09a43d7e3fda2355fd9b667d4c20265/crates/host_env/src/locale.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9706/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9706/files#diff-798379dfb19a491e0c442f8cf72284b966e32d4cce542c2748e0d62e5e3f850f
https://github.com/RustPython/RustPython/pull/9706/files#diff-798379dfb19a491e0c442f8cf72284b966e32d4cce542c2748e0d62e5e3f850f
https://github.com/RustPython/RustPython/pull/9706/files#diff-798379dfb19a491e0c442f8cf72284b966e32d4cce542c2748e0d62e5e3f850f
crates/host_env/src/posix.rshttps://github.com/RustPython/RustPython/pull/9706/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
View file https://github.com/youknowone/RustPython/blob/d07694f1f09a43d7e3fda2355fd9b667d4c20265/crates/host_env/src/posix.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9706/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9706/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9706/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
crates/host_env/src/socket.rshttps://github.com/RustPython/RustPython/pull/9706/files#diff-e700a2482e618f0d67e0b1f7bbc4e5eef1bc7da702aaef7fa30d487372d19b72
View file https://github.com/youknowone/RustPython/blob/d07694f1f09a43d7e3fda2355fd9b667d4c20265/crates/host_env/src/socket.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9706/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9706/files#diff-e700a2482e618f0d67e0b1f7bbc4e5eef1bc7da702aaef7fa30d487372d19b72
https://github.com/RustPython/RustPython/pull/9706/files#diff-e700a2482e618f0d67e0b1f7bbc4e5eef1bc7da702aaef7fa30d487372d19b72
https://github.com/RustPython/RustPython/pull/9706/files#diff-e700a2482e618f0d67e0b1f7bbc4e5eef1bc7da702aaef7fa30d487372d19b72
https://github.com/RustPython/RustPython/pull/9706/files#diff-e700a2482e618f0d67e0b1f7bbc4e5eef1bc7da702aaef7fa30d487372d19b72
crates/host_env/src/winsound.rshttps://github.com/RustPython/RustPython/pull/9706/files#diff-197edf8f208d8bbbde011fd270ee0129ce8a59bd76c07377e41206862942ccf8
View file https://github.com/youknowone/RustPython/blob/d07694f1f09a43d7e3fda2355fd9b667d4c20265/crates/host_env/src/winsound.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9706/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9706/files#diff-197edf8f208d8bbbde011fd270ee0129ce8a59bd76c07377e41206862942ccf8
https://github.com/RustPython/RustPython/pull/9706/files#diff-197edf8f208d8bbbde011fd270ee0129ce8a59bd76c07377e41206862942ccf8
https://github.com/RustPython/RustPython/pull/9706/files#diff-197edf8f208d8bbbde011fd270ee0129ce8a59bd76c07377e41206862942ccf8
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9706/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9706/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.