[Python-modules-commits] [python-pip] 01/08: Import python-pip_8.1.0.orig.tar.gz
Barry Warsaw
barry at moszumanska.debian.org
Mon Mar 7 16:25:52 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 97afa06ae7302f419beab22476d7c77d021649d1
Author: Barry Warsaw <barry at python.org>
Date: Mon Mar 7 11:14:30 2016 -0500
Import python-pip_8.1.0.orig.tar.gz
---
AUTHORS.txt | 25 +++
CHANGES.txt | 53 +++++-
MANIFEST.in | 1 +
PKG-INFO | 6 +-
README.rst | 4 +-
docs/installing.rst | 2 +-
docs/reference/pip_install.rst | 14 +-
docs/user_guide.rst | 13 +-
pip.egg-info/PKG-INFO | 6 +-
pip.egg-info/SOURCES.txt | 4 +
pip/__init__.py | 2 +-
pip/_vendor/__init__.py | 30 +--
pip/_vendor/packaging/__about__.py | 2 +-
pip/_vendor/packaging/requirements.py | 129 +++++++++++++
pip/_vendor/packaging/specifiers.py | 32 ++--
pip/_vendor/packaging/utils.py | 14 ++
pip/_vendor/pyparsing.py | 342 +++++++++++++++++++---------------
pip/_vendor/vendor.txt | 4 +-
pip/commands/__init__.py | 6 +-
pip/commands/completion.py | 3 +-
pip/commands/freeze.py | 17 +-
pip/commands/search.py | 11 +-
pip/commands/show.py | 23 +++
pip/compat/__init__.py | 12 +-
pip/compat/ordereddict.py | 129 +++++++++++++
pip/download.py | 21 ++-
pip/exceptions.py | 17 +-
pip/index.py | 19 +-
pip/operations/freeze.py | 20 +-
pip/pep425tags.py | 158 +++++++++++++---
pip/req/req_file.py | 4 +
pip/req/req_install.py | 106 ++++-------
pip/req/req_set.py | 3 +-
pip/utils/__init__.py | 13 +-
pip/utils/encoding.py | 23 +++
pip/vcs/git.py | 7 +-
pip/wheel.py | 7 +-
setup.cfg | 2 +-
38 files changed, 926 insertions(+), 358 deletions(-)
diff --git a/AUTHORS.txt b/AUTHORS.txt
index 61ca48e..ba76616 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -10,6 +10,8 @@ Andrei Geacar <andrei.geacar at gmail.com>
Andrey Bulgakov <mail at andreiko.ru>
Andy Freeland <andy.freeland at redjack.com>
Anrs Hu <anrs at douban.com>
+Antoine Musso <hashar at free.fr>
+Anton Ovchinnikov <revolver112 at gmail.com>
Anton Patrushev <apatrushev at gmail.com>
Antonio Alvarado Hernandez <tnotstar at gmail.com>
Antti Kaihola <akaihol+github at ambitone.com>
@@ -31,12 +33,15 @@ Bruno Renié <brutasse at gmail.com>
Buck Golemon <buck at yelp.com>
Bussonnier Matthias <bussonniermatthias at gmail.com>
Carl Meyer <carl at oddbird.net>
+Carlos Liam <carlos at aarzee.me>
Carol Willing <carolcode at willingconsulting.com>
+Cass <cass.petrus at gmail.com>
Chris Brinker <chris.brinker at gmail.com>
Chris Jerdonek <chris.jerdonek at gmail.com>
Chris McDonough <chrism at plope.com>
Chris Wolfe <chriswwolfe at gmail.com>
Christian Oudard <christian.oudard at gmail.com>
+Christopher Snyder <cnsnyder at users.noreply.github.com>
Clark Boylan <clark.boylan at gmail.com>
Clay McClure <clay at daemons.net>
Cody Soyland <codysoyland at gmail.com>
@@ -68,6 +73,7 @@ Donald Stufft <donald at stufft.io>
Dongweiming <dongweiming at admaster.com.cn>
Douglas Thor <dougthor42 at users.noreply.github.com>
Dwayne Bailey <dwayne at translate.org.za>
+Ed Morley <emorley at mozilla.com>
Emil Styrke <emil.styrke at gmail.com>
Endoh Takanao <djmchl at gmail.com>
enoch <lanxenet at gmail.com>
@@ -78,6 +84,7 @@ Erik Rose <erik at mozilla.com>
Eugene Vereshchagin <evvers at gmail.com>
Florian Briand <ownerfrance+github at hotmail.com>
Francesco <f.guerrieri at gmail.com>
+Francesco Montesano <franz.bergesund at gmail.com>
Gabriel de Perthuis <g2p.code at gmail.com>
Garry Polley <garrympolley at gmail.com>
Geoffrey Lehée <geoffrey at lehee.name>
@@ -110,8 +117,10 @@ jarondl <me at jarondl.net>
Jay Graves <jay at skabber.com>
Jeff Barber <jbarber at computer.org>
Jeff Dairiki <dairiki at dairiki.org>
+Jeremy Stanley <fungi at yuggoth.org>
Jim Garrison <jim at garrison.cc>
John-Scott Atlakson <john.scott.atlakson at gmail.com>
+Jon Banafato <jon at jonafato.com>
Jon Parise <jon at indelible.org>
Jon Wayne Parrott <jjramone13 at gmail.com>
Jonas Nockert <jonasnockert at gmail.com>
@@ -122,11 +131,14 @@ Josh Bronson <jabronson at gmail.com>
Josh Hansen <josh at skwash.net>
Josh Schneier <josh.schneier at gmail.com>
Julien Demoor <julien at jdemoor.com>
+jwg4 <jack.grahl at yahoo.co.uk>
Jyrki Pulliainen <jyrki at spotify.com>
Kamal Bin Mustafa <kamal at smach.net>
+kaustav haldar <hi at kaustav.me>
Kelsey Hightower <kelsey.hightower at gmail.com>
Kenneth Belitzky <kenny at belitzky.com>
Kenneth Reitz <me at kennethreitz.com>
+Kenneth Reitz <me at kennethreitz.org>
Kevin Burke <kev at inburke.com>
Kevin Carter <kevin.carter at rackspace.com>
Kevin Frommelt <kevin.frommelt at webfilings.com>
@@ -165,14 +177,17 @@ Miguel Araujo Perez <miguel.araujo.perez at gmail.com>
Mihir Singh <git.service at mihirsingh.com>
Min RK <benjaminrk at gmail.com>
MinRK <benjaminrk at gmail.com>
+montefra <franz.bergesund at gmail.com>
Monty Taylor <mordred at inaugust.com>
Nate Coraor <nate at bx.psu.edu>
Nathaniel J. Smith <njs at pobox.com>
Nick Coghlan <ncoghlan at gmail.com>
Nick Stenning <nick at whiteink.com>
Nowell Strite <nowell at strite.org>
+nvdv <modestdev at gmail.com>
Oliver Tonnhofer <olt at bogosoft.com>
Olivier Girardot <ssaboum at gmail.com>
+Olivier Grisel <olivier.grisel at ensta.org>
Ollie Rutherfurd <orutherfurd at gmail.com>
Oren Held <orenhe at il.ibm.com>
Oscar Benjamin <oscar.j.benjamin at gmail.com>
@@ -205,7 +220,11 @@ Richard Jones <r1chardj0n3s at gmail.com>
RobberPhex <robberphex at gmail.com>
Robert Collins <rbtcollins at hp.com>
Robert McGibbon <rmcgibbo at gmail.com>
+Robert T. McGibbon <rmcgibbo at gmail.com>
Roey Berman <roey.berman at gmail.com>
+Rohan Jain <crodjer at gmail.com>
+Rohan Jain <crodjer at users.noreply.github.com>
+Rohan Jain <mail at rohanjain.in>
Roman Bogorodskiy <roman.bogorodskiy at ericsson.com>
Romuald Brunet <romuald at chivil.com>
Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
@@ -213,17 +232,23 @@ Rory McCann <rory at technomancy.org>
Ross Brattain <ross.b.brattain at intel.com>
Roy Wellington Ⅳ <cactus_hugged at yahoo.com>
Roy Wellington Ⅳ <roy at mybasis.com>
+Ryan Wooden <rygwdn at gmail.com>
Sachi King <nakato at nakato.io>
+Salvatore Rinchiera <salvatore at rinchiera.com>
schlamar <marc.schlaich at gmail.com>
Scott Kitterman <sklist at kitterman.com>
+seanj <seanj at xyke.com>
Sergey Vasilyev <nolar at nolar.info>
Seth Woodworth <seth at sethish.com>
Simeon Visser <svisser at users.noreply.github.com>
Simon Cross <hodgestar at gmail.com>
Stavros Korokithakis <stavros at korokithakis.net>
Stefan Scherfke <stefan at sofa-rockers.org>
+Stephan Erb <stephan at dev.static-void.de>
Steve Kowalik <steven at wedontsleep.org>
Steven Myint <git at stevenmyint.com>
+stonebig <stonebig34 at gmail.com>
+Stéphane Bidoul (ACSONE) <stephane.bidoul at acsone.eu>
Stéphane Bidoul <stephane.bidoul at acsone.eu>
Stéphane Klein <contact at stephane-klein.info>
Takayuki SHIMIZUKAWA <shimizukawa at gmail.com>
diff --git a/CHANGES.txt b/CHANGES.txt
index 8816460..1740e26 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,51 @@
+**8.1.0 (2016-03-05)**
+
+* Implement PEP 513, which adds support for the manylinux1 platform tag,
+ allowing carefully compiled binary wheels to be installed on compatible Linux
+ platforms.
+
+* Allow wheels which are not specific to a particular Python interpreter but
+ which are specific to a particular platform (:issue:`3202`).
+
+* Fixed an issue where ``call_subprocess`` would crash trying to print debug
+ data on child process failure (:issue:`3521`, :pull:`3522`).
+
+* Exclude the wheel package from the `pip freeze` output (like pip and setuptools).
+ :issue:`2989`.
+
+* Allow installing modules from a subdirectory of a vcs repository
+ in non-editable mode (:issue:`3217`, :pull:`3466`).
+
+* Make pip wheel and pip download work with vcs urls with subdirectory option
+ (:pull:`3466`).
+
+* Show classifiers in ``pip show``.
+
+* Show PEP376 Installer in ``pip show`` (:issue:`3517`).
+
+* Unhide completion command (:pull:`1810`).
+
+* Show latest version number in ``pip search`` results (:pull:`1415`).
+
+* Decode requirement files according to their BOM if present (:pull:`3485`,
+ :issue:`2865`).
+
+* Fix and deprecate package name detection from url path (:issue:`3523` and
+ :pull:`3495`).
+
+* Correct the behavior where interpreter specific tags (such as cp34) were
+ being used on later versions of the same interprter instead of only for that
+ specific interpreter (:issue:`3472`).
+
+* Fix an issue where pip would erroneously install a 64 bit wheel on a 32 bit
+ Python running on a 64 bit OS X machine.
+
+* Do not assume that all git repositories have an origin remote.
+
+* Correctly display the line to add to a requirements.txt for an URL based
+ dependency when ``--require-hashes`` is enabled.
+
+
**8.0.3 (2016-02-25)**
* Make ``install --quiet`` really quiet. See :issue:`3418`.
@@ -16,11 +64,14 @@
* Improved support for Jython when quoting executables in output scripts.
+* Add a `--all` option to `pip freeze` to include usually skipped package
+ (like pip, setuptools and wheel) to the freeze output. :issue:`1610`.
+
**8.0.2 (2016-01-21)**
* Stop attempting to trust the system CA trust store because it's extremely
- common for them to be broken, often in incompatible ways. See #3416.
+ common for them to be broken, often in incompatible ways. See :pull:`3416`.
**8.0.1 (2016-01-21)**
diff --git a/MANIFEST.in b/MANIFEST.in
index c21d52b..3dac128 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -17,6 +17,7 @@ exclude appveyor.yml
recursive-include pip/_vendor *.pem
recursive-include docs Makefile *.rst *.py *.bat
+prune .github
prune .travis
prune docs/_build
prune contrib
diff --git a/PKG-INFO b/PKG-INFO
index 0abff38..7d986da 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pip
-Version: 8.0.3
+Version: 8.1.0
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
@@ -25,11 +25,13 @@ Description: pip
.. image:: https://img.shields.io/pypi/v/pip.svg
- :target: https://pypi.python.org/pypi/pip
+ :target: https://pypi.python.org/pypi/pip
.. image:: https://img.shields.io/travis/pypa/pip/develop.svg
:target: http://travis-ci.org/pypa/pip
+ .. image:: https://readthedocs.org/projects/pip/badge/?version=stable
+ :target: https://pip.pypa.io/en/stable
Code of Conduct
---------------
diff --git a/README.rst b/README.rst
index 9c80aff..6c343c7 100644
--- a/README.rst
+++ b/README.rst
@@ -17,11 +17,13 @@ tool for installing Python packages.
.. image:: https://img.shields.io/pypi/v/pip.svg
- :target: https://pypi.python.org/pypi/pip
+ :target: https://pypi.python.org/pypi/pip
.. image:: https://img.shields.io/travis/pypa/pip/develop.svg
:target: http://travis-ci.org/pypa/pip
+.. image:: https://readthedocs.org/projects/pip/badge/?version=stable
+ :target: https://pip.pypa.io/en/stable
Code of Conduct
---------------
diff --git a/docs/installing.rst b/docs/installing.rst
index 47c3b64..2b9ae7e 100644
--- a/docs/installing.rst
+++ b/docs/installing.rst
@@ -36,7 +36,7 @@ Then run the following:
system or another package manager. get-pip.py does not coordinate with
those tools, and may leave your system in an inconsistent state.
-get-pip.py will also intall :ref:`pypug:setuptools` [3]_ and :ref:`pypug:wheel`,
+get-pip.py will also install :ref:`pypug:setuptools` [3]_ and :ref:`pypug:wheel`,
if they're not already. :ref:`pypug:setuptools` is required to install
:term:`source distributions <pypug:Source Distribution (or "sdist")>`. Both are
required to be able to build a :ref:`Wheel cache` (which improves installation
diff --git a/docs/reference/pip_install.rst b/docs/reference/pip_install.rst
index 2775763..74c9b3b 100644
--- a/docs/reference/pip_install.rst
+++ b/docs/reference/pip_install.rst
@@ -191,7 +191,7 @@ Use ``pip install -r example-requirements.txt`` to install::
docopt == 0.6.1 # Version Matching. Must be version 0.6.1
keyring >= 4.1.1 # Minimum version 4.1.1
coverage != 3.5 # Version Exclusion. Anything except version 3.5
- Mopidy-Dirble ~= 1.1 # Compatible release. Same as >= 1.1, == 1.1.*
+ Mopidy-Dirble ~= 1.1 # Compatible release. Same as >= 1.1, == 1.*
#
###### Refer to other requirements files ######
-r other-requirements.txt
@@ -229,7 +229,7 @@ Some examples:
SomeProject[foo, bar]
SomeProject~=1.4.2
-Since version 6.0, pip also supports specifers containing `environment markers
+Since version 6.0, pip also supports specifiers containing `environment markers
<https://www.python.org/dev/peps/pep-0426/#environment-markers>`_ like so:
::
@@ -345,10 +345,6 @@ So if your repository layout is:
You'll need to use ``pip install -e vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir``.
-.. note::
-
- The subdirectory component can currently only be used for editable installs.
-
Git
~~~
@@ -521,8 +517,8 @@ Since version 8.0, pip can check downloaded package archives against local
hashes to protect against remote tampering. To verify a package against one or
more hashes, add them to the end of the line::
- FooProject == 1.2 --hash:sha256=2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 \
- --hash:sha256=486ea46224d1bb4fb680f34f7c9ad96a8f24ec88be73ea8e5a6c65260e9cb8a7
+ FooProject == 1.2 --hash=sha256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 \
+ --hash=sha256:486ea46224d1bb4fb680f34f7c9ad96a8f24ec88be73ea8e5a6c65260e9cb8a7
(The ability to use multiple hashes is important when a package has both
binary and source distributions or when it offers binary distributions for a
@@ -586,7 +582,7 @@ cache flushes. Compilation of C code adds further nondeterminism, as many
compilers include random-seeded values in their output. However, wheels fetched
from index servers are the same every time. They land in pip's HTTP cache, not
its wheel cache, and are used normally in hash-checking mode. The only downside
-of having the the wheel cache disabled is thus extra build time for sdists, and
+of having the wheel cache disabled is thus extra build time for sdists, and
this can be solved by making sure pre-built wheels are available from the index
server.
diff --git a/docs/user_guide.rst b/docs/user_guide.rst
index 90f941c..6bffdc2 100644
--- a/docs/user_guide.rst
+++ b/docs/user_guide.rst
@@ -42,7 +42,8 @@ installed using :ref:`pip install` like so:
Details on the format of the files are here: :ref:`Requirements File Format`.
Logically, a Requirements file is just a list of :ref:`pip install` arguments
-placed in a file.
+placed in a file. Note that you should not rely on the items in the file being
+installed by pip in any particular order.
In practice, there are 4 common uses of Requirements files:
@@ -86,7 +87,7 @@ In practice, there are 4 common uses of Requirements files:
4. Requirements files are used to override a dependency with a local patch that
lives in version control. For example, suppose a dependency,
`SomeDependency` from PyPI has a bug, and you can't wait for an upstream fix.
- You could clone/copy the src, make the fix, and place it in vcs with the tag
+ You could clone/copy the src, make the fix, and place it in VCS with the tag
`sometag`. You'd reference it in your requirements file with a line like so:
::
@@ -434,7 +435,7 @@ To setup for zsh::
$ pip completion --zsh >> ~/.zprofile
Alternatively, you can use the result of the ``completion`` command
-directly with the eval function of you shell, e.g. by adding the following to your startup file::
+directly with the eval function of your shell, e.g. by adding the following to your startup file::
eval "`pip completion --bash`"
@@ -478,12 +479,12 @@ satisfy the new parent requirements.
E.g. supposing:
* `SomePackage-1.0` requires `AnotherPackage>=1.0`
-* `SomePackage-2.0` requires `AnotherPackage>=1.0` and `OneMorePoject==1.0`
+* `SomePackage-2.0` requires `AnotherPackage>=1.0` and `OneMorePackage==1.0`
* `SomePackage-1.0` and `AnotherPackage-1.0` are currently installed
* `SomePackage-2.0` and `AnotherPackage-2.0` are the latest versions available on PyPI.
Running ``pip install --upgrade SomePackage`` would upgrade `SomePackage` *and*
-`AnotherPackage` despite `AnotherPackage` already being satisifed.
+`AnotherPackage` despite `AnotherPackage` already being satisfied.
pip doesn't currently have an option to do an "only if needed" recursive
upgrade, but you can achieve it using these 2 steps::
@@ -621,7 +622,7 @@ Hash-checking Mode
Beyond pinning version numbers, you can add hashes against which to verify
downloaded packages::
- FooProject == 1.2 --hash:sha256=2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
+ FooProject == 1.2 --hash=sha256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
This protects against a compromise of PyPI or the HTTPS
certificate chain. It also guards against a package changing
diff --git a/pip.egg-info/PKG-INFO b/pip.egg-info/PKG-INFO
index 0abff38..7d986da 100644
--- a/pip.egg-info/PKG-INFO
+++ b/pip.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pip
-Version: 8.0.3
+Version: 8.1.0
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
@@ -25,11 +25,13 @@ Description: pip
.. image:: https://img.shields.io/pypi/v/pip.svg
- :target: https://pypi.python.org/pypi/pip
+ :target: https://pypi.python.org/pypi/pip
.. image:: https://img.shields.io/travis/pypa/pip/develop.svg
:target: http://travis-ci.org/pypa/pip
+ .. image:: https://readthedocs.org/projects/pip/badge/?version=stable
+ :target: https://pip.pypa.io/en/stable
Code of Conduct
---------------
diff --git a/pip.egg-info/SOURCES.txt b/pip.egg-info/SOURCES.txt
index 79909b9..8b1e554 100644
--- a/pip.egg-info/SOURCES.txt
+++ b/pip.egg-info/SOURCES.txt
@@ -149,7 +149,9 @@ pip/_vendor/packaging/__init__.py
pip/_vendor/packaging/_compat.py
pip/_vendor/packaging/_structures.py
pip/_vendor/packaging/markers.py
+pip/_vendor/packaging/requirements.py
pip/_vendor/packaging/specifiers.py
+pip/_vendor/packaging/utils.py
pip/_vendor/packaging/version.py
pip/_vendor/pkg_resources/__init__.py
pip/_vendor/progress/__init__.py
@@ -252,6 +254,7 @@ pip/commands/uninstall.py
pip/commands/wheel.py
pip/compat/__init__.py
pip/compat/dictconfig.py
+pip/compat/ordereddict.py
pip/models/__init__.py
pip/models/index.py
pip/operations/__init__.py
@@ -265,6 +268,7 @@ pip/utils/__init__.py
pip/utils/appdirs.py
pip/utils/build.py
pip/utils/deprecation.py
+pip/utils/encoding.py
pip/utils/filesystem.py
pip/utils/hashes.py
pip/utils/logging.py
diff --git a/pip/__init__.py b/pip/__init__.py
index 6be4612..c688a5a 100755
--- a/pip/__init__.py
+++ b/pip/__init__.py
@@ -30,7 +30,7 @@ import pip.cmdoptions
cmdoptions = pip.cmdoptions
# The version as used in the setup.py and the docs conf.py
-__version__ = "8.0.3"
+__version__ = "8.1.0"
logger = logging.getLogger(__name__)
diff --git a/pip/_vendor/__init__.py b/pip/_vendor/__init__.py
index b09a7c3..d0e7b34 100644
--- a/pip/_vendor/__init__.py
+++ b/pip/_vendor/__init__.py
@@ -32,10 +32,22 @@ def vendored(modulename):
try:
__import__(vendored_name, globals(), locals(), level=0)
except ImportError:
- __import__(modulename, globals(), locals(), level=0)
- sys.modules[vendored_name] = sys.modules[modulename]
- base, head = vendored_name.rsplit(".", 1)
- setattr(sys.modules[base], head, sys.modules[modulename])
+ try:
+ __import__(modulename, globals(), locals(), level=0)
+ except ImportError:
+ # We can just silently allow import failures to pass here. If we
+ # got to this point it means that ``import pip._vendor.whatever``
+ # failed and so did ``import whatever``. Since we're importing this
+ # upfront in an attempt to alias imports, not erroring here will
+ # just mean we get a regular import error whenever pip *actually*
+ # tries to import one of these modules to use it, which actually
+ # gives us a better error message than we would have otherwise
+ # gotten.
+ pass
+ else:
+ sys.modules[vendored_name] = sys.modules[modulename]
+ base, head = vendored_name.rsplit(".", 1)
+ setattr(sys.modules[base], head, sys.modules[modulename])
# If we're operating in a debundled setup, then we want to go ahead and trigger
@@ -70,14 +82,8 @@ if DEBUNDLED:
vendored("requests.packages.urllib3.connection")
vendored("requests.packages.urllib3.connectionpool")
vendored("requests.packages.urllib3.contrib")
- try:
- vendored("requests.packages.urllib3.contrib.ntlmpool")
- except ImportError:
- pass
- try:
- vendored("requests.packages.urllib3.contrib.pyopenssl")
- except ImportError:
- pass
+ vendored("requests.packages.urllib3.contrib.ntlmpool")
+ vendored("requests.packages.urllib3.contrib.pyopenssl")
vendored("requests.packages.urllib3.exceptions")
vendored("requests.packages.urllib3.fields")
vendored("requests.packages.urllib3.filepost")
diff --git a/pip/_vendor/packaging/__about__.py b/pip/_vendor/packaging/__about__.py
index d5e8408..47e5a6f 100644
--- a/pip/_vendor/packaging/__about__.py
+++ b/pip/_vendor/packaging/__about__.py
@@ -12,7 +12,7 @@ __title__ = "packaging"
__summary__ = "Core utilities for Python packages"
__uri__ = "https://github.com/pypa/packaging"
-__version__ = "16.0"
+__version__ = "16.5"
__author__ = "Donald Stufft and individual contributors"
__email__ = "donald at stufft.io"
diff --git a/pip/_vendor/packaging/requirements.py b/pip/_vendor/packaging/requirements.py
new file mode 100644
index 0000000..49a4385
--- /dev/null
+++ b/pip/_vendor/packaging/requirements.py
@@ -0,0 +1,129 @@
+# This file is dual licensed under the terms of the Apache License, Version
+# 2.0, and the BSD License. See the LICENSE file in the root of this repository
+# for complete details.
+from __future__ import absolute_import, division, print_function
+
+import string
+import re
+
+from pip._vendor.pyparsing import (
+ stringStart, stringEnd, originalTextFor, ParseException
+)
+from pip._vendor.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine
+from pip._vendor.pyparsing import Literal as L # noqa
+from pip._vendor.six.moves.urllib import parse as urlparse
+
+from .markers import MARKER_EXPR, Marker
+from .specifiers import LegacySpecifier, Specifier, SpecifierSet
+
+
+class InvalidRequirement(ValueError):
+ """
+ An invalid requirement was found, users should refer to PEP 508.
+ """
+
+
+ALPHANUM = Word(string.ascii_letters + string.digits)
+
+LBRACKET = L("[").suppress()
+RBRACKET = L("]").suppress()
+LPAREN = L("(").suppress()
+RPAREN = L(")").suppress()
+COMMA = L(",").suppress()
+SEMICOLON = L(";").suppress()
+AT = L("@").suppress()
+
+PUNCTUATION = Word("-_.")
+IDENTIFIER_END = ALPHANUM | (ZeroOrMore(PUNCTUATION) + ALPHANUM)
+IDENTIFIER = Combine(ALPHANUM + ZeroOrMore(IDENTIFIER_END))
+
+NAME = IDENTIFIER("name")
+EXTRA = IDENTIFIER
+
+URI = Regex(r'[^ ]+')("url")
+URL = (AT + URI)
+
+EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA)
+EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras")
+
+VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE)
+VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE)
+
+VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY
+VERSION_MANY = Combine(VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE),
+ joinString=",", adjacent=False)("_raw_spec")
+_VERSION_SPEC = Optional(((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY))
+_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or '')
+
+VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier")
+VERSION_SPEC.setParseAction(lambda s, l, t: t[1])
+
+MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
+MARKER_EXPR.setParseAction(
+ lambda s, l, t: Marker(s[t._original_start:t._original_end])
+)
+MARKER_SEPERATOR = SEMICOLON
+MARKER = MARKER_SEPERATOR + MARKER_EXPR
+
+VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER)
+URL_AND_MARKER = URL + Optional(MARKER)
+
+NAMED_REQUIREMENT = \
+ NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER)
+
+REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd
+
+
+class Requirement(object):
+ """Parse a requirement.
+
+ Parse a given requirement string into its parts, such as name, specifier,
+ URL, and extras. Raises InvalidRequirement on a badly-formed requirement
+ string.
+ """
+
+ # TODO: Can we test whether something is contained within a requirement?
+ # If so how do we do that? Do we need to test against the _name_ of
+ # the thing as well as the version? What about the markers?
+ # TODO: Can we normalize the name and extra name?
+
+ def __init__(self, requirement_string):
+ try:
+ req = REQUIREMENT.parseString(requirement_string)
+ except ParseException as e:
+ raise InvalidRequirement(
+ "Invalid requirement, parse error at \"{0!r}\"".format(
+ requirement_string[e.loc:e.loc + 8]))
+
+ self.name = req.name
+ if req.url:
+ parsed_url = urlparse.urlparse(req.url)
+ if not (parsed_url.scheme and parsed_url.netloc) or (
+ not parsed_url.scheme and not parsed_url.netloc):
+ raise InvalidRequirement("Invalid URL given")
+ self.url = req.url
+ else:
+ self.url = None
+ self.extras = set(req.extras.asList() if req.extras else [])
+ self.specifier = SpecifierSet(req.specifier)
+ self.marker = req.marker if req.marker else None
+
+ def __str__(self):
+ parts = [self.name]
+
+ if self.extras:
+ parts.append("[{0}]".format(",".join(sorted(self.extras))))
+
+ if self.specifier:
+ parts.append(str(self.specifier))
+
+ if self.url:
+ parts.append("@ {0}".format(self.url))
+
+ if self.marker:
+ parts.append("; {0}".format(self.marker))
+
+ return "".join(parts)
+
+ def __repr__(self):
+ return "<Requirement({0!r})>".format(str(self))
diff --git a/pip/_vendor/packaging/specifiers.py b/pip/_vendor/packaging/specifiers.py
index e37e098..7f5a76c 100644
--- a/pip/_vendor/packaging/specifiers.py
+++ b/pip/_vendor/packaging/specifiers.py
@@ -213,23 +213,23 @@ class _IndividualSpecifier(BaseSpecifier):
class LegacySpecifier(_IndividualSpecifier):
- _regex = re.compile(
+ _regex_str = (
r"""
- ^
- \s*
(?P<operator>(==|!=|<=|>=|<|>))
\s*
(?P<version>
- [^\s]* # We just match everything, except for whitespace since this
- # is a "legacy" specifier and the version string can be just
- # about anything.
+ [^,;\s)]* # Since this is a "legacy" specifier, and the version
+ # string can be just about anything, we match everything
+ # except for whitespace, a semi-colon for marker support,
+ # a closing paren since versions can be enclosed in
+ # them, and a comma since it's a version separator.
)
- \s*
- $
- """,
- re.VERBOSE | re.IGNORECASE,
+ """
)
+ _regex = re.compile(
+ r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE)
+
_operators = {
"==": "equal",
"!=": "not_equal",
@@ -274,10 +274,8 @@ def _require_version_compare(fn):
class Specifier(_IndividualSpecifier):
- _regex = re.compile(
+ _regex_str = (
r"""
- ^
- \s*
(?P<operator>(~=|==|!=|<=|>=|<|>|===))
(?P<version>
(?:
@@ -368,12 +366,12 @@ class Specifier(_IndividualSpecifier):
(?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release
)
)
- \s*
- $
- """,
- re.VERBOSE | re.IGNORECASE,
+ """
)
+ _regex = re.compile(
+ r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE)
+
_operators = {
"~=": "compatible",
"==": "equal",
diff --git a/pip/_vendor/packaging/utils.py b/pip/_vendor/packaging/utils.py
new file mode 100644
index 0000000..942387c
--- /dev/null
+++ b/pip/_vendor/packaging/utils.py
@@ -0,0 +1,14 @@
+# This file is dual licensed under the terms of the Apache License, Version
+# 2.0, and the BSD License. See the LICENSE file in the root of this repository
+# for complete details.
+from __future__ import absolute_import, division, print_function
+
+import re
+
+
+_canonicalize_regex = re.compile(r"[-_.]+")
+
+
+def canonicalize_name(name):
+ # This is taken from PEP 503.
+ return _canonicalize_regex.sub("-", name).lower()
diff --git a/pip/_vendor/pyparsing.py b/pip/_vendor/pyparsing.py
index ed96aec..39c2b82 100644
--- a/pip/_vendor/pyparsing.py
+++ b/pip/_vendor/pyparsing.py
@@ -57,8 +57,8 @@ The pyparsing module handles some of the problems that are typically vexing when
- embedded comments
"""
-__version__ = "2.0.7"
-__versionTime__ = "17 Dec 2015 04:11"
+__version__ = "2.1.0"
+__versionTime__ = "7 Feb 2016 14:09"
__author__ = "Paul McGuire <ptmcg at users.sourceforge.net>"
import string
@@ -72,6 +72,7 @@ import collections
import pprint
import functools
import itertools
+import traceback
#~ sys.stderr.write( "testing pyparsing module, version %s, %s\n" % (__version__,__versionTime__ ) )
@@ -81,12 +82,12 @@ __all__ = [
'MatchFirst', 'NoMatch', 'NotAny', 'OneOrMore', 'OnlyOnce', 'Optional', 'Or',
'ParseBaseException', 'ParseElementEnhance', 'ParseException', 'ParseExpression', 'ParseFatalException',
'ParseResults', 'ParseSyntaxException', 'ParserElement', 'QuotedString', 'RecursiveGrammarException',
-'Regex', 'SkipTo', 'StringEnd', 'StringStart', 'Suppress', 'Token', 'TokenConverter', 'Upcase',
+'Regex', 'SkipTo', 'StringEnd', 'StringStart', 'Suppress', 'Token', 'TokenConverter',
'White', 'Word', 'WordEnd', 'WordStart', 'ZeroOrMore',
'alphanums', 'alphas', 'alphas8bit', 'anyCloseTag', 'anyOpenTag', 'cStyleComment', 'col',
'commaSeparatedList', 'commonHTMLEntity', 'countedArray', 'cppStyleComment', 'dblQuotedString',
'dblSlashComment', 'delimitedList', 'dictOf', 'downcaseTokens', 'empty', 'hexnums',
-'htmlComment', 'javaStyleComment', 'keepOriginalText', 'line', 'lineEnd', 'lineStart', 'lineno',
+'htmlComment', 'javaStyleComment', 'line', 'lineEnd', 'lineStart', 'lineno',
'makeHTMLTags', 'makeXMLTags', 'matchOnlyAtCol', 'matchPreviousExpr', 'matchPreviousLiteral',
'nestedExpr', 'nullDebugAction', 'nums', 'oneOf', 'opAssoc', 'operatorPrecedence', 'printables',
'punc8bit', 'pythonStyleComment', 'quotedString', 'removeQuotes', 'replaceHTMLEntity',
@@ -153,7 +154,7 @@ def _xml_escape(data):
class _Constants(object):
pass
-alphas = string.ascii_lowercase + string.ascii_uppercase
+alphas = string.ascii_uppercase + string.ascii_lowercase
nums = "0123456789"
hexnums = nums + "ABCDEFabcdef"
alphanums = alphas + nums
@@ -266,7 +267,7 @@ class ParseResults(object):
- by list index (C{results[0], results[1]}, etc.)
- by attribute (C{results.<resultsName>})
"""
- def __new__(cls, toklist, name=None, asList=True, modal=True ):
+ def __new__(cls, toklist=None, name=None, asList=True, modal=True ):
if isinstance(toklist, cls):
return toklist
retobj = object.__new__(cls)
@@ -275,12 +276,16 @@ class ParseResults(object):
# Performance tuning: we construct a *lot* of these, so keep this
# constructor as small and fast as possible
- def __init__( self, toklist, name=None, asList=True, modal=True, isinstance=isinstance ):
+ def __init__( self, toklist=None, name=None, asList=True, modal=True, isinstance=isinstance ):
if self.__doinit:
self.__doinit = False
self.__name = None
self.__parent = None
self.__accumNames = {}
+ self.__asList = asList
+ self.__modal = modal
+ if toklist is None:
+ toklist = []
if isinstance(toklist, list):
self.__toklist = toklist[:]
elif isinstance(toklist, _generatorType):
@@ -362,7 +367,7 @@ class ParseResults(object):
return k in self.__tokdict
def __len__( self ): return len( self.__toklist )
- def __bool__(self): return len( self.__toklist ) > 0
+ def __bool__(self): return ( not not self.__toklist )
__nonzero__ = __bool__
def __iter__( self ): return iter( self.__toklist )
def __reversed__( self ): return iter( self.__toklist[::-1] )
@@ -503,7 +508,11 @@ class ParseResults(object):
def __radd__(self, other):
if isinstance(other,int) and other == 0:
+ # useful for merging many ParseResults using sum() builtin
return self.copy()
+ else:
+ # this may raise a TypeError - so be it
+ return other + self
def __repr__( self ):
return "(%s, %s)" % ( repr( self.__toklist ), repr( self.__tokdict ) )
@@ -527,11 +536,12 @@ class ParseResults(object):
return [res.asList() if isinstance(res,ParseResults) else res for res in self.__toklist]
def asDict( self ):
- """Returns the named parse results as dictionary."""
+ """Returns the named parse results as a nested dictionary."""
if PY_3:
- return dict( self.items() )
+ item_fn = self.items
else:
- return dict( self.iteritems() )
+ item_fn = self.iteritems
+ return dict((k,v.asDict()) if isinstance(v, ParseResults) else (k,v) for k,v in item_fn())
def copy( self ):
"""Returns a new copy of a C{ParseResults} object."""
@@ -682,6 +692,9 @@ class ParseResults(object):
else:
self.__parent = None
+ def __getnewargs__(self):
+ return self.__toklist, self.__name, self.__asList, self.__modal
+
def __dir__(self):
return (dir(type(self)) + list(self.keys()))
@@ -766,16 +779,28 @@ def _trim_arity(func, maxargs=2):
def wrapper(*args):
while 1:
try:
- ret = func(*args[limit[0]:])
+ ret = func(*args[limit[0]:]) #~@$^*)+_(&%#!=-`~;:"[]{}
foundArity[0] = True
return ret
except TypeError:
- if limit[0] <= maxargs and not foundArity[0]:
+ # re-raise TypeErrors if they did not come from our arity testing
+ if foundArity[0]:
+ raise
+ else:
+ try:
+ tb = sys.exc_info()[-1]
+ exc_source_line = traceback.extract_tb(tb)[-1][-1]
+ if not exc_source_line.endswith('#~@$^*)+_(&%#!=-`~;:"[]{}'):
+ raise
+ finally:
+ del tb
+
+ if limit[0] <= maxargs:
limit[0] += 1
continue
raise
return wrapper
-
+
class ParserElement(object):
"""Abstract base level parser element class."""
DEFAULT_WHITE_CHARS = " \n\t\r"
@@ -1035,6 +1060,14 @@ class ParserElement(object):
return self._parse( instring, loc, doActions=False )[0]
except ParseFatalException:
raise ParseException( instring, loc, self.errmsg, self)
+
+ def canParseNext(self, instring, loc):
+ try:
+ self.tryParse(instring, loc)
+ except (ParseException, IndexError):
+ return False
+ else:
+ return True
# this method gets repeatedly called during backtracking with the same arguments -
# we can cache these arguments and save ourselves the trouble of re-parsing the contained expression
@@ -1715,7 +1748,7 @@ class Word(Token):
maximum, and/or exact length. The default value for C{min} is 1 (a
minimum value < 1 is not valid); the default values for C{max} and C{exact}
are 0, meaning no maximum or exact length restriction. An optional
- C{exclude} parameter can list characters that might be found in
+ C{excludeChars} parameter can list characters that might be found in
the input C{bodyChars} string; useful to define a word of all printables
except for one or two characters, for instance.
"""
@@ -1841,7 +1874,7 @@ class Regex(Token):
super(Regex,self).__init__()
if isinstance(pattern, basestring):
- if len(pattern) == 0:
+ if not pattern:
warnings.warn("null string passed to Regex; use Empty() instead",
SyntaxWarning, stacklevel=2)
@@ -1912,7 +1945,7 @@ class QuotedString(Token):
# remove white space from quote chars - wont work anyway
quoteChar = quoteChar.strip()
- if len(quoteChar) == 0:
+ if not quoteChar:
warnings.warn("quoteChar cannot be the empty string",SyntaxWarning,stacklevel=2)
raise SyntaxError()
@@ -1920,7 +1953,7 @@ class QuotedString(Token):
endQuoteChar = quoteChar
else:
endQuoteChar = endQuoteChar.strip()
- if len(endQuoteChar) == 0:
+ if not endQuoteChar:
warnings.warn("endQuoteChar cannot be the empty string",SyntaxWarning,stacklevel=2)
raise SyntaxError()
@@ -2589,16 +2622,14 @@ class Each(ParseExpression):
tmpExprs = tmpReqd + tmpOpt + self.multioptionals + self.multirequired
failed = []
for e in tmpExprs:
- try:
- tmpLoc = e.tryParse( instring, tmpLoc )
- except ParseException:
- failed.append(e)
- else:
+ if e.canParseNext(instring, tmpLoc):
matchOrder.append(self.opt1map.get(id(e),e))
if e in tmpReqd:
tmpReqd.remove(e)
elif e in tmpOpt:
tmpOpt.remove(e)
+ else:
+ failed.append(e)
if len(failed) == len(tmpExprs):
keepMatching = False
... 1684 lines suppressed ...
--
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