File tree 3 files changed +9
-3
lines changed 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 13
13
from typing import Any , Optional
14
14
15
15
16
+ def url_is_remote (url ):
17
+ # type: (str) -> bool
18
+ return get_url_scheme (url ) in ['http' , 'https' ]
19
+
20
+
16
21
class Url (namedtuple ('Url' , ['url' ])):
17
22
18
23
def __new__ (cls , url ):
19
24
# type: (str) -> Url
20
- scheme = get_url_scheme (url )
21
- assert scheme in ["http" , "https" ]
25
+ assert not url_is_remote (url )
22
26
return super (Url , cls ).__new__ (cls , url )
23
27
24
28
Original file line number Diff line number Diff line change 25
25
PreviousBuildDirError ,
26
26
VcsHashUnsupported ,
27
27
)
28
+ from pip ._internal .network .shallow .httpfile import url_is_remote
28
29
from pip ._internal .utils .filesystem import copy2_fixed
29
30
from pip ._internal .utils .hashes import MissingHashes
30
31
from pip ._internal .utils .logging import indent_log
@@ -406,7 +407,7 @@ def prepare_linked_requirement(
406
407
download_dir = self .wheel_download_dir
407
408
408
409
if link .is_wheel :
409
- if self .use_shallow_wheels :
410
+ if self .use_shallow_wheels and url_is_remote ( link . url ) :
410
411
return ShallowWheelDistribution (
411
412
req , self .downloader , download_dir )
412
413
if download_dir :
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ def perform_all_final_hydration(self):
68
68
return
69
69
70
70
exceptions = []
71
+
71
72
def do_hydrate (dist ):
72
73
# type: (DistributionNeedingFinalHydration) -> None
73
74
try :
You can’t perform that action at this time.
0 commit comments