mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 06:46:15 +00:00
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:
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user