You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: improve compatibility to build for UWP / Xbox #152433
The first one was extreme easy, there will be more complicated ones... but that's the idea :)
I believe some previous work was for the MS_WINDOWS_GAMES partition, but in my case I'm going to focus on the MS_WINDOWS_APP partition (Xbox Apps, not Games).
One thing that will complicate the patches quite a bit is that MS_WINDOWS_APP is defined for both Desktop and UWP and it creates a lot of complication and confusion in the #ifdef blocks, perhaps at some point we will have to decide whether to change this, but for the moment I'm going to try to avoid it.
In my private patches these definitions are exclusive but this requires modifications for the main branch.
Yes my previous work was for xbox games. We are currently on 3.13 with all our patches for the xbox support upstreamed.
However we don't build some of the "freestanding" modules that we don't use -> not sure they ever compiled. For other app partitions I didn't do any testing back then.
Activity
picnixz commentedon Jun 27, 2026
cc @zooba @chris-eibl
chris-eibl commentedon Jun 27, 2026
Hm, this first PR lgtm and no objections if the following ones are similar.
Adding @maxbachmann for visibility, who did similar Xbox PRs in the past.
thexai commentedon Jun 27, 2026
The first one was extreme easy, there will be more complicated ones... but that's the idea :)
I believe some previous work was for the
MS_WINDOWS_GAMESpartition, but in my case I'm going to focus on theMS_WINDOWS_APPpartition (Xbox Apps, not Games).One thing that will complicate the patches quite a bit is that
MS_WINDOWS_APPis defined for both Desktop and UWP and it creates a lot of complication and confusion in the#ifdefblocks, perhaps at some point we will have to decide whether to change this, but for the moment I'm going to try to avoid it.In my private patches these definitions are exclusive but this requires modifications for the main branch.
For reference:
https://github.com/thexai/cpython/blob/6e8b0fc79f676d869a14370b11f57358d7a1621a/PC/pyconfig.h#L91-L97
And full Kodi patches (branch 3.14): https://github.com/thexai/cpython/tree/kodi/3.14.6
maxbachmann commentedon Jun 27, 2026
Yes my previous work was for xbox games. We are currently on 3.13 with all our patches for the xbox support upstreamed.
However we don't build some of the "freestanding" modules that we don't use -> not sure they ever compiled. For other app partitions I didn't do any testing back then.
pythongh-152433: Windows: enable mmapmodule for UWP
pythongh-152433: Windows: implement os.cpu_count() for UWP
pythongh-152433: Windows: Use GetFileSizeEx instead of GetFileSize
pythongh-152433: Windows: implement os.cpu_count() for UWP
pythongh-152433: Windows: Use GetFileSizeEx instead of GetFileSize
pythongh-152433: Windows: Use GetFileSizeEx instead of GetFileSize
pythongh-152433: Windows: enable mmapmodule for UWP
pythongh-152433: Windows: Use GetFileSizeEx instead of GetFileSize
200 remaining items
pythongh-152433: Windows: ``_winapi`` module: improve UWP compatibili…
pythongh-152433: Windows: allow build ``overlapped.c`` for UWP (pytho…
pythongh-152433: Windows: make ``dynload_win.c`` UWP compatible (pyth…
pythongh-152433: Windows: change ``winreg`` to conditional import for…
pythongh-152433: Use regular LoadLibrary in UWP for Windows system li…
pythongh-152433: Windows: allow build socketmodule for UWP (python#15…
pythongh-152433: Windows: allow build ``ceval.c`` for UWP (python#152689
pythongh-152433: Windows: ``_ctypes`` module: improve UWP compatibili…
pythongh-152433: Windows: ``_winapi`` module: improve UWP compatibili…
pythongh-152433: Windows: allow build ``overlapped.c`` for UWP (pytho…
pythongh-152433: Windows: make ``dynload_win.c`` UWP compatible (pyth…
pythongh-152433: Windows: change ``winreg`` to conditional import for…
pythongh-152433: Windows: fix ``ctypes`` MemoryError in UWP build
gh-152433: Fix ctypes import error on Windows UWP builds (GH-154700)
pythongh-152433: Windows: use ``CreateFile2`` on Windows UWP build