1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

77 commits

Author SHA1 Message Date
Donald Stufft c77d4ab55e Stop trying to locate system trust stores
We started trying to locate the system trust stores, because
downstream was patching out our bundled copies anyways and it would
provide a smoother experience when people upgraded their pip inside
of their system.

However, if we just use OpenSSL's CAFile then we're broken on systems
like Debian which currently ship a broken CAFile configuration. If
we just use OpenSSL's CAPath then we're broken on systems like CentOS
and Fedora that currently are shipping a broken OpenSSL CAPath.

So basically, none of the major distributions seem to be capable of
shipping an OpenSSL that isn't broken, so we're going back to relying
on our own CA bundle exclusively.
2016-01-21 16:19:34 -05:00
Donald Stufft 033fac5ee6 Allow all wheels from PyPI
It's unlikely that we're going to need any changes in pip itself
to support linux enabled wheels except for maybe a more specific
platform tag. If a more specific platform tag is needed then older
pip's won't install that anyways. This should allow experimentation
with some possible solutions to linux enabled wheels.
2016-01-14 13:54:31 -05:00
Erik Rose 3af5ffa5ce Improve flow of --require-hashes help message. 2015-10-19 23:40:01 -04:00
Erik Rose e23f59673e Consolidate hash constants in pip.utils.hashing. 2015-10-12 16:29:08 -04:00
Erik Rose 9e5e34e9f7 Add --algorithm flag to pip hash. 2015-10-12 14:05:10 -04:00
Erik Rose b95599a944 Change _good_hashes() to a whitelist.
This guards against the possibility of a weaker hash being added to hashlib in the future. Also give _good_hashes() a more descriptive name, and describe what we mean by "strong".

We can get away with returning a static list because those algorithms are guaranteed present in hashlib.
2015-10-10 22:44:12 -04:00
Erik Rose c62cd71f0f Add --require-hashes option to pip download and pip wheel.
Those commands already checked hashes, since they use RequirementSet, where the hash-checking is done.

Reorder some options so pre, no-clean, and require-hashes are always in the same order.
2015-10-07 17:33:57 -04:00
Erik Rose f3f73f1c07 Remove the -H spelling for --hashes.
dstufft is nervous about blowing a single-char option on something that will usually be copied and pasted anyway. We can always put it back later if it proves to be a pain.
2015-09-25 15:32:33 -04:00
Erik Rose 0c17248998 Pass PEP 8 checks. 2015-09-24 22:16:00 -04:00
Erik Rose 11dbb92440 Switch from --sha256 etc. to a single option: --hash.
Everybody seems to favor this. Spelled -H, it's still pretty short. And it is less unusual programmatically.
2015-09-24 22:16:00 -04:00
Erik Rose 3303be0c4e Teach requirements parser how to parser hash options, like --sha256.
We purposely keep it off the CLI for now. optparse isn't really geared to expose interspersed args and options, so a more heavy-handed approach will be necessary to support things like `pip install SomePackage --sha256=abcdef... OtherPackage --sha256=012345...`.
2015-09-23 17:39:32 -04:00
Mathew Jennings 417f79d8b8 Add pip download command and deprecate pip install --download.
`pip download` has the same functionality as `pip install --download`,
and the behavior of `pip install --download` is preserved with a deprecation
warning.  `pip install --download` will be removed in pip version 10.
2015-09-13 17:41:00 -04:00
Xavier Fernandez b290e13cfa Allow --pre option in requirement files
closes #1273
2015-09-05 23:13:03 +02:00
Donald Stufft 6afc718307 Remove items slated for removal in pip 8.0 2015-09-03 10:55:11 -04:00
Donald Stufft 0f5d4286a5 Deprecate and Noop the PEP 438 functionality due to PEP 470 2015-09-02 23:47:05 -04:00
Donald Stufft 8e3eaec559 Merge pull request #2857 from rbtcollins/issue-2731
Issue #2731: Constraints files.
2015-06-08 18:29:02 -04:00
Robert Collins bb0b429a49 Issue #2731: Constraints files.
This adds constraints files. Like requirements files constraints files
control what version of a package is installed, but unlike
requirements files this doesn't itself choose to install the package.
This allows things that aren't explicitly desired to be constrained if
and only if they are installed.
2015-06-03 06:38:33 +12:00
William ML Leslie e7d01268e8 Remove stray apostrophe 2015-06-02 15:07:41 +10:00
Robert Collins 582af6e684 Issue #2677: Disable wheels for setup.py options.
Using --install-options, --build-options, --global-options changes
the way that setup.py behaves, and isn't honoured by the wheel code.
The new wheel autobuilding code made this very obvious - disable
the use of wheels when these options are supplied.
2015-04-24 16:14:48 +12:00
Robert Collins 6aec23cafe Issue #2675: Granular control over wheels/sdists
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes #2084
2015-04-24 08:52:48 +12:00
Marcus Smith 764e468f42 refactor the requirements file parsing
two major changes:

