File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,8 +115,11 @@ def cpu_count():
115115 except (ValueError , KeyError ):
116116 num = 0
117117 elif 'bsd' in sys .platform or sys .platform == 'darwin' :
118+ comm = '/sbin/sysctl -n hw.ncpu'
119+ if sys .platform == 'darwin' :
120+ comm = '/usr' + comm
118121 try :
119- with os .popen ('sysctl -n hw.ncpu' ) as p :
122+ with os .popen (comm ) as p :
120123 num = int (p .read ())
121124 except ValueError :
122125 num = 0
Original file line number Diff line number Diff line change @@ -624,6 +624,7 @@ Tim Northover
624624Joe Norton
625625Neal Norwitz
626626Michal Nowikowski
627+ Steffen Daode Nurpmeso
627628Nigel O'Brian
628629Kevin O'Connor
629630Tim O'Malley
Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ Library
4343- Issue #11133: fix two cases where inspect.getattr_static can trigger code
4444 execution. Patch by Daniel Urban.
4545
46+ - Issue #11569: use absolute path to the sysctl command in multiprocessing to
47+ ensure that it will be found regardless of the shell PATH. This ensures
48+ that multiprocessing.cpu_count works on default installs of MacOSX.
49+
4650- Issue #11501: disutils.archive_utils.make_zipfile no longer fails if zlib is
4751 not installed. Instead, the zipfile.ZIP_STORED compression is used to create
4852 the ZipFile. Patch by Natalia B. Bidart.
You can’t perform that action at this time.
0 commit comments