Message411763
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. |
|
Date |
User |
Action |
Args |
2022-01-26 15:54:48 | steve.dower | set | recipients:
+ steve.dower, lemburg, paul.moore, tim.golden, zach.ware, eryksun, miss-islington, sahsariga111 |
2022-01-26 15:54:48 | steve.dower | link | issue45382 messages |
2022-01-26 15:54:48 | steve.dower | create | |
|