]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Unconditionally use HTTPConnectionPool, and depend on a Twisted that provides it.
authorDaira Hopwood <david-sarah@jacaranda.org>
Mon, 15 Apr 2013 19:22:18 +0000 (20:22 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Wed, 9 Apr 2014 00:33:55 +0000 (01:33 +0100)
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
src/allmydata/_auto_deps.py
src/allmydata/storage/backends/cloud/cloud_common.py

index 61ad3aef503e63a3c552d3fd9c37dd719af3b8e1..ab3d948f919075ba622f98cd679f35e6415a04aa 100644 (file)
@@ -28,8 +28,10 @@ install_requires = [
     #   https://twistedmatrix.com/trac/ticket/411
     # * The SFTP frontend depends on Twisted 11.0.0 to fix the SSH server
     #   rekeying bug http://twistedmatrix.com/trac/ticket/4395
+    # * The cloud backend depends on Twisted 12.1.0 for HTTPConnectionPool.
+    # * IPv6 support will also depend on Twisted 12.1.0.
     #
-    "Twisted >= 11.0.0",
+    "Twisted >= 12.1.0",
 
     # * foolscap < 0.5.1 had a performance bug which spent O(N**2) CPU for
     #   transferring large mutable files of size N.
index 6cacbaf606e34814ad91c04a64e234c60cb06dad..258caf7ada8942ea3d420e3890e61be1a82e9270 100644 (file)
@@ -6,12 +6,7 @@ import urllib
 from twisted.internet import defer, reactor, task
 from twisted.python.failure import Failure
 from twisted.web.error import Error
-from twisted.web.client import FileBodyProducer, ResponseDone, Agent
-try:
-    from twisted.web.client import HTTPConnectionPool
-except ImportError:
-    # Old version of Twisted
-    HTTPConnectionPool = None
+from twisted.web.client import FileBodyProducer, ResponseDone, Agent, HTTPConnectionPool
 from twisted.web.http_headers import Headers
 from twisted.internet.protocol import Protocol
 
@@ -708,10 +703,7 @@ class CommonContainerMixin(HTTPClientMixin, ContainerRetryMixin):
     def __init__(self, container_name, override_reactor=None):
         self._container_name = container_name
         self._reactor = override_reactor or reactor
-        if HTTPConnectionPool:
-            self._agent = Agent(self._reactor, pool=HTTPConnectionPool(self._reactor))
-        else:
-            self._agent = Agent(self._reactor)
+        self._agent = Agent(self._reactor, pool=HTTPConnectionPool(self._reactor))
         self.ServiceError = CloudServiceError
 
     def __repr__(self):