# rekeying bug <https://twistedmatrix.com/trac/ticket/4395>
# * The FTP frontend depends on Twisted >= 11.1.0 for
# filepath.Permissions
+# * The cloud backend depends on Twisted 12.1.0 for HTTPConnectionPool.
+# * IPv6 support will also depend on Twisted 12.1.0.
#
# On Windows, Twisted >= 12.2.0 has a dependency on pywin32.
# Since pywin32 can only be installed manually, we fall back to
if _use_old_Twisted_and_Nevow:
install_requires += [
- "Twisted >= 11.1.0, <= 12.1.0",
+ "Twisted == 12.1.0",
"Nevow >= 0.9.33, <= 0.10",
]
setup_requires += [req for req in install_requires if req.startswith('Twisted')
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
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):