mirror of
https://github.com/python/cpython.git
synced 2024-11-28 12:31:14 +08:00
Merge with 3.1
This commit is contained in:
commit
f0edd1b86d
@ -115,8 +115,11 @@ def cpu_count():
|
||||
except (ValueError, KeyError):
|
||||
num = 0
|
||||
elif 'bsd' in sys.platform or sys.platform == 'darwin':
|
||||
comm = '/sbin/sysctl -n hw.ncpu'
|
||||
if sys.platform == 'darwin':
|
||||
comm = '/usr' + comm
|
||||
try:
|
||||
with os.popen('sysctl -n hw.ncpu') as p:
|
||||
with os.popen(comm) as p:
|
||||
num = int(p.read())
|
||||
except ValueError:
|
||||
num = 0
|
||||
|
@ -624,6 +624,7 @@ Tim Northover
|
||||
Joe Norton
|
||||
Neal Norwitz
|
||||
Michal Nowikowski
|
||||
Steffen Daode Nurpmeso
|
||||
Nigel O'Brian
|
||||
Kevin O'Connor
|
||||
Tim O'Malley
|
||||
|
@ -43,6 +43,10 @@ Library
|
||||
- Issue #11133: fix two cases where inspect.getattr_static can trigger code
|
||||
execution. Patch by Daniel Urban.
|
||||
|
||||
- Issue #11569: use absolute path to the sysctl command in multiprocessing to
|
||||
ensure that it will be found regardless of the shell PATH. This ensures
|
||||
that multiprocessing.cpu_count works on default installs of MacOSX.
|
||||
|
||||
- Issue #11501: disutils.archive_utils.make_zipfile no longer fails if zlib is
|
||||
not installed. Instead, the zipfile.ZIP_STORED compression is used to create
|
||||
the ZipFile. Patch by Natalia B. Bidart.
|
||||
|
Loading…
Reference in New Issue
Block a user