bpo-30581: Windows: os.cpu_count() returns wrong number of processors by crwilcox · Pull Request #2934 · python/cpython (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still requires a NEWS.d entry, and the documentation should be updated to indicate:

I don't believe the latter point is a problem - the current behaviour of the API has the same issue. This falls into the same category as sys.getwindowsversion() reporting what the operating system provides, even when this is incorrect (e.g. Python 2.7 will always return 6.2 even on Windows 10, and the OS also shims certain APIs to behave like the previous version). Since the process is limited by the OS to only 32 CPUs, the os module API should reflect that limit.