The Python package installer https://pip.pypa.io/
Go to file
Erik Rose 925e4b4466 Fix false hash mismatches when installing a package that has a cached wheel.
This would occur when, for example, installing from a requirements file that references a certain hashed sdist, a common situation.

As of pip 7, pip always tries to build a wheel for each requirement (if one wasn't provided directly) and installs from that. The way this was implemented, InstallRequirement.link pointed to the cached wheel, which obviously had a different hash than the index-sourced archive, so spurious mismatch errors would result.

Now we no longer read from the wheel cache in hash-checking mode.

Make populate_link(), rather than the `link` setter, responsible for mapping InstallRequirement.link to a cached wheel. populate_link() isn't called until until prepare_files(). At that point, when we've examined all InstallRequirements and their potential --hash options, we know whether we should be requiring hashes and thus whether to use the wheel cache at all.

The only place that sets InstallRequirement.link other than InstallRequirement itself is pip.wheel, which does so long after hashes have been checked, when it's unpacking the wheel it just built, so it won't cause spurious hash mismatches.
2015-10-19 23:40:00 -04:00
.travis Drop support for Python 3.2 2015-10-01 09:36:16 -04:00
contrib Bump get-pip.py to 7.1.2 2015-08-22 18:48:46 -04:00
docs Fix false hash mismatches when installing a package that has a cached wheel. 2015-10-19 23:40:00 -04:00
pip Fix false hash mismatches when installing a package that has a cached wheel. 2015-10-19 23:40:00 -04:00
tasks Attempt to install Wheel in get-pip.py 2015-05-21 22:22:45 -04:00
tests Fix false hash mismatches when installing a package that has a cached wheel. 2015-10-19 23:40:00 -04:00
.coveragerc Show coverage information for tests 2014-06-30 20:59:32 -04:00
.gitignore Use diff-cover to show the change in coverage 2014-06-30 23:17:27 -04:00
.mailmap Update the AUTHORS.txt file 2015-04-07 00:37:41 -04:00
.travis.yml Drop support for Python 3.2 2015-10-01 09:36:16 -04:00
AUTHORS.txt Updating e-mail address. 2015-07-06 21:57:24 +01:00
CHANGES.txt Merge pull request #3153 from xavfernandez/error_project_name_mismatch 2015-10-05 23:54:09 +02:00
LICENSE.txt Bump year 2014-01-02 08:16:28 -05:00
MANIFEST.in Move dev reqs from tox.ini to dev-requirements.txt 2014-12-17 23:36:29 -08:00
README.rst Use shield.io badges in readme 2015-09-21 03:16:53 +10:00
dev-requirements.txt Pin pytest==2.7.2 to avoid failing tests 2015-09-29 14:00:03 +02:00
setup.cfg Use the new wheel config section 2015-10-02 01:26:59 +01:00
setup.py Drop support for Python 3.2 2015-10-01 09:36:16 -04:00
tox.ini Drop support for Python 3.2 2015-10-01 09:36:16 -04:00

README.rst

pip
===

The `PyPA recommended
<https://python-packaging-user-guide.readthedocs.org/en/latest/current.html>`_
tool for installing Python packages.

* `Installation <https://pip.pypa.io/en/stable/installing.html>`_
* `Documentation <https://pip.pypa.io/>`_
* `Changelog <https://pip.pypa.io/en/stable/news.html>`_
* `Github Page <https://github.com/pypa/pip>`_
* `Issue Tracking <https://github.com/pypa/pip/issues>`_
* `User mailing list <http://groups.google.com/group/python-virtualenv>`_
* `Dev mailing list <http://groups.google.com/group/pypa-dev>`_
* User IRC: #pypa on Freenode.
* Dev IRC: #pypa-dev on Freenode.


.. image:: https://img.shields.io/pypi/v/pip.svg
        :target: https://pypi.python.org/pypi/pip

.. image:: https://img.shields.io/travis/pypa/pip/develop.svg
   :target: http://travis-ci.org/pypa/pip


Code of Conduct
---------------

Everyone interacting in the pip project's codebases, issue trackers, chat
rooms, and mailing lists is expected to follow the `PyPA Code of Conduct`_.

.. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/