Comments
Patch
@@ -53,7 +53,7 @@
raise error.Abort(_('number of cpus must be an integer'))
return min(max(countcpus(), 4), 32)
-if pycompat.osname == 'posix':
+if pycompat.isposix:
_startupcost = 0.01
else:
_startupcost = 1e30
@@ -313,7 +313,7 @@
return memoryview(sliceable)[offset:offset + length]
return memoryview(sliceable)[offset:]
-closefds = pycompat.osname == 'posix'
+closefds = pycompat.isposix
_chunksize = 4096
@@ -83,7 +83,7 @@
home = encoding.environ.get('HOME')
if home:
return os.path.join(home, 'Library', 'Caches', longname)
- elif pycompat.osname == 'posix':
+ elif pycompat.isposix:
path = encoding.environ.get('XDG_CACHE_HOME')
if path:
return os.path.join(path, longname)