Attached Documents

patch (10251578.diff.txt)

patch (10251578.diff.txt)

patch

download

# HG changeset patch
# User Chris Lamb <chris@chris-lamb.co.uk>
# Date 1595238794 -3600
# Mon Jul 20 10:53:14 2020 +0100
# Node ID 14b54287418caba698eca9fceded72e2f8a045ec
# Parent 130d81fb2954d90df7b2783c9589cd2477f7ba29
Make the build reproducible.

diff -r 130d81fb2954 -r 14b54287418c logilab/common/proc.py
--- a/logilab/common/proc.py Fri Mar 20 16:01:10 2020 +0100
+++ b/logilab/common/proc.py Mon Jul 20 10:53:14 2020 +0100
@@ -164,7 +164,9 @@
"""A class checking a process don't use too much memory in a separated
daemonic thread
"""
- def __init__(self, interval, memory_limit, gpid=os.getpid()):
+ def __init__(self, interval, memory_limit, gpid=None):
+ if gpid is None:
+ gpid = os.getpid()
Thread.__init__(self, target=self._run, name="Test.Sentinel")
self.memory_limit = memory_limit
self._stop = Event()
diff -r 130d81fb2954 -r 14b54287418c logilab/common/pytest.py
--- a/logilab/common/pytest.py Fri Mar 20 16:01:10 2020 +0100
+++ b/logilab/common/pytest.py Mon Jul 20 10:53:14 2020 +0100
@@ -187,8 +187,10 @@
return namespace.get('CustomPyTester', PyTester)

-def project_root(parser, projdir=os.getcwd()):
+def project_root(parser, projdir=None):
"""try to find project's root and add it to sys.path"""
+ if projdir is None:
+ projdir = os.getcwd()
previousdir = curdir = osp.abspath(projdir)
testercls = PyTester
conf_file_path = osp.join(curdir, CONF_FILE)