Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list: disable pip version self check unless given --outdated/--uptodate #12568

Closed

Conversation

ichard26
Copy link
Member

Resolves #11677.

Not sure how to write a test for this, suggestions are welcome...

@@ -161,6 +161,10 @@ class IndexGroupCommand(Command, SessionCommandMixin):
This also corresponds to the commands that permit the pip version check.
"""

def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
self.allow_pip_version_check = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes this class a little bit at odds with its docstring.

@sbidoul
Copy link
Member

sbidoul commented Mar 12, 2024

If we do this for list, shouldn't we do it also for similar commands (show, freeze, inspect come to mind).

@ichard26
Copy link
Member Author

If we do this for list, shouldn't we do it also for similar commands (show, freeze, inspect come to mind).

They don't perform the pip version self-check ever already. pip list is unique because it can optionally access the network (when passed --outdated or --uptodate) and therefore has to opt into the self-check.

@ichard26
Copy link
Member Author

I'm going to write a new patch that deals with this issue and makes list and uninstall import the network machinery lazily.

@ichard26 ichard26 closed this Apr 14, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2024
@ichard26 ichard26 deleted the disable-self-version-check-in-list branch July 10, 2024 23:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip list should not perform a self-update check
2 participants