10
10
11
11
import pip .wheel
12
12
from pip ._vendor import pkg_resources , six
13
- from pip .compat import (
14
- urllib , ConfigParser , string_types ,
15
- )
13
+ from pip ._vendor .six .moves import configparser
14
+ from pip .compat import urllib
16
15
from pip .download import is_url , url_to_path , path_to_url , is_archive_file
17
16
from pip .exceptions import (
18
17
InstallationError , UninstallationError , UnsupportedWheel ,
@@ -38,7 +37,7 @@ def __init__(self, req, comes_from, source_dir=None, editable=False,
38
37
url = None , as_egg = False , update = True , prereleases = None ,
39
38
editable_options = None , pycompile = True ):
40
39
self .extras = ()
41
- if isinstance (req , string_types ):
40
+ if isinstance (req , six . string_types ):
42
41
req = pkg_resources .Requirement .parse (req )
43
42
self .extras = req .extras
44
43
self .req = req
@@ -168,7 +167,7 @@ def __str__(self):
168
167
if self .satisfied_by is not None :
169
168
s += ' in %s' % display_path (self .satisfied_by .location )
170
169
if self .comes_from :
171
- if isinstance (self .comes_from , string_types ):
170
+ if isinstance (self .comes_from , six . string_types ):
172
171
comes_from = self .comes_from
173
172
else :
174
173
comes_from = self .comes_from .from_path ()
@@ -181,7 +180,7 @@ def from_path(self):
181
180
return None
182
181
s = str (self .req )
183
182
if self .comes_from :
184
- if isinstance (self .comes_from , string_types ):
183
+ if isinstance (self .comes_from , six . string_types ):
185
184
comes_from = self .comes_from
186
185
else :
187
186
comes_from = self .comes_from .from_path ()
@@ -619,7 +618,7 @@ def uninstall(self, auto_confirm=False):
619
618
620
619
# find console_scripts
621
620
if dist .has_metadata ('entry_points.txt' ):
622
- config = ConfigParser .SafeConfigParser ()
621
+ config = configparser .SafeConfigParser ()
623
622
config .readfp (
624
623
FakeFile (dist .get_metadata_lines ('entry_points.txt' ))
625
624
)
0 commit comments