Caching properties to deduplicate sources

Without caching, the Resolver will duplicate the sources listed in the
`Pipfile` multiple times (since the property re-adds them every
they're called) in the arguments sent to the `pip` parser.

Removing unused command-line option `--debug`
This commit is contained in:
kalebmckale
2023-08-23 02:29:29 -04:00
parent 76bcb908a5
commit 87162712a9
2 changed files with 2 additions and 3 deletions
-1
View File
@@ -40,7 +40,6 @@ def get_parser():
action="store",
default=None,
)
parser.add_argument("--debug", action="store_true", default=False)
parser.add_argument("--system", action="store_true", default=False)
parser.add_argument("--parse-only", action="store_true", default=False)
parser.add_argument(
+2 -2
View File
@@ -266,7 +266,7 @@ class Resolver:
pip_args.extend(["--cache-dir", self.project.s.PIPENV_CACHE_DIR])
return pip_args
@property
@cached_property
def pip_args(self):
use_pep517 = environments.get_from_env("USE_PEP517", prefix="PIP")
build_isolation = environments.get_from_env("BUILD_ISOLATION", prefix="PIP")
@@ -298,7 +298,7 @@ class Resolver:
)
return default_constraint_filename
@property
@cached_property
def pip_options(self):
pip_options, _ = self.pip_command.parser.parse_args(self.pip_args)
pip_options.cache_dir = self.project.s.PIPENV_CACHE_DIR