[Python-modules-commits] [python-pip] 06/16: merge patched into master
Barry Warsaw
barry at moszumanska.debian.org
Fri Jan 29 22:23:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
barry pushed a commit to branch master
in repository python-pip.
commit 775f88c3eea633e478a19f15606f0114728d52dc
Merge: b45c9ef 6e14ca5
Author: Barry Warsaw <barry at python.org>
Date: Fri Jan 29 14:35:39 2016 -0500
merge patched into master
AUTHORS.txt | 45 +-
CHANGES.txt | 157 +-
LICENSE.txt | 2 +-
MANIFEST.in | 2 +
PKG-INFO | 19 +-
README.rst | 15 +-
debian/.git-dpm | 6 +-
debian/patches/enable-debundling.patch | 4 +-
debian/patches/hands-off-system-packages.patch | 6 +-
debian/patches/use-wheels.patch | 6 +-
docs/conf.py | 2 +-
docs/development.rst | 8 +-
docs/index.rst | 7 +-
docs/installing.rst | 92 +-
docs/reference/index.rst | 4 +-
docs/reference/pip_download.rst | 53 +
docs/reference/pip_hash.rst | 49 +
docs/reference/pip_install.rst | 322 +-
docs/user_guide.rst | 108 +-
pip.egg-info/PKG-INFO | 19 +-
pip.egg-info/SOURCES.txt | 11 +-
pip.egg-info/entry_points.txt | 2 +-
pip.egg-info/pbr.json | 1 -
pip/__init__.py | 10 +-
pip/_vendor/README.rst | 139 +-
pip/_vendor/__init__.py | 34 +
pip/_vendor/cachecontrol/__init__.py | 2 +-
pip/_vendor/cachecontrol/_cmd.py | 60 +
pip/_vendor/cachecontrol/compat.py | 6 +
pip/_vendor/cachecontrol/controller.py | 92 +-
pip/_vendor/cachecontrol/heuristics.py | 12 +-
pip/_vendor/cachecontrol/serialize.py | 12 +-
pip/_vendor/colorama/__init__.py | 4 +-
pip/_vendor/colorama/ansi.py | 49 +-
pip/_vendor/colorama/ansitowin32.py | 18 +-
pip/_vendor/colorama/initialise.py | 23 +-
pip/_vendor/colorama/win32.py | 8 +
pip/_vendor/colorama/winterm.py | 21 +-
pip/_vendor/html5lib/__init__.py | 4 +-
pip/_vendor/html5lib/sanitizer.py | 10 +-
pip/_vendor/html5lib/treewalkers/etree.py | 2 +-
pip/_vendor/ipaddress.py | 8 +-
pip/_vendor/lockfile/__init__.py | 113 +-
pip/_vendor/lockfile/linklockfile.py | 6 +-
pip/_vendor/lockfile/mkdirlockfile.py | 11 +-
pip/_vendor/lockfile/pidlockfile.py | 21 +-
pip/_vendor/lockfile/sqlitelockfile.py | 9 +-
pip/_vendor/lockfile/symlinklockfile.py | 21 +-
pip/_vendor/packaging/__about__.py | 24 +-
pip/_vendor/packaging/__init__.py | 16 +-
pip/_vendor/packaging/_compat.py | 16 +-
pip/_vendor/packaging/_structures.py | 16 +-
pip/_vendor/packaging/markers.py | 275 ++
pip/_vendor/packaging/specifiers.py | 34 +-
pip/_vendor/packaging/version.py | 16 +-
pip/_vendor/pkg_resources/__init__.py | 170 +-
pip/_vendor/progress/bar.py | 19 +-
pip/_vendor/progress/counter.py | 6 +-
pip/_vendor/progress/helpers.py | 1 -
pip/_vendor/progress/spinner.py | 8 +-
pip/_vendor/pyparsing.py | 3801 ++++++++++++++++++++
pip/_vendor/requests/__init__.py | 14 +-
pip/_vendor/requests/adapters.py | 52 +-
pip/_vendor/requests/api.py | 18 +-
pip/_vendor/requests/auth.py | 69 +-
pip/_vendor/requests/cacert.pem | 2192 ++++++-----
pip/_vendor/requests/cookies.py | 24 +-
pip/_vendor/requests/exceptions.py | 15 +
pip/_vendor/requests/hooks.py | 17 +-
pip/_vendor/requests/models.py | 84 +-
pip/_vendor/requests/packages/__init__.py | 35 +-
pip/_vendor/requests/packages/urllib3/__init__.py | 34 +-
.../requests/packages/urllib3/_collections.py | 65 +-
.../requests/packages/urllib3/connection.py | 66 +-
.../requests/packages/urllib3/connectionpool.py | 93 +-
.../requests/packages/urllib3/contrib/appengine.py | 223 ++
.../requests/packages/urllib3/contrib/ntlmpool.py | 1 +
.../requests/packages/urllib3/contrib/pyopenssl.py | 45 +-
.../requests/packages/urllib3/exceptions.py | 38 +-
pip/_vendor/requests/packages/urllib3/fields.py | 1 +
pip/_vendor/requests/packages/urllib3/filepost.py | 1 +
.../requests/packages/urllib3/packages/__init__.py | 1 +
.../requests/packages/urllib3/poolmanager.py | 9 +-
pip/_vendor/requests/packages/urllib3/request.py | 16 +-
pip/_vendor/requests/packages/urllib3/response.py | 206 +-
.../requests/packages/urllib3/util/__init__.py | 20 +
.../requests/packages/urllib3/util/connection.py | 11 +-
.../requests/packages/urllib3/util/request.py | 1 +
.../requests/packages/urllib3/util/response.py | 52 +
.../requests/packages/urllib3/util/retry.py | 9 +-
pip/_vendor/requests/packages/urllib3/util/ssl_.py | 91 +-
.../requests/packages/urllib3/util/timeout.py | 8 +-
pip/_vendor/requests/packages/urllib3/util/url.py | 5 +-
pip/_vendor/requests/sessions.py | 49 +-
pip/_vendor/requests/status_codes.py | 3 +-
pip/_vendor/requests/utils.py | 98 +-
pip/_vendor/six.py | 74 +-
pip/_vendor/vendor.txt | 17 +-
pip/basecommand.py | 42 +-
pip/cmdoptions.py | 91 +-
pip/commands/__init__.py | 6 +
pip/commands/download.py | 136 +
pip/commands/hash.py | 57 +
pip/commands/install.py | 92 +-
pip/commands/list.py | 133 +-
pip/commands/search.py | 2 +-
pip/commands/show.py | 37 +-
pip/commands/wheel.py | 65 +-
pip/compat/__init__.py | 44 +-
pip/download.py | 161 +-
pip/exceptions.py | 193 +-
pip/index.py | 476 +--
pip/locations.py | 53 +-
pip/operations/freeze.py | 4 +-
pip/pep425tags.py | 116 +-
pip/req/req_file.py | 134 +-
pip/req/req_install.py | 238 +-
pip/req/req_set.py | 165 +-
pip/req/req_uninstall.py | 24 +-
pip/utils/__init__.py | 187 +-
pip/utils/appdirs.py | 48 +-
pip/utils/deprecation.py | 14 +-
pip/utils/hashes.py | 92 +
pip/utils/logging.py | 2 +-
pip/utils/outdated.py | 7 +-
pip/utils/setuptools_build.py | 6 +
pip/utils/ui.py | 142 +-
pip/vcs/__init__.py | 61 +-
pip/vcs/bazaar.py | 26 +-
pip/vcs/git.py | 127 +-
pip/vcs/mercurial.py | 48 +-
pip/vcs/subversion.py | 68 +-
pip/wheel.py | 109 +-
setup.cfg | 4 +-
setup.py | 2 +-
135 files changed, 9954 insertions(+), 3052 deletions(-)
diff --cc debian/.git-dpm
index 849866b,0000000..56b6461
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
+# see git-dpm(1) from git-dpm package
- 0ddf5c266e00c9cd5b02f0ae31939f5200c57e6d
- 0ddf5c266e00c9cd5b02f0ae31939f5200c57e6d
- 3be157ea672de9d85e0e888ac4080ebe66fb4782
++6e14ca521f088ea4bfc8eefa0dfff2118726a554
++6e14ca521f088ea4bfc8eefa0dfff2118726a554
++c9fd1b7c41802c64663a7a4646bf9b546f2389e2
+c9fd1b7c41802c64663a7a4646bf9b546f2389e2
+python-pip_8.0.2.orig.tar.gz
+974a8c345d272b9d9072287f399aab8410067f7e
+1130183
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/patches/enable-debundling.patch
index 8ac27d4,0000000..085d8e5
mode 100644,000000..100644
--- a/debian/patches/enable-debundling.patch
+++ b/debian/patches/enable-debundling.patch
@@@ -1,23 -1,0 +1,23 @@@
- From 0ddf5c266e00c9cd5b02f0ae31939f5200c57e6d Mon Sep 17 00:00:00 2001
++From 6e14ca521f088ea4bfc8eefa0dfff2118726a554 Mon Sep 17 00:00:00 2001
+From: Barry Warsaw <barry at python.org>
+Date: Thu, 3 Dec 2015 17:24:13 -0500
+Subject: Tell pip to alias the bundled packages.
+
+Patch-Name: enable-debundling.patch
+---
+ pip/_vendor/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pip/_vendor/__init__.py b/pip/_vendor/__init__.py
- index ef8851d..9e124b9 100644
++index b09a7c3..a96666b 100644
+--- a/pip/_vendor/__init__.py
++++ b/pip/_vendor/__init__.py
+@@ -14,7 +14,7 @@ import sys
+ # 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.
+-DEBUNDLED = False
++DEBUNDLED = True
+
+ # By default, look in this directory for a bunch of .whl files which we will
+ # add to the beginning of sys.path before attempting to import anything. This
diff --cc debian/patches/hands-off-system-packages.patch
index b3ecaf8,0000000..9fa1934
mode 100644,000000..100644
--- a/debian/patches/hands-off-system-packages.patch
+++ b/debian/patches/hands-off-system-packages.patch
@@@ -1,76 -1,0 +1,76 @@@
- From 0e48d234bf070aa842c247c7d4ae86ecc884b343 Mon Sep 17 00:00:00 2001
++From 6bbe98288a07a75097111aa29aa2a9e008e585e6 Mon Sep 17 00:00:00 2001
+From: Geoffrey Thomas <geofft at ldpreload.com>
+Date: Wed, 3 Dec 2014 11:18:11 -0600
+Subject: =?UTF-8?q?Prevent=20pip=20from=20removing=20system=20installed=20?=
+ =?UTF-8?q?packages=20Adjust=20is=5Flocal=20to=0Aconsider=20OS-owned=20pat?=
+ =?UTF-8?q?hs=20nonlocal.=20=20Fix=20error=20message=20for=20is=5Flocal=20?=
+ =?UTF-8?q?in=20the=0Anon-virtualenv=20case=0A.=0ASee=20Debian=20#771794?=
+ =?UTF-8?q?=20for=20the=20motivation.=0AFrom:=20Geoffrey=20Thomas=20<geoff?=
+ =?UTF-8?q?t at ldpreload.com>=0A.=0AWhile=20not=20committed=20upstream,=20th?=
+ =?UTF-8?q?e=20patch=20author=20has=20submitted=20it=20and=20it=20is=0Abei?=
+ =?UTF-8?q?ng=20reviewed.=20=20Upstream=20did=20provide=20positive=20feedb?=
+ =?UTF-8?q?ack=20for=20inclusion=20in=0ADebian.=0AAuthor:=20Geoffrey=20Tho?=
+ =?UTF-8?q?mas=20<geofft at ldpreload.com>=0ABug-Debian:=20http://bugs.debian?=
+ =?UTF-8?q?.org/771794=0AOrigin:=20https://github.com/geofft/pip.git=0AFor?=
+ =?UTF-8?q?warded:=20not-needed=0AReviewed-By:=20Donald=20Stufft=20<donald?=
+ =?UTF-8?q?@stufft.io>=0AReviewed-By:=20Scott=20Kitterman=20<scott at kitterm?=
+ =?UTF-8?q?an.com>=0ALast-Update:=202014-12-04?=
+
+Patch-Name: hands-off-system-packages.patch
+---
+ pip/utils/__init__.py | 35 ++++++++++++++++++++++++++---------
+ 1 file changed, 26 insertions(+), 9 deletions(-)
+
+diff --git a/pip/utils/__init__.py b/pip/utils/__init__.py
- index 46ee4fe..47c531c 100644
++index 4768ecb..ca54f34 100644
+--- a/pip/utils/__init__.py
++++ b/pip/utils/__init__.py
- @@ -324,22 +324,39 @@ def renames(old, new):
++@@ -275,22 +275,39 @@ def renames(old, new):
+
+ def is_local(path):
+ """
+- Return True if path is within sys.prefix, if we're running in a virtualenv.
++ 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.
++
++ If we're not in a virtualenv, in general we can modify anything.
++ However, if the OS vendor has configured distutils to install
++ somewhere other than sys.prefix (which could be a subdirectory of
++ sys.prefix, e.g. /usr/local), we consider sys.prefix itself nonlocal
++ and the domain of the OS vendor. (In other words, everything _other
++ than_ sys.prefix is considered local.)
+
+ """
+- if not running_under_virtualenv():
+- return True
+- return normalize_path(path).startswith(normalize_path(sys.prefix))
++
++ path = normalize_path(path)
++ prefix = normalize_path(sys.prefix)
++
++ if running_under_virtualenv():
++ return path.startswith(normalize_path(sys.prefix))
++ else:
++ if path.startswith(prefix):
++ for local_path in distutils_scheme("").values():
++ if path.startswith(normalize_path(local_path)):
++ return True
++ return False
++ else:
++ return True
+
+
+ def dist_is_local(dist):
+ """
+- Return True if given Distribution object is installed locally
+- (i.e. within current virtualenv).
+-
+- Always True if we're not in a virtualenv.
++ Return True if given Distribution object is installed somewhere pip
++ is allowed to modify.
+
+ """
+ return is_local(dist_location(dist))
diff --cc debian/patches/use-wheels.patch
index f1d6b95,0000000..8dd5670
mode 100644,000000..100644
--- a/debian/patches/use-wheels.patch
+++ b/debian/patches/use-wheels.patch
@@@ -1,109 -1,0 +1,109 @@@
- From c97723d5e8beb29a05254370683968ef5f737edc Mon Sep 17 00:00:00 2001
++From 8daa7d7a7e376b6dc27cfd7189ba7a90e080cd56 Mon Sep 17 00:00:00 2001
+From: Barry Warsaw <barry at debian.org>
+Date: Tue, 26 May 2015 15:53:34 -0400
+Subject: =?UTF-8?q?We=20need=20to=20add=20all=20the=20recursively=20devend?=
+ =?UTF-8?q?orized=20dependent=20wheels=20to=0Asys.path=20so=20that=20they?=
+ =?UTF-8?q?=20can=20be=20imported.=20=20These=20wheel=20files=20live=20in?=
+ =?UTF-8?q?=0Adifferent=20places=20depending=20on=20whether=20we're=20insi?=
+ =?UTF-8?q?de=20or=20outside=20a=20virtual=0Aenvironment.?=
+
+Forwarded: not-needed
+Patch-Name: use-wheels.patch
+---
+ pip/__init__.py | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ setup.py | 8 +++++++-
+ 2 files changed, 70 insertions(+), 1 deletion(-)
+
+diff --git a/pip/__init__.py b/pip/__init__.py
- index 114bd59..f48172b 100755
++index 0603ca1..00f19d2 100755
+--- a/pip/__init__.py
++++ b/pip/__init__.py
+@@ -8,6 +8,69 @@ import warnings
+
+ import sys
+ import re
++import errno
++
++# Upstream pip vendorizes a bunch of its dependencies. Debian de-vendorizes
++# (unbundles) these dependencies to be compliant with Debian policy. Instead,
++# these dependencies are packaged as wheel (.whl) files in a known location.
++# When pip itself executes, we have to arrange for these wheels to show up
++# earlier on sys.path than any other version of these packages, otherwise
++# things can break. See for example Bug #744145.
++#
++# The location of the wheels differs depending on whether we're inside or
++# outside a virtual environment, regardless of whether that venv was created
++# with virtualenv or pyvenv. The first thing we have to do is figure out if
++# we're inside or outside a venv, then search the appropriate wheel directory
++# and add all the .whls found there to the front of sys.path. As per Debian
++# Python Policy, only the wheels needed to support this de-vendorization will
++# be present, so it's safe to add them all.
++#
++# venv determination is a bit of a black art, but this algorithm should work
++# in both Python 2 (virtualenv-only) and Python 3 (pyvenv and virtualenv). -
++# updated by barry at debian.org 2015-02-25
++
++base_prefix = getattr(sys, 'base_prefix', None)
++real_prefix = getattr(sys, 'real_prefix', None)
++if base_prefix is None:
++ # Python 2 has no base_prefix at all. It also has no pyvenv. Fall back
++ # to checking real_prefix.
++ if real_prefix is None:
++ # We are not in a venv.
++ in_venv = False
++ else:
++ # We're in a Python 2 virtualenv created venv, but real_prefix should
++ # never be the same as sys.prefix.
++ assert sys.prefix != real_prefix
++ in_venv = True
++elif sys.prefix != base_prefix:
++ # We're in a Python 3, pyvenv created venv.
++ in_venv = True
++elif real_prefix is None:
++ # We're in Python 3, outside a venv, but base better equal prefix.
++ assert sys.prefix == base_prefix
++ in_venv = False
++else:
++ # We're in a Python 3, virtualenv created venv.
++ assert real_prefix != sys.prefix
++ in_venv = True
++
++
++if in_venv:
++ wheel_dir = os.path.join(sys.prefix, 'lib', 'python-wheels')
++else:
++ wheel_dir = '/usr/share/python-wheels'
++
++# We'll add all the wheels we find to the front of sys.path so that they're
++# found first, even if the same dependencies are available in site-packages.
++try:
++ for filename in os.listdir(wheel_dir):
++ if os.path.splitext(filename)[1] == '.whl':
++ sys.path.insert(0, os.path.join(wheel_dir, filename))
++# FileNotFoundError doesn't exist in Python 2, but ignore it anyway.
++except OSError as error:
++ if error.errno != errno.ENOENT:
++ raise
++
+
+ from pip.exceptions import InstallationError, CommandError, PipError
+ from pip.utils import get_installed_distributions, get_prog
+diff --git a/setup.py b/setup.py
- index 069cf51..60843e5 100644
++index 43bab40..75fa69e 100644
+--- a/setup.py
++++ b/setup.py
+@@ -41,7 +41,13 @@ def find_version(*file_paths):
+
+ long_description = read('README.rst')
+
+-tests_require = ['pytest', 'virtualenv>=1.10', 'scripttest>=1.3', 'mock']
++tests_require = ['pytest', 'scripttest>=1.3', 'mock']
++
++# In Debian, the virtualenv Build-Depends will satisfy this requirement
++# but setup() is too dumb to notice that.
++if sys.version_info < (3,):
++ tests_require.append('virtualenv>=1.10')
++
+
+
+ setup(
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pip.git
More information about the Python-modules-commits
mailing list