René's URL Explorer Experiment


Title: Align Windows mmap ownership and resize with CPython by youknowdot · Pull Request #9847 · RustPython/RustPython · GitHub

Open Graph Title: Align Windows mmap ownership and resize with CPython by youknowdot · Pull Request #9847 · RustPython/RustPython

X Title: Align Windows mmap ownership and resize with CPython by youknowdot · Pull Request #9847 · RustPython/RustPython

Description: Summary Make Windows mmap creation and resizing follow CPython 3.15's native mapping lifecycle rather than splitting named mappings and ordinary mappings between two implementations. Use the same Win32 mapping path for file-backed, named, anonymous and untracked mappings. Retain exactly the file handle needed by trackfd=True, including for named mappings; use the duplicate after acquiring it. Let CreateFileMappingW enforce access and extend files. Apply anonymous offsets too, and preserve the Windows constructor's CRT cursor-reset behavior. Port the named-map sharing check, resize/remap recovery, name-reuse race detection and anonymous-copy ordering from Modules/mmapmodule.c. Keep the cursor unchanged when shrinking. Accept __index__ in resize on Linux and Windows, preserving signed-size overflow diagnostics. Close retained file handles even after a resize has invalidated the mapping. Remove the obsolete Linux flush-alignment skip after running that test successfully against the existing native msync path. Re-enable the Windows MmapTests class. The first Windows CI run confirmed 15 unexpected successes; remove exactly those obsolete expected-failure markers. The POSIX-only test’s remaining Windows marker is unchanged. The added regression cases live in the existing stdlib_mmap.py snippet. They cover gaps in the stdlib tests: index conversion/reentrancy, the cursor after shrink, named file size and successful named resize, anonymous offset handling, and explicit close after a failed resize. No WASI mmap implementation changes. Validation CPython 3.15.0: complete stdlib_mmap.py snippet passes on Linux. CPython 3.15.0: -m test test_mmap passes (55 tests, 7 skipped). cargo check -p rustpython-host_env --target x86_64-pc-windows-gnu passes. Windows GNU host crate Clippy with -D warnings passes. Linux modified RustPython release build and complete stdlib_mmap.py snippet pass. Modified RustPython -m test test_mmap passes (55 tests, 7 skipped). All applicable pre-commit hooks and git diff --check pass. Independent code review checked Win32 ownership and resize rollback against CPython 3.15; its findings were addressed and rechecked. Windows CI also ran the complete stdlib_mmap.py snippet successfully under both CPython and RustPython, including the Windows-specific regression cases. Windows runtime evidence from head efb849e90: Windows CI executed test_mmap (55 tests, 7 skipped) and failed only because 15 tests unexpectedly passed. Those exact 15 markers are removed in the follow-up commit; no implementation changes were needed. The latest head's CI is pending. No Windows performance measurement has been performed. Summary by CodeRabbit New Features Windows memory mappings can now be resized, including named and anonymous mappings. File-backed mappings support zero-length requests that derive their size from the file, with validation for empty files and invalid offsets. Bug Fixes Resize arguments now support index-compatible values and report errors for negative or out-of-range sizes. Resizing and flushing mappings now handle Windows-specific mapping behavior more consistently.

Open Graph Description: Summary Make Windows mmap creation and resizing follow CPython 3.15's native mapping lifecycle rather than splitting named mappings and ordinary mappings between two implementations. Use the s...

X Description: Summary Make Windows mmap creation and resizing follow CPython 3.15's native mapping lifecycle rather than splitting named mappings and ordinary mappings between two implementations. Use t...

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

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:ebc23a66-3ad1-1a9b-3656-6f6d7415fed8
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBA5E:2270F4:301DB28:3FD990D:6B01DE5D
html-safe-noncec93f93819187d7cc13021aee47dbad33942d2637136a34833097b54eb6ab77a5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTVFOjIyNzBGNDozMDFEQjI4OjNGRDk5MEQ6NkIwMURFNUQiLCJ2aXNpdG9yX2lkIjoiMjA2Njg0NDk0MzAyODE4MjYyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca6c9b7b73596480029f6349b0cae5fe0c243dca7c06f4173dc36cdff8ee87686
hovercard-subject-tagpull_request:5320118568
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/9847/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 Make Windows mmap creation and resizing follow CPython 3.15's native mapping lifecycle rather than splitting named mappings and ordinary mappings between two implementations. Use the s...
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/9847/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9847%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%2F9847%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/9847/files
Reloadhttps://github.com/RustPython/RustPython/pull/9847/files
Reloadhttps://github.com/RustPython/RustPython/pull/9847/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/windows-mmap-lifecyclehttps://github.com/youknowdot/RustPython/tree/fix/windows-mmap-lifecycle
Conversation 6 https://github.com/RustPython/RustPython/pull/9847
Commits 3 https://github.com/RustPython/RustPython/pull/9847/commits
Checks 29 https://github.com/RustPython/RustPython/pull/9847/checks
Files changed https://github.com/RustPython/RustPython/pull/9847/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9847/files
Align Windows mmap ownership and resize with CPython https://github.com/RustPython/RustPython/pull/9847/files#top
Show all changes 3 commits https://github.com/RustPython/RustPython/pull/9847/files
7fe7d7b Align Windows mmap ownership and resize with CPython codex Nov 15, 2026 https://github.com/RustPython/RustPython/pull/9847/commits/7fe7d7be4511d768ad337710e2d0cdd3815f240a
efb849e Restore the passing native mmap flush alignment test codex Nov 15, 2026 https://github.com/RustPython/RustPython/pull/9847/commits/efb849e904a7109284f2818b2f586ef0ae416c4c
5276794 Restore mmap tests confirmed passing by Windows CI codex Nov 15, 2026 https://github.com/RustPython/RustPython/pull/9847/commits/5276794061025e98f4433e16cc4fb5378004c40f
Clear filters https://github.com/RustPython/RustPython/pull/9847/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9847/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9847/files
test_mmap.py https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
mmap.rs https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
mmap.rs https://github.com/RustPython/RustPython/pull/9847/files#diff-f019287585dfa476feb78beedd3e67b25292c5da5514fccbff2981bd8e0dc0df
stdlib_mmap.py https://github.com/RustPython/RustPython/pull/9847/files#diff-68d781e93651839fa75072bfa0c3f33a85a18e1f41c9e6b2e0f06c05b055e45b
Lib/test/test_mmap.pyhttps://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
View file https://github.com/youknowdot/RustPython/blob/5276794061025e98f4433e16cc4fb5378004c40f/Lib/test/test_mmap.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9847/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
https://github.com/RustPython/RustPython/pull/9847/files#diff-72134ea902824c38771f083192b3f7e3cee6d53476fee0fdc5c25b95421b7cdb
crates/host_env/src/mmap.rshttps://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
View file https://github.com/youknowdot/RustPython/blob/5276794061025e98f4433e16cc4fb5378004c40f/crates/host_env/src/mmap.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9847/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
chatgpt-codex-connectorhttps://github.com/apps/chatgpt-codex-connector
Nov 15, 2026https://github.com/RustPython/RustPython/pull/9847/files#r4577572481
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://camo.githubusercontent.com/0854bfc38139c0d2b58a9d5d71f5ad92840cf0c17144621e462b474041793354/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50322d79656c6c6f773f7374796c653d666c6174
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9847/files
https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
https://github.com/RustPython/RustPython/pull/9847/files#diff-839626f82496e1588d677da9465e296b82390e27a0a55852c866b6dda198d987
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9847/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9847/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.