diff --git a/pipenv/vendor/pythonfinder/__init__.py b/pipenv/vendor/pythonfinder/__init__.py index e9edecd9..f4067adb 100644 --- a/pipenv/vendor/pythonfinder/__init__.py +++ b/pipenv/vendor/pythonfinder/__init__.py @@ -4,7 +4,7 @@ from .exceptions import InvalidPythonVersion from .models import SystemPath from .pythonfinder import Finder -__version__ = "2.0.5" +__version__ = "2.0.6" __all__ = ["Finder", "SystemPath", "InvalidPythonVersion"] diff --git a/pipenv/vendor/pythonfinder/environment.py b/pipenv/vendor/pythonfinder/environment.py index ad614a79..42849088 100644 --- a/pipenv/vendor/pythonfinder/environment.py +++ b/pipenv/vendor/pythonfinder/environment.py @@ -2,9 +2,9 @@ from __future__ import annotations import os import platform -import sys import re import shutil +import sys def is_type_checking(): @@ -19,7 +19,7 @@ def possibly_convert_to_windows_style_path(path): if not isinstance(path, str): path = str(path) # Check if the path is in Unix-style (Git Bash) - if os.name != 'nt': + if os.name != "nt": return path if os.path.exists(path): return path @@ -72,19 +72,15 @@ def set_asdf_paths(): if os.path.isdir(os.path.join(python_versions, name)): asdf_path = os.path.join(python_versions, name) asdf_path = os.path.join(asdf_path, "bin") - os.environ['PATH'] = asdf_path + os.pathsep + os.environ['PATH'] + os.environ["PATH"] = asdf_path + os.pathsep + os.environ["PATH"] except FileNotFoundError: pass def set_pyenv_paths(): if PYENV_INSTALLED: - is_windows = False - if os.name == "nt": - python_versions = os.path.join(PYENV_ROOT, "pyenv-win", "versions") - is_windows = True - else: - python_versions = os.path.join(PYENV_ROOT, "versions") + python_versions = os.path.join(PYENV_ROOT, "versions") + is_windows = os.name == "nt" try: # Get a list of all files and directories in the given path all_files_and_dirs = os.listdir(python_versions) @@ -94,6 +90,6 @@ def set_pyenv_paths(): pyenv_path = os.path.join(python_versions, name) if not is_windows: pyenv_path = os.path.join(pyenv_path, "bin") - os.environ['PATH'] = pyenv_path + os.pathsep + os.environ['PATH'] + os.environ["PATH"] = pyenv_path + os.pathsep + os.environ["PATH"] except FileNotFoundError: pass diff --git a/pipenv/vendor/pythonfinder/models/path.py b/pipenv/vendor/pythonfinder/models/path.py index 37316f4e..e46126db 100644 --- a/pipenv/vendor/pythonfinder/models/path.py +++ b/pipenv/vendor/pythonfinder/models/path.py @@ -19,7 +19,10 @@ from typing import ( Union, ) -from pipenv.patched.pip._vendor.pyparsing.core import cached_property +if sys.version_info >= (3, 8): + from functools import cached_property +else: + from pipenv.patched.pip._vendor.pyparsing.core import cached_property from pipenv.vendor.pydantic import Field, root_validator from ..environment import ( diff --git a/pipenv/vendor/vendor.txt b/pipenv/vendor/vendor.txt index 395d0c67..0f399ee4 100644 --- a/pipenv/vendor/vendor.txt +++ b/pipenv/vendor/vendor.txt @@ -9,7 +9,7 @@ plette==0.4.4 ptyprocess==0.7.0 pydantic==1.10.10 python-dotenv==1.0.0 -pythonfinder==2.0.5 +pythonfinder==2.0.6 ruamel.yaml==0.17.21 shellingham==1.5.0.post1 tomli==2.0.1