mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
+3
-3
@@ -150,15 +150,15 @@ class SystemPath(object):
|
||||
def _remove_path(self, path):
|
||||
path_copy = reversed(self.path_order[:])
|
||||
new_order = []
|
||||
target = os.path.normcase(os.path.normpath(os.path.abspath(path)))
|
||||
target = normalize_path(path)
|
||||
path_map = {
|
||||
os.path.normcase(os.path.normpath(os.path.abspath(pth))): pth
|
||||
normalize_path(pth): pth
|
||||
for pth in self.paths.keys()
|
||||
}
|
||||
if target in path_map:
|
||||
del self.paths[path_map.get(target)]
|
||||
for current_path in path_copy:
|
||||
normalized = os.path.normcase(os.path.normpath(os.path.abspath(current_path)))
|
||||
normalized = normalize_path(current_path)
|
||||
if normalized != target:
|
||||
new_order.append(normalized)
|
||||
new_order = reversed(new_order)
|
||||
|
||||
Vendored
+1
-1
@@ -114,7 +114,7 @@ def _filter_none(k, v):
|
||||
|
||||
|
||||
def normalize_path(path):
|
||||
return os.path.normpath(os.path.normcase(os.path.abspath(path)))
|
||||
return os.path.normpath(os.path.normcase(os.path.abspath(str(path))))
|
||||
|
||||
|
||||
@lru_cache(maxsize=1024)
|
||||
|
||||
Vendored
+1
-1
@@ -34,7 +34,7 @@ requirementslib==1.3.0
|
||||
pyparsing==2.2.2
|
||||
pytoml==0.1.19
|
||||
plette==0.2.2
|
||||
tomlkit==0.5.2
|
||||
tomlkit==0.4.6
|
||||
shellingham==1.2.7
|
||||
six==1.11.0
|
||||
semver==2.8.1
|
||||
|
||||
Reference in New Issue
Block a user