This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients eryksun, lemburg, miss-islington, paul.moore, sahsariga111, steve.dower, tim.golden, zach.ware
Date 2022-01-26.15:54:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <f336f2ad-32b5-5561-81b3-42f3b6e4ac04@python.org>
In-reply-to <1643159878.27.0.265101022361.issue45382@roundup.psfhosted.org>
Content
sys.getwindowsversion() is affected to Microsoft's minimal rebuilds of 
OS components causing core DLLs to have older versions than the release, 
and also to compatibility modes that may report earlier versions if API 
behaviour is being emulated.

The best way for us to use WMI is to call it directly. There are native 
APIs to access it and retrieve the data directly. It's just nobody has 
written it yet.

Calling out to Powershell needs to account for cases where Powershell is 
not present, is disabled/blocked/limited, or is a different version. We 
can rely on the native APIs (at least, if they fail, there's nothing 
better we could possibly have done).

WMI is essentially the Windows equivalent of the platform module, so 
there's no reason all the APIs in platform.py shouldn't use it, and 
every reason that sys/os *shouldn't* use it.
History
Date User Action Args
2022-01-26 15:54:48steve.dowersetrecipients: + steve.dower, lemburg, paul.moore, tim.golden, zach.ware, eryksun, miss-islington, sahsariga111
2022-01-26 15:54:48steve.dowerlinkissue45382 messages
2022-01-26 15:54:48steve.dowercreate