 +
 +        # stores *full* path + fragment => sha256
 +        self._hash_cache = HashCache(session=session)
-
+ 
          # Setup file paths
          self.freshen_build_caches()
 @@ -114,13 +189,15 @@ class PyPIRepository(BaseRepository):
          if ireq.editable or is_url_requirement(ireq):
              return ireq  # return itself as the best match
-
+ 
 -        all_candidates = self.find_all_candidates(ireq.name)
 +        all_candidates = clean_requires_python(self.find_all_candidates(ireq.name))
          candidates_by_version = lookup_table(

--- a/pipenv/patched/piptools/repositories/local.py
+++ b/pipenv/patched/piptools/repositories/local.py
@@ -3,9 +3,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera

 from contextlib import contextmanager

-from pip._internal.utils.hashes import FAVORITE_HASH
-
-from .._compat import PIP_VERSION
+from .._compat import PIP_VERSION, FAVORITE_HASH
 from .base import BaseRepository

 from piptools.utils import as_tuple, key_from_ireq, make_install_requirement
@@ -65,7 +63,8 @@ class LocalRequirementsRepository(BaseRepository):
         if existing_pin and ireq_satisfied_by_existing_pin(ireq, existing_pin):

                     cached_link = link
-                return {self._get_file_hash(cached_link)}
+                return {self._hash_cache._get_file_hash(cached_link)}
 
         if not is_pinned_requirement(ireq):
             raise TypeError("Expected pinned requirement, got {}".format(ireq))
@@ -260,38 +396,28 @@ class PyPIRepository(BaseRepository):
