Kallithea issues archive

Issue #5: looser dependencies

Reported by: Jelmer Vernooij
State: new
Created on: 2014-07-06 18:06
Updated on: 2014-07-14 19:27

Description

The strict dependencies in setup.py currently make it hard to use system versions of various Python libraries. This makes packagers unhappy.

It'd be great if the dependencies could be looser (e.g. ">=" rather than "==") where possible.

Attachments

Comments

Comment by Mads Kiilerich, on 2014-07-06 19:59

I agree with that goal. People using different library versions do however introduce a risk and maintenance burden. I like having a set of recommended versions that people using virtualenv can use. Most libraries are probably backwards compatible libraries where we only need a lower bound. Other stuff is unstable (like Mercurial) and we should only allow versions that we know works.

In this case, I assume you can guarantee that dulwich is backward compatible and that any higher version should be safe without thorough testinng?

Comment by domruf, on 2014-07-11 10:40

What about creating a stable branch with pinned version and using looser dependencies in the default branch. Or only pin the versions for release tags.

Just thinking out loud here.

Comment by Jelmer Vernooij, on 2014-07-11 11:53

That wouldn't help for packagers, who would usually package released versions.

Perhaps just updating ranges of allowed versions works, rather than open-ended "at least this version", once it has been verified the later versions work?

Comment by Andrej Shadura, on 2014-07-14 08:23

Here's what I currently use:

diff -r eccca50a914d setup.py
--- a/setup.py  Sun Jul 06 21:34:22 2014 -0400
+++ b/setup.py  Mon Jul 14 08:23:15 2014 +0000
@@ -34,43 +34,43 @@
 is_windows = __platform__ in ['Windows']

 requirements = [
-    "waitress==0.8.8",
-    "webob==1.0.8",
-    "webtest==1.4.3",
-    "Pylons==1.0.0",
-    "Beaker==1.6.4",
-    "WebHelpers==1.3",
-    "formencode==1.2.4",
-    "SQLAlchemy==0.7.10",
-    "Mako==0.9.0",
+    "waitress>=0.8.8",
+    "webob>=1.0.8",
+    "webtest>=1.4.3",
+    "Pylons>=1.0.0",
+    "Beaker>=1.6.4",
+    "WebHelpers>=1.3",
+    "formencode>=1.2.4",
+    "SQLAlchemy>=0.7.8",
+    "Mako>=0.9.0",
     "pygments>=1.5",
-    "whoosh>=2.4.0,<2.5",
-    "celery>=2.2.5,<2.3",
-    "babel==0.9.6",
+    "whoosh>=2.4.0",
+    "celery>=2.2.5",
+    "babel>=0.9.6",
     "python-dateutil>=1.5.0,<2.0.0",
-    "dulwich==0.9.3",
-    "markdown==2.2.1",
-    "docutils==0.8.1",
-    "simplejson==2.5.2",
+    "dulwich>=0.9.3",
+    "markdown>=2.2.1",
+    "docutils>=0.8.1",
+    "simplejson>=2.5.2",
     "mock",
-    "pycrypto==2.6.0",
-    "URLObject==2.3.4",
-    "Routes==1.13",
+    "pycrypto>=2.6.0",
+    "URLObject>=2.3.4",
+    "Routes>=1.13",
 ]

 if sys.version_info < (2, 6):
     requirements.append("pysqlite")

 if sys.version_info < (2, 7):
-    requirements.append("importlib==1.0.1")
+    requirements.append("importlib>=1.0.1")
     requirements.append("unittest2")
     requirements.append("argparse")

 if is_windows:
-    requirements.append("mercurial==2.8.2")
+    requirements.append("mercurial>=2.8.2")
 else:
-    requirements.append("py-bcrypt==0.3.0")
-    requirements.append("mercurial==2.8.2")
+    requirements.append("py-bcrypt>=0.3.0")
+    requirements.append("mercurial>=2.8.2")


 dependency_links = [

Comment by Andrej Shadura, on 2014-07-14 08:24

First thing, however, I think is to migrate from pylons, as the newest webob breaks compatibility with it, so Kallithea is currently uninstallable on Debian testing, for example.

Comment by Mads Kiilerich, on 2014-07-14 19:27