]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-109649: Add os.process_cpu_count() function (#109907)
authorVictor Stinner <vstinner@python.org>
Sat, 30 Sep 2023 22:12:51 +0000 (00:12 +0200)
committerGitHub <noreply@github.com>
Sat, 30 Sep 2023 22:12:51 +0000 (00:12 +0200)
commitc81521020d643b4a5183098470ef7e6470facefb
tree9679b712dd9f4bfa003d6c8a0b188d34cf015025
parent2c234196ea30b9da370780204ed9068f1fb134c6
gh-109649: Add os.process_cpu_count() function (#109907)

* Refactor os_sched_getaffinity_impl(): move variable definitions to
  their first assignment.
* Fix test_posix.test_sched_getaffinity(): restore the old CPU mask
  when the test completes!
* Doc: Specify that os.cpu_count() counts *logicial* CPUs.
* Doc: Specify that os.sched_getaffinity(0) is related to the calling
  thread.
Doc/library/os.rst
Doc/whatsnew/3.13.rst
Lib/os.py
Lib/test/test_os.py
Lib/test/test_posix.py
Misc/NEWS.d/next/Library/2023-09-21-16-21-19.gh-issue-109649.YYCjAF.rst [new file with mode: 0644]
Modules/clinic/posixmodule.c.h
Modules/posixmodule.c