diff options
author | Donghee Na <donghee.na@python.org> | 2023-10-10 10:00:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-10 10:00:09 (GMT) |
commit | 0362cbf908aff2b87298f8a9422e7b368f890071 (patch) | |
tree | 7d5ae0e1f44801fe2102cb783938c60ef99b7ae4 /Doc/whatsnew | |
parent | 5aa62a8de15212577a13966710b3aede46e93824 (diff) | |
download | cpython-0362cbf908aff2b87298f8a9422e7b368f890071.zip cpython-0362cbf908aff2b87298f8a9422e7b368f890071.tar.gz cpython-0362cbf908aff2b87298f8a9422e7b368f890071.tar.bz2 |
gh-109595: Add -Xcpu_count=<n> cmdline for container users (#109667)
---------
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.13.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 2fe1494..9a24c1f 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -188,6 +188,12 @@ os :const:`os.TFD_TIMER_ABSTIME`, and :const:`os.TFD_TIMER_CANCEL_ON_SET` (Contributed by Masaru Tsuchiyama in :gh:`108277`.) +* :func:`os.cpu_count` and :func:`os.process_cpu_count` can be overridden through + the new environment variable :envvar:`PYTHON_CPU_COUNT` or the new command-line option + :option:`-X cpu_count <-X>`. This option is useful for users who need to limit + CPU resources of a container system without having to modify the container (application code). + (Contributed by Donghee Na in :gh:`109595`) + pathlib ------- |