From 4166551afddf477b3fcc56ce7e964eaec455554b Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Wed, 23 Jan 2019 14:01:37 -0500 Subject: [PATCH 1/3] Bump dependency to Twisted 16.6 and add conch extra This automatically brings in the bcrypt dependency coming along with a forthcoming Twisted release. --- src/allmydata/_auto_deps.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/allmydata/_auto_deps.py b/src/allmydata/_auto_deps.py index 35503bd8b..550d430ba 100644 --- a/src/allmydata/_auto_deps.py +++ b/src/allmydata/_auto_deps.py @@ -68,9 +68,15 @@ install_requires = [ # * Twisted-16.1.0 fixes https://twistedmatrix.com/trac/ticket/8223, # which otherwise causes test_system to fail (DirtyReactorError, due to # leftover timers) - # * Twisted-16.4.0 instroduces twisted.trial which is needed for coverage - # testing - "Twisted[tls] >= 16.4.0", + # * Twisted-16.4.0 introduces `python -m twisted.trial` which is needed + # for coverage testing + + # * Twisted 16.6.0 drops the undesirable gmpy dependency from the conch + # extra, letting us use that extra instead of trying to duplicate its + # dependencies here. Twisted[conch] >18.7 introduces a dependency on + # bcrypt. It is nice to avoid that if the user ends up with an older + # version of Twisted. That's hard to express except by using the extra. + "Twisted[tls,conch] >= 16.6.0", # We need Nevow >= 0.11.1 which can be installed using pip. "Nevow >= 0.11.1", From 49cbdf8a10599a51c22afea36a2163756fe1c2f6 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Wed, 23 Jan 2019 14:24:36 -0500 Subject: [PATCH 2/3] news fragment --- newsfragments/2957.installation | 1 + 1 file changed, 1 insertion(+) create mode 100644 newsfragments/2957.installation diff --git a/newsfragments/2957.installation b/newsfragments/2957.installation new file mode 100644 index 000000000..c3d2dff9a --- /dev/null +++ b/newsfragments/2957.installation @@ -0,0 +1 @@ +Tahoe-LAFS now depends on Twisted 16.6 or newer. \ No newline at end of file From 5ed375b145f00bcb635e4520a375c748eff9e902 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Wed, 23 Jan 2019 14:58:44 -0500 Subject: [PATCH 3/3] Add more complexity to the package sanity checking Support comma-separated lists of extras --- src/allmydata/__init__.py | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/allmydata/__init__.py b/src/allmydata/__init__.py index 1b6a5b19c..d2ea56f34 100644 --- a/src/allmydata/__init__.py +++ b/src/allmydata/__init__.py @@ -273,10 +273,38 @@ def get_package_versions_and_locations(): return packages, cross_check_errors +def split_requirement(req): + """ + Split up a single requirement string into the different version constraint pieces. + + This is like req.split(",") except it doesn't split on , found inside []. + + :return: A list of the split up pieces. + """ + in_extras = False + pieces = [] + chunk = '' + for ch in req: + if in_extras: + if ch == ']': + in_extras = False + chunk += ch + else: + if ch == '[': + in_extras = True + chunk += ch + elif ch == ',': + pieces.append(chunk) + chunk = '' + else: + chunk += ch + pieces.append(chunk) + return pieces + + def check_requirement(req, vers_and_locs): # We support only conjunctions of <=, >=, and != - - reqlist = req.split(',') + reqlist = split_requirement(req) name = reqlist[0].split('<=')[0].split('>=')[0].split('!=')[0].strip(' ').split('[')[0] if name not in vers_and_locs: raise PackagingError("no version info for %s" % (name,))