launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24284
[Merge] ~cjwatson/launchpad:gunicorn-explicit-gthread-dep into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:gunicorn-explicit-gthread-dep into launchpad:master.
Commit message:
Explicitly depend on futures
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/378477
We've been depending on gunicorn[gthread] and expecting that to pull in futures. Unfortunately this gets confusing when trying to build for Python 3. Rather than depending on 'futures; python_version <= "3.2"', gunicorn adds the dependency in setup.py depending on whether it's running on Python 2 or 3, but then still claims to be building a universal wheel. As a result, pip may cache a wheel with the futures dependency on Python 2 which will then be uninstallable on Python 3, or conversely may cache a wheel without the futures dependency on Python 3 and then install it without futures on Python 2 as well.
For now, the simplest fix is to declare the dependency ourselves. Since the latest versions of gunicorn upstream have now dropped Python 2 support, it's unlikely that the gthread extra is going to grow new dependencies on Python 2.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:gunicorn-explicit-gthread-dep into launchpad:master.
diff --git a/setup.py b/setup.py
index 0ab1ce4..e7522ce 100644
--- a/setup.py
+++ b/setup.py
@@ -162,8 +162,15 @@ setup(
'feedparser',
'feedvalidator',
'fixtures',
+ # Required for gunicorn[gthread]. We depend on it explicitly
+ # because gunicorn declares its dependency in a way that produces
+ # (and thus may cache) different wheels depending on whether it was
+ # built on Python 2 or 3 while claiming that the wheels are
+ # universal.
+ # XXX cjwatson 2020-02-03: Remove this once we're on Python 3.
+ 'futures; python_version < "3.2"',
'geoip2',
- 'gunicorn[gthread]',
+ 'gunicorn',
'importlib-resources',
'ipaddress',
'ipython',