[Python-modules-commits] r9375 - in packages/python-couchdb/trunk/debian (2 files)
piotr at users.alioth.debian.org
piotr at users.alioth.debian.org
Tue Aug 18 19:06:53 UTC 2009
Date: Tuesday, August 18, 2009 @ 19:06:52
Author: piotr
Revision: 9375
python2.5_compatibility.patch added
Added:
packages/python-couchdb/trunk/debian/patches/python2.5_compatibility.patch
Modified:
packages/python-couchdb/trunk/debian/changelog
Modified: packages/python-couchdb/trunk/debian/changelog
===================================================================
--- packages/python-couchdb/trunk/debian/changelog 2009-08-18 18:36:09 UTC (rev 9374)
+++ packages/python-couchdb/trunk/debian/changelog 2009-08-18 19:06:52 UTC (rev 9375)
@@ -1,8 +1,5 @@
-python-couchdb (0.6-1) UNRELEASED; urgency=low
+python-couchdb (0.6-1) unstable; urgency=low
- TODO: requires Python >= 2.6 - patch it to support 2.5 as well
- (python2.5's httplib2.Http doesn't support timeout argument)
-
[ Noah Slater ]
* Updated debian/control, updated Build-Depends on debhelper to 7.2.11.
@@ -10,6 +7,7 @@
* New upstream release. Closes: #537456
* Add python-cjson as an alternative dependency to python-simplejson and
python >= 2.6 (due to new couchdb/json.py)
+ * python2.5_compatibility.patch added
* Remove PYTHONPATH from debian/rules, not really needed
* Standards-Version bumped to 3.8.3 (no other changes needed)
Added: packages/python-couchdb/trunk/debian/patches/python2.5_compatibility.patch
===================================================================
--- packages/python-couchdb/trunk/debian/patches/python2.5_compatibility.patch (rev 0)
+++ packages/python-couchdb/trunk/debian/patches/python2.5_compatibility.patch 2009-08-18 19:06:52 UTC (rev 9375)
@@ -0,0 +1,25 @@
+# timeout is available since Python 2.6
+Index: python-couchdb-0.6/couchdb/client.py
+===================================================================
+--- python-couchdb-0.6.orig/couchdb/client.py
++++ python-couchdb-0.6/couchdb/client.py
+@@ -31,6 +31,7 @@ from inspect import getsource
+ from textwrap import dedent
+ import re
+ import socket
++import sys
+
+ from couchdb import json
+
+@@ -105,7 +106,10 @@ class Server(object):
+ :param timeout: socket timeout in number of seconds, or `None` for no
+ timeout
+ """
+- http = httplib2.Http(cache=cache, timeout=timeout)
++ if sys.version_info < (2, 6):
++ http = httplib2.Http(cache=cache)
++ else:
++ http = httplib2.Http(cache=cache, timeout=timeout)
+ http.force_exception_to_status_code = False
+ self.resource = Resource(http, uri)
+
More information about the Python-modules-commits
mailing list