You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pip install --upgrade commands which fail to reach the index should return nonzero.
I expect this to be nonzero so that e.g. a CI script will crash out when the pip install --upgrade line is not successful.
Expected behavior
pip install --upgrade <something> should return non-zero when the package could not be upgrade due to errors
pip version
current
Python version
3.10
OS
rhel7
How to Reproduce
make sure package XYZ is already installed
intentionally break SSL (for example by renaming/moving the _ssl .so file away)
pip install --upgrade XYZ
Output
[builder@6c720825086a ~]$ python3 -m pip install --upgrade pip
Defaulting to user installation because normal site-packages is not writeable
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Requirement already satisfied: pip in ./.local/lib/python3.10/site-packages (22.2.1)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
[builder@6c720825086a ~]$ echo $?
0
That's right. We had a script which went on to attempt to do things that it shouldn't have done, because of an outdated pip & setuptools. A non-zero return code would have stopped it in its tracks earlier. Although there is no chance to fix this for older releases, where it matters most, it's probably still worth fixing in main (because it's the same problem still when the target package to be upgraded is not pip itself).
Description
pip install --upgrade
commands which fail to reach the index should return nonzero.I expect this to be nonzero so that e.g. a CI script will crash out when the
pip install --upgrade
line is not successful.Expected behavior
pip install --upgrade <something>
should return non-zero when the package could not be upgrade due to errorspip version
current
Python version
3.10
OS
rhel7
How to Reproduce
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: