diff --git a/.travis.yml b/.travis.yml index 703b19b..09eb1ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: - WITH_LIB="requests2.2" - WITH_LIB="requests2.3" - WITH_LIB="requests2.4" + - WITH_LIB="requests2.5" - WITH_LIB="requests1.x" - WITH_LIB="httplib2" - WITH_LIB="boto" @@ -33,6 +34,7 @@ install: - if [ $WITH_LIB = "requests2.2" ] ; then pip install requests==2.2.1; fi - if [ $WITH_LIB = "requests2.3" ] ; then pip install requests==2.3.0; fi - if [ $WITH_LIB = "requests2.4" ] ; then pip install requests==2.4.0; fi +- if [ $WITH_LIB = "requests2.5" ] ; then pip install requests==2.5.0; fi - if [ $WITH_LIB = "httplib2" ] ; then pip install httplib2; fi - if [ $WITH_LIB = "boto" ] ; then pip install boto; fi script: python setup.py test diff --git a/tox.ini b/tox.ini index 66e300b..2389a92 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {py26,py27,py33,py34,pypy}-{requests24,requests23,requests22,requests1,httplib2,urllib3,boto} +envlist = {py26,py27,py33,py34,pypy}-{requests25,requests24,requests23,requests22,requests1,httplib2,urllib3,boto} [testenv] commands = @@ -16,9 +16,10 @@ deps = pytest-localserver PyYAML requests1: requests==1.2.3 + requests25: requests==2.5.0 requests24: requests==2.4.0 requests23: requests==2.3.0 requests22: requests==2.2.1 httplib2: httplib2 urllib3: urllib3==1.7.1 - boto: boto \ No newline at end of file + boto: boto diff --git a/vcr/patch.py b/vcr/patch.py index 90c6c8a..7e538a9 100644 --- a/vcr/patch.py +++ b/vcr/patch.py @@ -237,7 +237,7 @@ class ConnectionRemover(object): def __exit__(self, *args): for pool, connections in self._connection_pool_to_connections.items(): readd_connections = [] - while not pool.pool.empty() and connections: + while pool.pool and not pool.pool.empty() and connections: connection = pool.pool.get() if isinstance(connection, self._connection_class): connections.remove(connection)