 +    def get_json_dependencies(self, ireq):
 +
 +        if not (is_pinned_requirement(ireq)):
-+            raise TypeError('Expected pinned InstallRequirement, got {}'.format(ireq))
++            raise TypeError('Expected pinned InstallRequirement, got {}.format(ireq))
 +
 +        def gen(ireq):
 +            if self.DEFAULT_INDEX_URL in self.finder.index_urls:

         """
         Given a pinned or an editable InstallRequirement, returns a set of
         dependencies (also InstallRequirements, but not necessarily pinned).
@@ -121,6 +214,19 @@ class PyPIRepository(BaseRepository):
         if not (ireq.editable or is_pinned_requirement(ireq)):
             raise TypeError('Expected pinned or editable InstallRequirement, got {}'.format(ireq))
 

+                                pass
+
+            if reqset.requires_python:
+                marker = 'python_version=="{0}"'.format(reqset.requires_python.replace(' ', ''))
+                new_req = InstallRequirement.from_line('{0}; {1}'.format(str(ireq.req), marker))
+                result = [new_req]
+
+            self._dependencies_cache[ireq] = result
             reqset.cleanup_files()
         return set(self._dependencies_cache[ireq])
 
@@ -224,17 +363,10 @@ class PyPIRepository(BaseRepository):
         matching_candidates = candidates_by_version[matching_versions[0]]
 
         return {
