Closed as not planned
Description
Bug report
Many python packages make calls to platform.system() or platform.machine() during the import. These functions call the generic platform.uname() . The result of platform.uname() is cached, but the first invocation is slow on windows (>100ms), adding 100ms import time to these packages. The slow part on windows is def _syscmd_ver which starts an external process.
Can we replace _syscmd_ver with a faster version (e.g. calling the windows api directly instead of using a external process)? Or refactor the platform.system() and platform.machine() functions to only retrieve the information required and not the general uname?
Your environment
- CPython versions tested on: 3.11
- Operating system and architecture: Windows

