Merge pull request #4437 from pypa/bugfix/4330

Fix path handling on Windows
This commit is contained in:
Frost Ming
2020-08-27 17:52:38 +08:00
committed by GitHub
6 changed files with 6 additions and 4 deletions
+1
View File
@@ -0,0 +1 @@
Fix a bug that paths are not normalized before comparison.
+1
View File
@@ -0,0 +1 @@
Fix a bug that invalid Python paths from Windows registry break ``pipenv install``.
+1 -1
View File
@@ -10,7 +10,7 @@ from .exceptions import InvalidPythonVersion
from .models import SystemPath, WindowsFinder
from .pythonfinder import Finder
__version__ = "1.2.4"
__version__ = "1.2.5"
logger = logging.getLogger(__name__)
+1 -1
View File
@@ -302,7 +302,7 @@ class SystemPath(object):
normalized = normalize_path(current_path)
if normalized != target:
new_order.append(normalized)
new_order = [p for p in reversed(new_order)]
new_order = [ensure_path(p).as_posix() for p in reversed(new_order)]
return attr.evolve(self, path_order=new_order, paths=new_paths)
def _setup_asdf(self):
+1 -1
View File
@@ -96,7 +96,7 @@ class WindowsFinder(BaseFinder):
py_version = PythonVersion.from_windows_launcher(
version_object, name=name, company=company
)
except InvalidPythonVersion:
except (InvalidPythonVersion, AttributeError):
continue
if py_version is None:
continue
+1 -1
View File
@@ -20,7 +20,7 @@ pipdeptree==0.13.2
pipreqs==0.4.10
docopt==0.6.2
yarg==0.1.9
pythonfinder==1.2.4
pythonfinder==1.2.5
requests==2.23.0
chardet==3.0.4
idna==2.9