summaryrefslogtreecommitdiff
path: root/tox
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2014-05-10 12:17:07 +0200
committerholger krekel <holger@merlinux.eu>2014-05-10 12:17:07 +0200
commit12436d9507ccc778f61cff18d6102cf06edd480f (patch)
tree60f909dcce68cda40fff4c2581083542f271e077 /tox
parentd2e0fceb119d789c8b1777ccaa6b61e9ee8b1bd3 (diff)
parentaaa0d189dc3bc03259b1fd25da1c2ce1dbb0fa8b (diff)
downloadtox-git-12436d9507ccc778f61cff18d6102cf06edd480f.tar.gz
Merged in schlamar/tox (pull request #90)
Limit PYTHONHASHSEED to 1024 on Windows to prevent possible MemoryErrors.
Diffstat (limited to 'tox')
-rw-r--r--tox/_config.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tox/_config.py b/tox/_config.py
index 12ccfa4c..754d9526 100644
--- a/tox/_config.py
+++ b/tox/_config.py
@@ -120,7 +120,8 @@ def prepare_parse(pkgname):
parser.add_argument("--hashseed", action="store",
metavar="SEED", default=None,
help="set PYTHONHASHSEED to SEED before running commands. "
- "Defaults to a random integer in the range 1 to 4294967295. "
+ "Defaults to a random integer in the range [1, 4294967295] "
+ "([1, 1024] on Windows). "
"Passing 'noset' suppresses this behavior.")
parser.add_argument("--force-dep", action="append",
metavar="REQ", default=None,
@@ -199,7 +200,10 @@ def get_homedir():
return None
def make_hashseed():
- return str(random.randint(1, 4294967295))
+ max_seed = 4294967295
+ if sys.platform == 'win32' and sys.version_info < (3, 4):
+ max_seed = 1024
+ return str(random.randint(1, max_seed))
class parseini:
def __init__(self, config, inipath):