mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Merge pull request #2856 from dstufft/support-falsey-cache-dir
Support a falsey cache-dir
(cherry picked from commit ae0b4a76ad
)
This commit is contained in:
parent
e0a57053a3
commit
94d542df54
3 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
**7.0.3 (2015-06-01)**
|
||||||
|
|
||||||
|
* Fixed a regression where ``--no-cache-dir`` would raise an exception, fixes
|
||||||
|
:issue:`2855`.
|
||||||
|
|
||||||
|
|
||||||
**7.0.2 (2015-06-01)**
|
**7.0.2 (2015-06-01)**
|
||||||
|
|
||||||
* **BACKWARD INCOMPATIBLE** Revert the change (released in v7.0.0) that
|
* **BACKWARD INCOMPATIBLE** Revert the change (released in v7.0.0) that
|
||||||
|
|
|
@ -55,7 +55,7 @@ class WheelCache(object):
|
||||||
:param format_control: A pip.index.FormatControl object to limit
|
:param format_control: A pip.index.FormatControl object to limit
|
||||||
binaries being read from the cache.
|
binaries being read from the cache.
|
||||||
"""
|
"""
|
||||||
self._cache_dir = os.path.expanduser(cache_dir)
|
self._cache_dir = os.path.expanduser(cache_dir) if cache_dir else None
|
||||||
self._format_control = format_control
|
self._format_control = format_control
|
||||||
|
|
||||||
def cached_wheel(self, link, package_name):
|
def cached_wheel(self, link, package_name):
|
||||||
|
|
|
@ -397,3 +397,7 @@ class TestWheelCache:
|
||||||
def test_expands_path(self):
|
def test_expands_path(self):
|
||||||
wc = wheel.WheelCache("~/.foo/", None)
|
wc = wheel.WheelCache("~/.foo/", None)
|
||||||
assert wc._cache_dir == os.path.expanduser("~/.foo/")
|
assert wc._cache_dir == os.path.expanduser("~/.foo/")
|
||||||
|
|
||||||
|
def test_falsey_path_none(self):
|
||||||
|
wc = wheel.WheelCache(False, None)
|
||||||
|
assert wc._cache_dir is None
|
||||||
|
|
Loading…
Reference in a new issue