From e530a455beb4e43a4988564c1735413972b639a0 Mon Sep 17 00:00:00 2001 From: Mathieu Dupuy Date: Mon, 28 Aug 2023 12:12:47 +0200 Subject: [PATCH] upgrade lru_cache syntax to 3.8 --- pipenv/utils/project.py | 2 +- pipenv/utils/resolver.py | 4 ++-- pipenv/utils/shell.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pipenv/utils/project.py b/pipenv/utils/project.py index 84166961bc..792fc8e1d6 100644 --- a/pipenv/utils/project.py +++ b/pipenv/utils/project.py @@ -87,7 +87,7 @@ def ensure_project( os.environ["PIP_PYTHON_PATH"] = project.python(system=system) -@lru_cache() +@lru_cache def get_setuptools_version(): # type: () -> Optional[STRING_TYPE] diff --git a/pipenv/utils/resolver.py b/pipenv/utils/resolver.py index c8f7e77834..ab5027986b 100644 --- a/pipenv/utils/resolver.py +++ b/pipenv/utils/resolver.py @@ -149,7 +149,7 @@ def __repr__(self): ) @staticmethod - @lru_cache() + @lru_cache def _get_pip_command(): return InstallCommand(name="InstallCommand", summary="pip Install command.") @@ -884,7 +884,7 @@ def resolve_deps( return results, internal_resolver -@lru_cache() +@lru_cache def get_pipenv_sitedir() -> Optional[str]: site_dir = next( iter(d for d in pkg_resources.working_set if d.key.lower() == "pipenv"), None diff --git a/pipenv/utils/shell.py b/pipenv/utils/shell.py index 77236525eb..a9020c76ba 100644 --- a/pipenv/utils/shell.py +++ b/pipenv/utils/shell.py @@ -19,7 +19,7 @@ from .processes import subprocess_run -@lru_cache() +@lru_cache def make_posix(path: str) -> str: """ Convert a path with possible windows-style separators to a posix-style path