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 — Windows: improve compatibility to build for UWP / Xbox · Issue #152433 · python/cpython

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

New issue
Copy link
New issue
Copy link
Open
Open
Windows: improve compatibility to build for UWP / Xbox#152433
Copy link
Labels
OS-windowsbuildThe build process and cross-buildThe build process and cross-buildtype-featureA feature request or enhancementA feature request or enhancement

Description

@thexai
thexai
opened on Jun 27, 2026
Issue body actions

Feature or enhancement

Proposal:

  • Add alternative UWP API functionality when available.
  • Modernize the Windows code when there are alternatives that are also compatible with UWP.
  • Add additional guards for Windows code that not builds for UWP.

The final goal is able to build for Xbox and reduce the patches required in Kodi --> Upstream some generic UWP patches here.

I propose upload small patches geared towards specific targets and always keeping current Windows functionality untouched.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

  • gh-152433: Windows: use GetFileSizeEx instead of GetFileSize #152383
  • gh-152433: Windows: enable mmapmodule for UWP #152473
  • gh-152433: Windows: allow build mimalloc for UWP #152477
  • gh-152433: Windows: implement os.cpu_count() for UWP #152479
  • gh-152433: Windows: allow build socketmodule for UWP #152601
  • gh-152433: Windows: fix errors in sys.getwindowsversion() for UWP build #152604
  • gh-152433 Windows: faulthandler.c allow build in UWP #152688
  • gh-152433: Windows: allow build ceval.c for UWP #152689
  • gh-152433: Windows: _winapi.c implement GetVersion() UWP alternative #152694
  • gh-152433: Windows: _ssl module: improve UWP compatibility #152791
  • gh-152433: Windows: _ctypes module: improve UWP compatibility #152792
  • gh-152433: Windows: _uuid module: improve UWP compatibility #152793
  • gh-152433: Windows: make dynload_win.c UWP compatible #152797
  • gh-152433: Windows: _winapi module: improve UWP compatibility #152962
  • gh-152433: Windows: allow posixmodule.c to build for Windows UWP #152998
  • gh-152433: Windows: use CreateFile2 on Windows UWP build #153021
  • gh-152433: Windows: allow build overlapped.c for UWP #153036
  • [3.15] gh-152433: Allow _ssl module to build for Windows UWP API set (GH-152791) #153216
  • gh-152433: Windows: modernize and refactor fileutils to allow build for Windows UWP #153700
  • gh-152433: Windows: do not use _syscmd_ver() on UWP build #154642
  • gh-152433: Windows: fix ctypes error in UWP build #154700
  • gh-152433: Windows: change winreg to conditional import for UWP compatibility #154918
  • gh-152433: Windows: use LoadLibrary in UWP for system libs #156972
  • gh-152433: Make ctypes callbacks work on Windows UWP builds #161539
  • gh-152433: Windows: Not use LoadPackagedLibrary for mimalloc (UWP build) #161546

Activity

Next
  1. thexai
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Jun 27, 2026
  2. picnixz
    added
    OS-windows
    buildThe build process and cross-buildThe build process and cross-build
    on Jun 27, 2026
  3. picnixz commented on Jun 27, 2026

    @picnixz
    picnixz
    on Jun 27, 2026
    Member
    More actions

    cc @zooba @chris-eibl

  4. chris-eibl commented on Jun 27, 2026

    @chris-eibl
    chris-eibl
    on Jun 27, 2026
    Member
    More actions

    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.

  5. thexai commented on Jun 27, 2026

    @thexai
    thexai
    on Jun 27, 2026
    ContributorAuthor
    More actions

    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.

    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

  6. maxbachmann commented on Jun 27, 2026

    @maxbachmann
    maxbachmann
    on Jun 27, 2026
    Contributor
    More actions

    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.

  7. thexai
    added 8 commits that reference this issue on Jun 28, 2026

    pythongh-152433: Windows: enable mmapmodule for UWP

    c6300cb

    pythongh-152433: Windows: implement os.cpu_count() for UWP

    d96aa51

    pythongh-152433: Windows: Use GetFileSizeEx instead of GetFileSize

    8b9c4cb

    pythongh-152433: Windows: implement os.cpu_count() for UWP

    e0e02b1

    pythongh-152433: Windows: Use GetFileSizeEx instead of GetFileSize

    5b828bc

    pythongh-152433: Windows: Use GetFileSizeEx instead of GetFileSize

    2791f86

    pythongh-152433: Windows: enable mmapmodule for UWP

    4eda942

    pythongh-152433: Windows: Use GetFileSizeEx instead of GetFileSize

    7952170
  8. 202 remaining items

    Load more actions
  9. clin1234
    added 2 commits that reference this issue on Sep 12, 2026

    pythongh-152433: Windows: make ``dynload_win.c`` UWP compatible (pyth…

    789a37a

    pythongh-152433: Windows: change ``winreg`` to conditional import for…

    4c12b5f
  10. johnslavik
    added 8 commits that reference this issue on Sep 14, 2026

    pythongh-152433: Use regular LoadLibrary in UWP for Windows system li…

    4cd7afc

    pythongh-152433: Windows: allow build socketmodule for UWP (python#15…

    5e8808b

    pythongh-152433: Windows: allow build ``ceval.c`` for UWP (python#152689

    5bf9d6b

    pythongh-152433: Windows: ``_ctypes`` module: improve UWP compatibili…

    16cda6d

    pythongh-152433: Windows: ``_winapi`` module: improve UWP compatibili…

    89a279d

    pythongh-152433: Windows: allow build ``overlapped.c`` for UWP (pytho…

    fcb8d9b

    pythongh-152433: Windows: make ``dynload_win.c`` UWP compatible (pyth…

    cd0a288

    pythongh-152433: Windows: change ``winreg`` to conditional import for…

    1394465
  11. thexai
    added a commit that references this issue on Sep 17, 2026

    pythongh-152433: Windows: fix ``ctypes`` MemoryError in UWP build

    3c4f753
  12. zooba
    added a commit that references this issue on Sep 17, 2026

    gh-152433: Fix ctypes import error on Windows UWP builds (GH-154700)

    0f00aef
  13. thexai
    added a commit that references this issue on Sep 19, 2026

    pythongh-152433: Windows: use ``CreateFile2`` on Windows UWP build

    e53c111
  14. thexai
    added 2 commits that reference this issue on Nov 7, 2026

    pythongh-152433: Make ctypes callbacks work on Windows UWP builds

    de86e82

    pythongh-152433: Windows: use ``CreateFile2`` on Windows UWP build

    1a0ca4e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsbuildThe build process and cross-buildThe build process and cross-buildtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.