1) re-use the optparse options in pip.cmdoptions instead of maintaining
   a custom parser

2) as a result of #1, simplify the call stack
    from:  parse_requirements -> parse_content -> parse_line
      to:  parse_requirements -> process_line

beyond #1/#2, minor cosmetics and adjusting the tests to match
2015-04-16 22:10:46 -07:00
Robert Collins 787d374034 Remove OptionMaker
This class just existed to let us call something later, which is
exactly what partial does for trivial cases. Because of mutable
default parameters actual functions are needed sometimes, but
I think on balance its an improvement.
2015-04-17 15:04:25 +12:00
Robert Collins 0e57ebc008 Make adding options be just function calls.
The .make is just sugar for 'call a function' that gets in the way of
just having functions.
2015-04-17 15:04:25 +12:00
Donald Stufft b7309c6bcc Remove the items deprecated for removal in 7.0 2015-04-07 04:20:51 -04:00
Donald Stufft 4a6b32e558 Imply --disable-pip-version-check when --no-index is used 2014-12-23 19:16:08 -05:00
Donald Stufft 8d3de97d34 Adjust tests to compensate for --trusted-hosts 2014-12-20 18:03:38 -05:00
Donald Stufft a5f88d1815 Adjust the --trusted-host help option 2014-12-20 17:36:16 -05:00
Donald Stufft a285747d3a Revert "Add option --no-check-certificate to skip ssl cert verification"
This reverts commit 9a9d7acefe.

Conflicts:
	pip/cmdoptions.py
2014-12-20 17:29:19 -05:00
Marc Abramowitz 954b818f24 Reduce duplication of 'pypi.python.org'
by creating a PyPI object

Before:

    $ ag --ignore=_vendor 'pypi.python.org' pip
    pip/cmdoptions.py
    195:    default='https://pypi.python.org/simple/',

    pip/commands/search.py
    33:            default='https://pypi.python.org/pypi',

    pip/index.py
    305:            if page is None and 'pypi.python.org' not in str(main_index_url):
    706:                        ).netloc.endswith("pypi.python.org")):

    pip/utils/outdated.py
    107:                "https://pypi.python.org/pypi/pip/json",

After:

    $ ag --ignore=_vendor 'pypi.python.org' pip
    pip/index.py
    77:PyPI = Index(url='https://pypi.python.org/', trusted=True)
2014-12-16 08:21:24 -08:00
Donald Stufft ddb2f1b459 Deprecate accessing non secure origins by default
* Deprecates accessing non secure origins by default, the list of
  which is taken from Chrome.
* Adds a --trusted-host flag to enable users to mark a specific
  host as a secure origin regardless of what we think.
* Refactors the original warning to better indicate the intent
  and the new flag.
