Commit 7ebc232b authored by Apertis CI's avatar Apertis CI
Browse files

Merge updates from debian/buster

parents 134eca75 2774e2e4
Pipeline #124653 waiting for manual action with stages
in 39 seconds
python-pip (18.1-5) unstable; urgency=medium
* Team upload.
* Refresh hands-off-system-packages.patch.
* Add this fixes 404
when using --extra-index-url due to the way we de-bundle python-requests
from pip. Thanks to Fabio Natali <> for the bug report,
Clark Boylan for the patch, and all of the OpenStack infra team for their
help and involving me for this fix (Closes: #837764).
-- Thomas Goirand <> Sat, 30 Mar 2019 21:10:13 +0100
python-pip (18.1-4) unstable; urgency=medium
* Generate Built-Using at the build time (Closes: #831271).
Description: Properly catch requests' HTTPError in
This resolves issue #4195.
In's index retrieval routine we were catching
requests.HTTPError to log and ignore 404s and other similar HTTP server
errors when pulling from (extra-)index-urls. Unfortunately, the actual
path to that exception is requests.exceptions.HTTPError and the alias we
were using does not work when pip is installed with unvendored libs as
with the debian packaged pip.
Thankfully the fix is simple. Import and use
requests.exceptions.HTTPError. This comes with the added bonus of
fitting in with the existing handling for RetryError and SSLError. With
this change in place upstream pip and downstream packaged pip should
both catch this exception properly.
Note: I've not added any tests cases as I'm unsure how to test the
distro packaging case within pip's testsuite. However, the existing test
suite should hopefully cover that this isn't a regression and I've
manually confirmed that this works with a hacked up debian package
install. Also this is how we handle RetryError and SSLError.
Author: Clark Boylan <>
Date: Fri, 29 Mar 2019 10:17:31 -0700
Origin: upstream,
Last-Update: 2019-03-30
--- python-pip-18.1.orig/src/pip/_internal/
+++ python-pip-18.1/src/pip/_internal/
@@ -16,7 +16,7 @@ from pip._vendor.distlib.compat import u
from pip._vendor.packaging import specifiers
from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.packaging.version import parse as parse_version
-from pip._vendor.requests.exceptions import SSLError
+from pip._vendor.requests.exceptions import HTTPError, SSLError
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.six.moves.urllib import request as urllib_request
@@ -161,7 +161,7 @@ def _get_html_page(link, session=None):
inst = HTMLPage(resp.content, resp.url, resp.headers)
- except requests.HTTPError as exc:
+ except HTTPError as exc:
_handle_get_page_fail(link, exc, url)
except SSLError as exc:
reason = "There was a problem confirming the ssl certificate: "
......@@ -17,17 +17,18 @@ Last-Update: 2014-12-04
Patch-Name: hands-off-system-packages.patch
--- a/src/pip/_internal/utils/
+++ b/src/pip/_internal/utils/
@@ -285,22 +285,40 @@
Index: python-pip/src/pip/_internal/utils/
--- python-pip.orig/src/pip/_internal/utils/
+++ python-pip/src/pip/_internal/utils/
@@ -289,22 +289,40 @@ def renames(old, new):
def is_local(path):
- Return True if path is within sys.prefix, if we're running in a virtualenv.
- If we're not in a virtualenv, all paths are considered "local."
+ Return True if this is a path pip is allowed to modify.
- If we're not in a virtualenv, all paths are considered "local."
+ If we're in a virtualenv, sys.prefix points to the virtualenv's
+ prefix; only sys.prefix is considered local.
......@@ -3,3 +3,4 @@ debundle.patch
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment