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

Commits on Dec 11, 2023

  1. ENH: Disable pip version check

    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 committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    9345df9 View commit details
    Browse the repository at this point in the history