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

[5.6] ENH: Disable pip version check #7466

Merged
merged 1 commit into from Dec 11, 2023

Conversation

jcfr
Copy link
Member

@jcfr jcfr commented Dec 11, 2023

Backports changes originally contributed to main through the following pull requests:


This commit addresses the quarterly update cycle of python packages bundled into Slicer. To mitigate unnecessary console clutter caused by the pip version check, the variable PIP_DISABLE_PIP_VERSION_CHECK is set, suppressing warnings such as:

$ PythonSlicer -m pip list
[...]
[notice] A new release of pip is available: X.Y.Z -> Z'.Y'.Z'
[notice] To update, run: pip install --upgrade pip

To ensure that the PIP_DISABLE_PIP_VERSION_CHECK environment variable is undefined when Slicer is built against a system or external Python installation, this variable is set only in the pip external project.

This also addresses an issue introduced in 028fb31 (COMP: Update python packages to latest) where the pip version was updated from 23.1.2 to 23.3. This resulted in the following warning message instead of the expected update notification:

WARNING: There was an error checking the latest version of pip.

For additional details about PIP_DISABLE_PIP_VERSION_CHECK:

(cherry picked from commit 2cf6f14)

This commit addresses the quarterly update cycle of python packages bundled into Slicer.
To mitigate unnecessary console clutter caused by the pip version check, the variable
`PIP_DISABLE_PIP_VERSION_CHECK` is set, suppressing warnings such as:

```bash
$ PythonSlicer -m pip list
[...]
[notice] A new release of pip is available: X.Y.Z -> Z'.Y'.Z'
[notice] To update, run: pip install --upgrade pip
```

To ensure that `the PIP_DISABLE_PIP_VERSION_CHECK` environment variable is
undefined when Slicer is built against a system or external Python installation,
this variable is set only in the pip external project.

This also addresses an issue introduced in 028fb31 (COMP: Update python packages
to latest) where the pip version was updated from `23.1.2` to `23.3`. This resulted
in the following warning message instead of the expected update notification:

```bash
WARNING: There was an error checking the latest version of pip.
```

For additional details about `PIP_DISABLE_PIP_VERSION_CHECK`:
* https://pip.pypa.io/en/stable/cli/pip/#cmdoption-disable-pip-version-check
* https://pip.pypa.io/en/stable/topics/configuration/#environment-variables

(cherry picked from commit 2cf6f14)
@jcfr jcfr requested a review from pieper December 11, 2023 20:10
@jcfr jcfr mentioned this pull request Dec 11, 2023
18 tasks
Copy link
Member

@pieper pieper left a comment

Choose a reason for hiding this comment

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

LGTM

@pieper pieper merged commit d85cf75 into Slicer:5.6 Dec 11, 2023
5 checks passed
@jcfr jcfr deleted the 5.6-backport/disable-pip-version-check branch December 17, 2023 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants