From da1313fa5635c9271fc038a0a71e0d501d5ed662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Wed, 12 Feb 2025 22:52:04 -0600 Subject: [PATCH] Stop using `--no-python-version-warning` --- backend/tests/downstream/integrate.py | 3 --- src/hatch/cli/application.py | 2 +- src/hatch/env/plugin/interface.py | 2 +- tests/helpers/helpers.py | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/backend/tests/downstream/integrate.py b/backend/tests/downstream/integrate.py index c502913e3..ddc689945 100644 --- a/backend/tests/downstream/integrate.py +++ b/backend/tests/downstream/integrate.py @@ -140,7 +140,6 @@ def main(): 'download', '-q', '--disable-pip-version-check', - '--no-python-version-warning', '-d', links_dir, os.path.join(links_dir, os.listdir(links_dir)[0]), @@ -230,7 +229,6 @@ def main(): 'install', '-q', '--disable-pip-version-check', - '--no-python-version-warning', '--find-links', links_dir, '--no-deps', @@ -243,7 +241,6 @@ def main(): 'install', '-q', '--disable-pip-version-check', - '--no-python-version-warning', repo_dir, ]) diff --git a/src/hatch/cli/application.py b/src/hatch/cli/application.py index bdc77b8c2..58cc826fe 100644 --- a/src/hatch/cli/application.py +++ b/src/hatch/cli/application.py @@ -162,7 +162,7 @@ def ensure_plugin_dependencies(self, dependencies: list[Requirement], *, wait_me pip_command = [sys.executable, '-u', '-m', 'pip'] - pip_command.extend(['install', '--disable-pip-version-check', '--no-python-version-warning']) + pip_command.extend(['install', '--disable-pip-version-check']) # Default to -1 verbosity add_verbosity_flag(pip_command, self.verbosity, adjustment=-1) diff --git a/src/hatch/env/plugin/interface.py b/src/hatch/env/plugin/interface.py index ab18b77eb..e76915de4 100644 --- a/src/hatch/env/plugin/interface.py +++ b/src/hatch/env/plugin/interface.py @@ -768,7 +768,7 @@ def construct_pip_install_command(self, args: list[str]): A convenience method for constructing a [`pip install`](https://pip.pypa.io/en/stable/cli/pip_install/) command with the given verbosity. The default verbosity is set to one less than Hatch's verbosity. """ - command = ['python', '-u', '-m', 'pip', 'install', '--disable-pip-version-check', '--no-python-version-warning'] + command = ['python', '-u', '-m', 'pip', 'install', '--disable-pip-version-check'] # Default to -1 verbosity add_verbosity_flag(command, self.verbosity, adjustment=-1) diff --git a/tests/helpers/helpers.py b/tests/helpers/helpers.py index 01d1bade5..a5557639e 100644 --- a/tests/helpers/helpers.py +++ b/tests/helpers/helpers.py @@ -55,7 +55,6 @@ def assert_plugin_installation(subprocess_run, dependencies: list[str], *, verbo 'pip', 'install', '--disable-pip-version-check', - '--no-python-version-warning', ] add_verbosity_flag(command, verbosity, adjustment=-1) command.extend(dependencies)