From ce4514eb8d53fc342924446b87d2316a755f9147 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Thu, 3 Jul 2014 11:52:08 -0400 Subject: [PATCH] Upgrade CacheControl to 0.10.2 This fixes a reference cycle issue where pip would randomly hang forever in some of the tests. --- pip/_vendor/cachecontrol/filewrapper.py | 7 +++++++ pip/_vendor/vendor.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pip/_vendor/cachecontrol/filewrapper.py b/pip/_vendor/cachecontrol/filewrapper.py index e35b2f6f0..3989bbe92 100644 --- a/pip/_vendor/cachecontrol/filewrapper.py +++ b/pip/_vendor/cachecontrol/filewrapper.py @@ -32,4 +32,11 @@ class CallbackFileWrapper(object): if is_fp_closed(self.__fp): self.__callback(self.__buf.getvalue()) + # We assign this to None here, because otherwise we can get into + # really tricky problems where the CPython interpreter dead locks + # because the callback is holding a reference to something which + # has a __del__ method. Setting this to None breaks the cycle + # and allows the garbage collector to do it's thing normally. + self.__callback = None + return data diff --git a/pip/_vendor/vendor.txt b/pip/_vendor/vendor.txt index 74c3a794e..c19a851eb 100644 --- a/pip/_vendor/vendor.txt +++ b/pip/_vendor/vendor.txt @@ -3,5 +3,5 @@ html5lib==1.0b3 six==1.6.1 colorama==0.3.1 requests==2.3.0 -CacheControl==0.10.1 +CacheControl==0.10.2 lockfile==0.9.1 -- GitLab