GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-152433: Windows: allow build ``mimalloc`` for UWP by thexai · Pull Request #152477 · python/cpython

Conversation

@thexai

@thexai thexai commented Jun 28, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

All changes are trivial:

Remove some run-time dynamic linking and replace some LoadLibrary with LoadPackagedLibrary for UWP.

  • Issue: Windows: improve compatibility to build for UWP / Xbox #152433

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app

bedevere-app Bot commented Jun 28, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting review label Jun 28, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Jun 28, 2026
Windows: improve compatibility to build for UWP / Xbox #152433
Open
@thexai
thexai force-pushed the uwp-prim.c branch from 58add09 to 117bf4a Compare June 30, 2026 14:13
@bedevere-app

bedevere-app Bot commented Jun 30, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thexai
thexai force-pushed the uwp-prim.c branch from 117bf4a to cc9e3c0 Compare July 4, 2026 18:07
@thexai thexai changed the title gh-152433: Windows: allow build prim.c for UWP gh-152433: Windows: allow build prim.c for UWP Jul 4, 2026
chris-eibl
chris-eibl reviewed Jul 6, 2026
View reviewed changes
Comment thread Misc/NEWS.d/next/Windows/2026-07-04-20-07-28.gh-issue-152433.Kk3gZm.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Jul 6, 2026

Copy link
Copy Markdown
Member

LGTM considering @zooba's #152433 (comment).

cc @colesbury who tracks mimalloc differences from upstream in #113141.

zooba reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zooba

zooba commented Jul 14, 2026

Copy link
Copy Markdown
Member

This change looks fine, if we're maintaining the sources separately. If we're trying to track upstream closely, then we'll need them to make the change first. That's @colesbury's call, it seems.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zware

zware commented Jul 18, 2026

Copy link
Copy Markdown
Member

Our copy of mimalloc is fairly out of date at this point, and does carry several patches against the equivalent upstream version. Regardless, I think we should be sure that this is done upstream before we merge it ourselves, or it's likely to be lost if and when we update our copy -- ideally, when we do such an update we can do it without carrying any patches forward.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@colesbury colesbury mentioned this pull request Jul 19, 2026
Mimalloc differences from upstream #113141
Open
@colesbury

colesbury commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Yeah, if it's not CPython specific, please also open a PR in upstream mimalloc.

zware reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thexai

thexai commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Patch submitted to upstream (microsoft/mimalloc#1340).

Note is a bit different because GetNumaHighestNodeNumber thing is already addressed in current version and only replaced LoadLibrary for better code portability (to very old Windows versions).

I think PR can still be merged here because it doesn't do any harm and in the future it will be overwritten by whatever is upstream.

chris-eibl reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thexai thexai closed this Jul 24, 2026
@thexai thexai reopened this Jul 24, 2026
zooba
zooba reviewed Jul 24, 2026
View reviewed changes
Comment thread Objects/mimalloc/prim/windows/prim.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@thexai

thexai commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

The fix has been merged in the mimalloc dev branch:
microsoft/mimalloc@c9c86c7

chris-eibl reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Aug 1, 2026

Copy link
Copy Markdown
Member

May I trouble you to make this PR look closer to the diff that has been merged upstream?

For instance, there GetProcessMemoryInfo is still only loaded on demand - now via mi_win_loadlibrary(TEXT("psapi.dll")), but this PR currently removes the loading on demand.

thexai reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thexai
pythongh-152433: Windows: allow build mimalloc for UWP
37d2d07
@thexai
thexai force-pushed the uwp-prim.c branch from 059be97 to 37d2d07 Compare August 1, 2026 09:15
@thexai

thexai commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

PR updated with almost same commit that upstream.

chris-eibl reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chris-eibl
chris-eibl approved these changes Aug 1, 2026
View reviewed changes

@chris-eibl chris-eibl left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @thexai!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Aug 1, 2026
@thexai thexai changed the title gh-152433: Windows: allow build prim.c for UWP gh-152433: Windows: allow build mimalloc for UWP Aug 1, 2026
@thexai
Fix missing header
d86d607
@thexai

thexai commented Aug 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

I tested the updated PR on Xbox and not even compiles due a missing header 😒

PR updated with the fix.

(the header was already present in the first version of the PR)

chris-eibl reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl chris-eibl added the skip news label Aug 2, 2026
@thexai
LoadLibrary can be used on UWP for system libs (from Windows SDK 10.0…
f7f3dd9
….22000.0)
@thexai

thexai commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Finally found that LoadLibrary can be used on UWP for system libs from Windows SDK 10.0.22000.0.

And most changes are not necessary 😊

chris-eibl reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Sep 5, 2026

Copy link
Copy Markdown
Member

This PR is sitting for a while now and lgtm. If nobody objects, I'm gonna merge end of next week at the latest.

thexai and zooba reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zooba
zooba merged commit 8b2433a into python:main Sep 7, 2026
50 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 7, 2026
@zooba

zooba commented Sep 7, 2026

Copy link
Copy Markdown
Member

Looked good to me too, so figured no reason to wait

chris-eibl reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thexai
thexai deleted the uwp-prim.c branch September 9, 2026 14:00
clin1234 pushed a commit to clin1234/cpython that referenced this pull request Sep 12, 2026
@thexai @clin1234
pythongh-152433: Allow building mimalloc for Windows UWP (pythonGH-15…
3b631b1
…2477)
daanx added a commit to microsoft/mimalloc that referenced this pull request Oct 8, 2026
@daanx
UWP compilation, upstream of python/cpython#152477 (and python/cpytho…
7e767bd
…n#113141)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@zooba zooba zooba left review comments
@chris-eibl chris-eibl chris-eibl approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@thexai @chris-eibl @zooba @zware @colesbury
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.