Skip to content

sys.getwindowsversion can fail without setting an exception on some WinAPI partitions #133580

Closed
@maxbachmann

Description

@maxbachmann

Bug report

Bug description:

_sys_getwindowsversion_from_kernel32 doesn't set an exception when it's called for WinAPI partitions that don't support the call. This leads to sys.getwindowsversion failing without setting an exception.

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Linked PRs

Activity

added a commit that references this issue on May 14, 2025

gh-133580: Add missing exception to _sys_getwindowsversion_from_kerne…

5d118d0
zooba

zooba commented on May 14, 2025

@zooba
Member

Thanks!

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-windowsinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      `sys.getwindowsversion` can fail without setting an exception on some WinAPI partitions · Issue #133580 · python/cpython

      Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

      Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant