diff -Nru python-pip-8.1.1/debian/changelog python-pip-8.1.1/debian/changelog --- python-pip-8.1.1/debian/changelog 2016-04-14 18:58:14.000000000 +0000 +++ python-pip-8.1.1/debian/changelog 2020-04-30 21:03:17.000000000 +0000 @@ -1,3 +1,46 @@ +python-pip (8.1.1-2ubuntu0.4+ppa1) xenial; urgency=medium + + * Support pypy3 for the PyPy PPA (Closes: #945187, LP: #1874157). + + -- Stefano Rivera Thu, 30 Apr 2020 14:03:17 -0700 + +python-pip (8.1.1-2ubuntu0.4) xenial; urgency=medium + + * d/patches/lp1626258.patch: Fix AttibuteError when accessing + Requirement.project_name instead of Requirement.name. (LP: #1626258) + * d/tests: + - control: Add needs-recommends restriction. + - pip2-*.sh: Install world 3.1, it's the latest version compatible + with python2. + + -- Felipe Reyes Wed, 21 Sep 2016 17:43:32 -0300 + +python-pip (8.1.1-2ubuntu0.2) xenial; urgency=medium + + * d/patches/skip-bad-requirements.patch: Cherry pick from Yakkety to fix + crash in `pip3 freeze` when `python3-lxc` is installed. (LP: #1611503) + + -- Barry Warsaw Tue, 09 Aug 2016 16:22:49 -0400 + +python-pip (8.1.1-2ubuntu0.1) xenial; urgency=medium + + * d/patches/editable-mode.patch: Cherry pick upstream fixes for crash + when pip installing in editable mode. (LP: #1578761) + * d/tests: + - pip3-editable.sh: Added to prove the crash is fixed. + - control: Updated + - *.sh: export PIP_DISABLE_PIP_VERSION_CHECK=1 to prevent stderr + warnings (and thus test failures) because of the newer upstream. + * d/control: + - Add python3-pyparsing as a new Build-Depends as this is required + for the cherry picked fix. + - Update the python-colorama and python-setuptools Built-Using versions. + - Add pyparsing to Built-Using. + - update-maintainer + * d/rules: dirtbike up pyparsing. + + -- Barry Warsaw Thu, 05 May 2016 16:11:04 -0500 + python-pip (8.1.1-2) unstable; urgency=medium * d/control: Add python{,3}-setuptools to Recommends. (Closes: #814292) diff -Nru python-pip-8.1.1/debian/control python-pip-8.1.1/debian/control --- python-pip-8.1.1/debian/control 2016-04-14 18:58:14.000000000 +0000 +++ python-pip-8.1.1/debian/control 2016-08-09 20:24:14.000000000 +0000 @@ -1,7 +1,8 @@ Source: python-pip Section: python Priority: optional -Maintainer: Debian Python Modules Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Python Modules Team Uploaders: Barry Warsaw , Carl Chenet , Jeff Licquia , @@ -24,6 +25,7 @@ python3-packaging, python3-pkg-resources, python3-progress, + python3-pyparsing, python3-pytest, python3-requests, python3-retrying, @@ -77,11 +79,12 @@ Depends: ca-certificates, ${misc:Depends}, Built-Using: chardet (= 2.3.0-2), - python-colorama (= 0.3.6-1), + python-colorama (= 0.3.7-1), distlib (= 0.2.2-1), html5lib (= 0.999-4), requests (= 2.9.1-3), - python-setuptools (= 20.1.1-1), + pyparsing (= 2.0.3+dfsg1-1), + python-setuptools (= 20.7.0-1), six (= 1.10.0-3), python-urllib3 (= 1.13.1-2) Breaks: python-chardet-whl (<< 2.3.0-2), diff -Nru python-pip-8.1.1/debian/patches/debundle.patch python-pip-8.1.1/debian/patches/debundle.patch --- python-pip-8.1.1/debian/patches/debundle.patch 2016-04-14 18:58:14.000000000 +0000 +++ python-pip-8.1.1/debian/patches/debundle.patch 2020-04-30 21:03:09.000000000 +0000 @@ -8,11 +8,9 @@ pip/_vendor/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/pip/_vendor/__init__.py b/pip/_vendor/__init__.py -index d0e7b34..9811a3c 100644 --- a/pip/_vendor/__init__.py +++ b/pip/_vendor/__init__.py -@@ -14,13 +14,13 @@ import sys +@@ -14,13 +14,16 @@ # Downstream redistributors which have debundled our dependencies should also # patch this value to be true. This will trigger the additional patching # to cause things like "six" to be available as pip. @@ -24,7 +22,10 @@ # is done to support downstream re-distributors like Debian and Fedora who # wish to create their own Wheels for our dependencies to aid in debundling. -WHEEL_DIR = os.path.abspath(os.path.dirname(__file__)) -+WHEEL_DIR = os.path.abspath(os.path.join(sys.prefix, 'share', 'python-wheels')) ++prefix = sys.prefix ++if sys.prefix.startswith('/usr/lib/pypy'): ++ prefix = '/usr' ++WHEEL_DIR = os.path.abspath(os.path.join(prefix, 'share', 'python-wheels')) # Define a small helper function to alias our vendored modules to the real ones diff -Nru python-pip-8.1.1/debian/patches/editable-mode.patch python-pip-8.1.1/debian/patches/editable-mode.patch --- python-pip-8.1.1/debian/patches/editable-mode.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-pip-8.1.1/debian/patches/editable-mode.patch 2016-08-09 20:24:14.000000000 +0000 @@ -0,0 +1,160 @@ +--- a/pip/req/req_install.py ++++ b/pip/req/req_install.py +@@ -17,7 +17,9 @@ + from pip._vendor import pkg_resources, six + from pip._vendor.distlib.markers import interpret as markers_interpret + from pip._vendor.packaging import specifiers ++from pip._vendor.packaging.requirements import InvalidRequirement, Requirement + from pip._vendor.packaging.utils import canonicalize_name ++from pip._vendor.packaging.version import Version + from pip._vendor.six.moves import configparser + + import pip.wheel +@@ -45,7 +47,6 @@ + from pip.req.req_uninstall import UninstallPathSet + from pip.vcs import vcs + from pip.wheel import move_wheel_files, Wheel +-from pip._vendor.packaging.version import Version + + + logger = logging.getLogger(__name__) +@@ -74,8 +75,8 @@ + self.extras = () + if isinstance(req, six.string_types): + try: +- req = pkg_resources.Requirement.parse(req) +- except pkg_resources.RequirementParseError: ++ req = Requirement(req) ++ except InvalidRequirement: + if os.path.sep in req: + add_msg = "It looks like a path. Does it exist ?" + elif '=' in req and not any(op in req for op in operators): +@@ -230,8 +231,7 @@ + wheel_cache=wheel_cache, constraint=constraint) + + if extras: +- res.extras = pkg_resources.Requirement.parse('__placeholder__' + +- extras).extras ++ res.extras = Requirement('placeholder' + extras).extras + + return res + +@@ -362,7 +362,7 @@ + def name(self): + if self.req is None: + return None +- return native_str(self.req.project_name) ++ return native_str(pkg_resources.safe_name(self.req.name)) + + @property + def setup_py_dir(self): +@@ -436,23 +436,24 @@ + op = "==" + else: + op = "===" +- self.req = pkg_resources.Requirement.parse( ++ self.req = Requirement( + "".join([ + self.pkg_info()["Name"], + op, + self.pkg_info()["Version"], +- ])) ++ ]) ++ ) + self._correct_build_location() + else: + metadata_name = canonicalize_name(self.pkg_info()["Name"]) +- if canonicalize_name(self.req.project_name) != metadata_name: ++ if canonicalize_name(self.req.name) != metadata_name: + logger.warning( + 'Running setup.py (path:%s) egg_info for package %s ' + 'produced metadata for project name %s. Fix your ' + '#egg=%s fragments.', + self.setup_py, self.name, metadata_name, self.name + ) +- self.req = pkg_resources.Requirement.parse(metadata_name) ++ self.req = Requirement(metadata_name) + + def egg_info_data(self, filename): + if self.satisfied_by is not None: +@@ -540,7 +541,7 @@ + def assert_source_matches_version(self): + assert self.source_dir + version = self.pkg_info()['version'] +- if version not in self.req: ++ if self.req.specifier and version not in self.req.specifier: + logger.warning( + 'Requested %s, but installing version %s', + self, +@@ -818,7 +819,8 @@ + + def match_markers(self): + if self.markers is not None: +- return markers_interpret(self.markers) ++ from packaging.markers import Marker ++ return Marker(self.markers).evaluate() + else: + return True + +@@ -994,7 +996,14 @@ + if self.req is None: + return False + try: +- self.satisfied_by = pkg_resources.get_distribution(self.req) ++ # get_distribution() will resolve the entire list of requirements ++ # anyway, and we've already determined that we need the requirement ++ # in question, so strip the marker so that we don't try to ++ # evaluate it. ++ from packaging.requirements import Requirement ++ no_marker = Requirement(str(self.req)) ++ no_marker.marker = None ++ self.satisfied_by = pkg_resources.get_distribution(str(no_marker)) + except pkg_resources.DistributionNotFound: + return False + except pkg_resources.VersionConflict: +@@ -1142,9 +1151,7 @@ + return ( + package_name, + url_no_extras, +- pkg_resources.Requirement.parse( +- '__placeholder__' + extras +- ).extras, ++ Requirement("placeholder" + extras).extras, + ) + else: + return package_name, url_no_extras, None +--- a/pip/index.py ++++ b/pip/index.py +@@ -335,7 +335,9 @@ + """ + + def mkurl_pypi_url(url): +- loc = posixpath.join(url, urllib_parse.quote(project_name.lower())) ++ loc = posixpath.join( ++ url, ++ urllib_parse.quote(canonicalize_name(project_name))) + # For maximum compatibility with easy_install, ensure the path + # ends in a trailing slash. Although this isn't in the spec + # (and PyPI can handle it without the slash) some other index +--- a/pip/req/req_set.py ++++ b/pip/req/req_set.py +@@ -243,7 +243,7 @@ + if (parent_req_name is None and existing_req and not + existing_req.constraint and + existing_req.extras == install_req.extras and not +- existing_req.req.specs == install_req.req.specs): ++ existing_req.req.specifier == install_req.req.specifier): + raise InstallationError( + 'Double requirement given: %s (already in %s, name=%r)' + % (install_req, existing_req, name)) +--- a/pip/wheel.py ++++ b/pip/wheel.py +@@ -300,7 +300,7 @@ + s.endswith('.dist-info') and + # is self.req.project_name case preserving? + s.lower().startswith( +- req.project_name.replace('-', '_').lower())): ++ req.name.replace('-', '_').lower())): + assert not info_dir, 'Multiple .dist-info directories' + info_dir.append(destsubdir) + for f in files: diff -Nru python-pip-8.1.1/debian/patches/lp1626258-do-not-use-project_name.patch python-pip-8.1.1/debian/patches/lp1626258-do-not-use-project_name.patch --- python-pip-8.1.1/debian/patches/lp1626258-do-not-use-project_name.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-pip-8.1.1/debian/patches/lp1626258-do-not-use-project_name.patch 2016-11-09 13:44:41.000000000 +0000 @@ -0,0 +1,22 @@ +Description: Use Requirement.name instead of Requirement.project_name + pip._vendor.packaging.requirements.Requirement renamed the property project_name + to name, this patch fixes the last known place where project_name is still being + accessed. + . + This patch is a single change, unlike the related upstream change, because + d/p/editable-mode.patch already included the rest of it. +Author: Donald Stufft +Origin: https://github.com/pypa/pip/commit/8e236dd6a09bd2f70f9d4fc886da8c354d4c58f2 +Applied-Upstream: 8.1.2 +--- +--- a/pip/req/req_install.py ++++ b/pip/req/req_install.py +@@ -1008,7 +1008,7 @@ + return False + except pkg_resources.VersionConflict: + existing_dist = pkg_resources.get_distribution( +- self.req.project_name ++ self.req.name + ) + if self.use_user_site: + if dist_in_usersite(existing_dist): diff -Nru python-pip-8.1.1/debian/patches/series python-pip-8.1.1/debian/patches/series --- python-pip-8.1.1/debian/patches/series 2016-04-14 18:58:14.000000000 +0000 +++ python-pip-8.1.1/debian/patches/series 2016-11-09 13:44:41.000000000 +0000 @@ -1,4 +1,7 @@ +editable-mode.patch hands-off-system-packages.patch debundle.patch handle-unbundled-requests.patch set_user_default.patch +skip-bad-requirements.patch +lp1626258-do-not-use-project_name.patch diff -Nru python-pip-8.1.1/debian/patches/set_user_default.patch python-pip-8.1.1/debian/patches/set_user_default.patch --- python-pip-8.1.1/debian/patches/set_user_default.patch 2016-04-14 18:58:14.000000000 +0000 +++ python-pip-8.1.1/debian/patches/set_user_default.patch 2016-08-09 20:24:14.000000000 +0000 @@ -19,11 +19,9 @@ pip/commands/install.py | 20 +++++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) -diff --git a/docs/user_guide.rst b/docs/user_guide.rst -index 6bffdc2..c31f2a7 100644 --- a/docs/user_guide.rst +++ b/docs/user_guide.rst -@@ -509,8 +509,10 @@ which means that all Python distributions support an alternative install +@@ -509,8 +509,10 @@ location that is specific to a user. The default location for each OS is explained in the python documentation for the `site.USER_BASE `_ variable. This mode @@ -36,11 +34,9 @@ Moreover, the "user scheme" can be customized by setting the ``PYTHONUSERBASE`` environment variable, which updates the value of ``site.USER_BASE``. -diff --git a/pip/commands/install.py b/pip/commands/install.py -index 7ddde93..13b328f 100644 --- a/pip/commands/install.py +++ b/pip/commands/install.py -@@ -24,6 +24,7 @@ from pip.utils.deprecation import RemovedInPip10Warning +@@ -24,6 +24,7 @@ from pip.utils.filesystem import check_path_owner from pip.wheel import WheelCache, WheelBuilder @@ -48,7 +44,7 @@ logger = logging.getLogger(__name__) -@@ -54,6 +55,12 @@ class InstallCommand(RequirementCommand): +@@ -54,6 +55,12 @@ def __init__(self, *args, **kw): super(InstallCommand, self).__init__(*args, **kw) @@ -61,7 +57,7 @@ cmd_opts = self.cmd_opts cmd_opts.add_option(cmdoptions.constraints()) -@@ -103,6 +110,7 @@ class InstallCommand(RequirementCommand): +@@ -103,6 +110,7 @@ '-I', '--ignore-installed', dest='ignore_installed', action='store_true', @@ -69,7 +65,7 @@ help='Ignore the installed packages (reinstalling instead).') cmd_opts.add_option(cmdoptions.no_deps()) -@@ -114,10 +122,20 @@ class InstallCommand(RequirementCommand): +@@ -114,10 +122,20 @@ '--user', dest='use_user_site', action='store_true', diff -Nru python-pip-8.1.1/debian/patches/skip-bad-requirements.patch python-pip-8.1.1/debian/patches/skip-bad-requirements.patch --- python-pip-8.1.1/debian/patches/skip-bad-requirements.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-pip-8.1.1/debian/patches/skip-bad-requirements.patch 2016-08-09 20:24:14.000000000 +0000 @@ -0,0 +1,49 @@ +From bf0262170b9b02149d5e8d3266bd1e86b03b5650 Mon Sep 17 00:00:00 2001 +From: Barry Warsaw +Date: Thu, 16 Jun 2016 15:29:12 +0300 +Subject: Warn and skip broken requirements. + +Description: Warn and skip broken requirements. +Origin: https://github.com/pypa/pip/pull/3704 +Bug: https://github.com/pypa/pip/issues/3681 +Forwarded: not-needed + +Patch-Name: skip-bad-requirements.patch +--- + pip/operations/freeze.py | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/pip/operations/freeze.py b/pip/operations/freeze.py +index 086922e..7493ced 100644 +--- a/pip/operations/freeze.py ++++ b/pip/operations/freeze.py +@@ -8,6 +8,7 @@ from pip.req import InstallRequirement + from pip.utils import get_installed_distributions + from pip._vendor import pkg_resources + from pip._vendor.packaging.utils import canonicalize_name ++from pip._vendor.pkg_resources import RequirementParseError + + + logger = logging.getLogger(__name__) +@@ -42,10 +43,17 @@ def freeze( + for dist in get_installed_distributions(local_only=local_only, + skip=(), + user_only=user_only): +- req = pip.FrozenRequirement.from_dist( +- dist, +- dependency_links +- ) ++ try: ++ req = pip.FrozenRequirement.from_dist( ++ dist, ++ dependency_links ++ ) ++ except RequirementParseError: ++ logger.warning( ++ "Could not parse requirement: %s", ++ dist.project_name ++ ) ++ continue + installations[req.name] = req + + if requirement: diff -Nru python-pip-8.1.1/debian/rules python-pip-8.1.1/debian/rules --- python-pip-8.1.1/debian/rules 2016-04-14 18:58:14.000000000 +0000 +++ python-pip-8.1.1/debian/rules 2016-08-09 20:24:14.000000000 +0000 @@ -52,6 +52,7 @@ dirtbike packaging dirtbike pkg_resources dirtbike progress + dirtbike pyparsing dirtbike requests dirtbike retrying dirtbike setuptools diff -Nru python-pip-8.1.1/debian/tests/control python-pip-8.1.1/debian/tests/control --- python-pip-8.1.1/debian/tests/control 2016-04-14 18:58:14.000000000 +0000 +++ python-pip-8.1.1/debian/tests/control 2016-11-09 13:44:41.000000000 +0000 @@ -1,9 +1,15 @@ Tests: pip2-root.sh -Restrictions: needs-root +Restrictions: needs-root,needs-recommends Tests: pip3-root.sh -Restrictions: needs-root +Restrictions: needs-root,needs-recommends Tests: pip2-user.sh +Restrictions: needs-recommends Tests: pip3-user.sh +Restrictions: needs-recommends + +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823358 +Tests: pip3-editable.sh +Restrictions: needs-recommends diff -Nru python-pip-8.1.1/debian/tests/pip2-root.sh python-pip-8.1.1/debian/tests/pip2-root.sh --- python-pip-8.1.1/debian/tests/pip2-root.sh 2016-04-14 18:58:14.000000000 +0000 +++ python-pip-8.1.1/debian/tests/pip2-root.sh 2016-11-09 13:44:41.000000000 +0000 @@ -1,6 +1,8 @@ #!/bin/sh -pip install world +export PIP_DISABLE_PIP_VERSION_CHECK=1 + +pip install world==3.1 pip list ls -ld /usr/local/lib/python2.*/dist-packages/world-*.dist-info pip uninstall -y world diff -Nru python-pip-8.1.1/debian/tests/pip2-user.sh python-pip-8.1.1/debian/tests/pip2-user.sh --- python-pip-8.1.1/debian/tests/pip2-user.sh 2016-04-14 18:58:14.000000000 +0000 +++ python-pip-8.1.1/debian/tests/pip2-user.sh 2016-11-09 13:44:41.000000000 +0000 @@ -1,8 +1,9 @@ #!/bin/sh export HOME=$ADTTMP +export PIP_DISABLE_PIP_VERSION_CHECK=1 -pip install world +pip install world==3.1 pip list ls -ld $HOME/.local/lib/python2.*/site-packages/world-*.dist-info pip uninstall -y world diff -Nru python-pip-8.1.1/debian/tests/pip3-editable.sh python-pip-8.1.1/debian/tests/pip3-editable.sh --- python-pip-8.1.1/debian/tests/pip3-editable.sh 1970-01-01 00:00:00.000000000 +0000 +++ python-pip-8.1.1/debian/tests/pip3-editable.sh 2016-08-09 20:24:14.000000000 +0000 @@ -0,0 +1,21 @@ +#!/bin/sh + +export HOME=$ADTTMP +export PIP_DISABLE_PIP_VERSION_CHECK=1 + +cd $HOME +mkdir stupid +cat > stupid/setup.py <