2014-12-10 16:35:54 -05:00
Donald Stufft 15b2258769 Switch from 3 to 5 retries by default 2014-12-02 02:58:09 -05:00
Donald Stufft 90b1179b76 Enable --isolated flag which will turn on an isolated mode for pip 2014-11-23 21:26:40 -05:00
Donald Stufft 01610be0d5 Use a secure randomized build directory when possible 2014-11-11 20:19:10 -05:00
Donald Stufft c3df28c774 Fix for Python 3.x, Refactor, and small changes 2014-09-18 07:44:02 -04:00
Richard Jones 500a987ee4 Implement a pip self-check with to determine when it's out of date.
Initial work cribbed from PR 1214.
2014-09-18 17:31:57 +10:00
Donald Stufft 0e96b1af4b Switch versioning from X.Y.Z to X.Y dropping the leading 1 2014-09-17 22:05:31 -04:00
Donald Stufft 767d11e49c Switch to using the stdlib logger instead of pip.log 2014-09-10 09:36:09 -04:00
Donald Stufft e7c08b04d6 Merge pull request #1815 from pcx/develop
update help to make Package Index Options' usage clearer, ref #1814
2014-08-30 14:50:41 -04:00
Donald Stufft 90688e82b1 Revert "Merge pull request #1519 from dstufft/remove-dependency-links"
This reverts commit da02f073da, reversing
changes made to 2ad8888901.

Conflicts:
	CHANGES.txt
	pip/commands/freeze.py
	pip/commands/list.py
	pip/commands/wheel.py
	pip/index.py
	pip/req/req_set.py
	pip/vcs/subversion.py
2014-08-01 16:50:08 -04:00
Donald Stufft 4a8173c4ed Fix #1680 - Use System SSL Certificates if Available 2014-06-12 23:10:00 -04:00
Phaneendra Chiruvella 25db84ad8c update help to make Package Index Options' usage clearer, ref #1814 2014-05-12 20:19:06 +05:30
Donald Stufft 52ca02608e Use CacheControl instead of custom cache code
* Deprecates the --download-cache option & removes the download
  cache code.
* Removes the in memory page cache on the index
* Uses CacheControl to cache all cacheable HTTP requests to the
  filesystem.
  * Properly handles CacheControl headers for unconditional
    caching.
  * Will use ETag and Last-Modified headers to attempt to do a
    conditional HTTP request to speed up cache misses and turn
    them into cache hits.
  * Removes some concurrency unsafe code in the download cache
    accesses.
  * Uses a Cache-Control request header to limit the maximum
    length of time a cache is valid for.
* Adds pip.appdirs to handle platform specific application
  directories such as cache, config, data, etc.
2014-05-09 18:28:20 -04:00
Marcus Smith 52299a7fe7 pip wheel needs --src option if it's going support --editable for vcs reqs 2014-05-08 21:29:01 -07:00
Marcus Smith 12034176a1 build wheels for dependencies of editables 2014-05-03 10:12:57 -07:00
Dan Savilonis 9a9d7acefe Add option --no-check-certificate to skip ssl cert verification 2014-04-24 01:46:33 -04:00
Bruno Renié 244b399f1f Fix #1424 -- add support for SSL client certificate 2014-03-07 13:41:15 +01:00
Donald Stufft c85150a500 Merge pull request #1444 from novel/retries
Introduce 'retry' option
2014-03-06 22:10:34 -05:00
Donald Stufft 95ac4c16f5 Remove dependency links support from pip 2014-02-25 18:39:40 -05:00
Donald Stufft 95035fc5c4 Turn on everything in flake8
flake8 ignores some errors by default, these ignored by defaults
change sometimes. This will make things stabler by selecting
everything.
2014-02-24 16:52:23 -05:00
Roman Bogorodskiy f29dd1ad32 Introduce 'retry' option
Add a 'retry' option which allows to configure how many
retries pip should make before giving up on HTTP request.

When the retries count is specified by user, its value is
passed to HTTPAdapter from requests which handles all
the underlying operations.
2014-02-04 00:37:05 +04:00