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

167 commits

Author SHA1 Message Date
Pradyun S. Gedam
1832569530 Sort all imports 2017-05-16 15:47:47 +05:30
Damian Quiroga
3cdd162a7b Expect and return str when handling URL credentials 2017-03-30 22:01:43 -03:00
Matthew Willson
bdb708de94 Support url-encoded characters in URL credentials 2017-03-30 22:00:37 -03:00
Paul Kehrer
476d297ff6 add support for returning setuptools version for bigquery statistics (#4209)
* add support for returning setuptools version for bigquery statistics

* don't send the data if None

* add changelog entry
2017-03-22 23:59:43 +01:00
Donald Stufft
a504ebdbcc No need to gate on 2.6 anymore 2017-03-18 14:52:13 -04:00
Avner Cohen
0552ffeeda Add --no-progress <progress_bar> to `pip download and pip install` to suppress progress bar in the console 2017-01-30 10:14:07 +01:00
anatoly techtonik
3aa1101704 Document get_file_content() parameters 2016-11-09 21:41:02 +01:00
Lipis
d86d171364 OS X -> macOS (#4074) 2016-11-06 12:24:43 -05:00
Sebastian Schaetz
1cfb21dc25 Add abort option if existing files are found 2016-10-18 00:44:05 -04:00
Carter Thayer
7954523ce3 Fix using index url with credentials (Issue #3861) (#3977) 2016-09-18 16:48:42 -04:00
Paul Moore
073237c88c Only import distro if needed (i.e., on Linux) 2016-09-01 12:47:47 +01:00
Xavier Fernandez
fc4109eb1d Vendor distro==0.6.0 (#3906)
To avoid DeprecationWarning for platform.linux_distribution()

Closes #3823
2016-08-12 09:51:44 -04:00
Nathaniel J. Smith
a942fb9331 Report correct glibc version in pip user-agent (#3836) 2016-07-09 23:17:04 -04:00
Jakub Wilk
6dc28c1b31 Fix typos 2016-06-10 21:29:43 +02:00
Jason R. Coombs
b5191a0c03 Correct typo: simple -> simply (#3756) 2016-05-26 20:47:27 -04:00
Sorin Sbarnea
2dfe88126d Load credentials from .netrc files (#3715) 2016-05-26 06:41:31 -04:00
Xavier Fernandez
9aa5e8f5c0 Let's try always returning text
and hope https://github.com/pypa/pip/issues/1441 is behind us
2016-03-04 10:50:29 +01:00
Xavier Fernandez
e2889268bd utils: decode requirement files according to their BOM if present 2016-03-04 10:50:29 +01:00
Stephan Erb
23f0618576 Use pre-defined chunksizes instead of hardcoded ones.
The requests one does currently sit at 10KB, the io buffer one at 8KB.
Both are reasonable values and slightly above our current values.

If those values are adjusted, we will profit as well.
2016-02-28 18:44:35 +01:00
Alex Gaynor
3ac8970199 conditional fix 2016-01-02 14:29:35 -05:00
Alex Gaynor
e9b8a4d83d by order of the high commisioner on software, Python 2.6 is extremely illegal 2016-01-02 14:11:20 -05:00
Alex Gaynor
e0961df48b Include the OpenSSL version in the user agent 2016-01-02 14:06:41 -05:00
Xavier Fernandez
85e143c23d content_type is not used 2016-01-02 18:59:31 +01:00
Xavier Fernandez
30f4af0678 Move SETUPTOOLS_SHIM to its own file 2015-11-26 22:36:59 +01:00
Xavier Fernandez
3c00710438 Use a single setuptools shim
for all setup.py invocations
bdist_wheel will now use tokenize in Python 3 just like for install
fixes #2042
2015-11-26 22:36:59 +01:00
Erik Rose
622b430491 Typos and docstrings 2015-10-19 23:40:00 -04:00
Erik Rose
dcf39bfdf0 Add imports to make the pep8 checker happy about the dead _copy_dist_from_dir(). 2015-10-12 14:49:11 -04:00
Erik Rose
4c405a0ad3 Restore deleted _copy_dist_from_dir().
This reverts commit 62ac258e1e.

https://github.com/pypa/pip/pull/3176 is about to add the missing piece that makes this code useful (and not dead), so let's not delete it.
2015-10-12 14:37:03 -04:00
Erik Rose
be4e315c59 Rewrap args of unpack_http_url() to match the style in send(), above. 2015-10-10 22:44:13 -04:00
Erik Rose
6f828c351f Correct and clarify docs and comments. 2015-10-10 22:44:12 -04:00
Erik Rose
0c17248998 Pass PEP 8 checks. 2015-09-24 22:16:00 -04:00
Erik Rose
1e41f01823 Add checks against requirements-file-dwelling hashes for most kinds of packages. Close #1175.
* Add --require-hashes option. This is handy in deployment scripts to force application authors to hash their requirements. It is also a convenient way to get pip to show computed hashes for a virgin, unhashed requirements file. Eventually, additions to `pip freeze` should fill a superset of this use case.
  * In --require-hashes mode, at least one hash is required to match for each requirement.
  * Option-based requirements (--sha256=...) turn on --require-hashes mode implicitly.
  * Internet-derived URL-based hashes are "necessary but not sufficient": they do not satisfy --require-hashes mode when they match, but they are still used to guard against transmission errors.
  * Other URL-based requirements (#md5=...) are treated just like flag-based ones, except they don't turn on --require-hashes.
* Complain informatively, with the most devastating errors first so you don't chase your tail all day only to run up against a brick wall at the end. This also means we don't complain that a hash is missing, only for the user to find, after fixing it, that we have no idea how to even compute a hash for that type of requirement.
  * Complain about unpinned requirements when hash-checking mode is on, lest they cause the user surprise later.
  * Complain about missing hashes.
  * Complain about requirement types we don't know how to hash (like VCS ones and local dirs).
* Have InstallRequirement keep its original Link around (original_link) so we can differentiate between URL hashes from requirements files and ones downloaded from the (untrustworthy) internet.
* Remove test_download_hashes, which is obsolete. Similar coverage is provided in test_utils.TestHashes and the various hash cases in test_req.py.
2015-09-24 22:16:00 -04:00
Erik Rose
9211d6e313 Style tweaks 2015-09-23 17:39:32 -04:00
Erik Rose
62ac258e1e Delete dead _copy_dist_from_dir(). 2015-09-23 17:39:32 -04:00
Erik Rose
e058486c91 Fix some docstring typos. 2015-09-23 17:39:32 -04:00
Donald Stufft
8af4872ff6 Use the directory locking for the filecache 2015-05-20 14:21:11 -04:00
Donald Stufft
22e059556d Add a warning that'll tell people when their Python doesn't support TLS 2015-05-06 18:48:04 -04:00
Robert Collins
eda3f0451d Issue #2723: Restore the use of git clones
6.1.1 and before use git clones when installing a git+ url. 7.0.0.dev
didn't temporarily because the internal flag for controlling whether
to do a clone or an export was tied into the behaviour for whether
something will be deleted or not - which is arguably different. Remove
the confounded behaviour and just unpack always, using the same marker
flag to delete directories as used for file and non-vcs urls.
2015-04-25 15:33:33 +12:00
Xavier Fernandez
33753fb887 Centralize archive extensions list 2015-04-07 10:41:03 +02:00
Marc Abramowitz
4e6d935eaf Speed up unpack_file_url
E.g.: `pip install /path/to/dir`

by building an sdist and then unpacking it instead of doing
`shutil.copytree`. `shutil.copytree` may copy files that aren't included
in the sdist, which means that:

1. If those files are large, a `pip install` could take much longer than
it should.

2. Folks that are using `python setup.py install` to test their package
are not fully testing it, because it may copy over files that wouldn't
be there if they built and sdist and installed that.

So this method building an sdist is both more accurate and faster.

Fixes https://github.com/pypa/pip/issues/2195
2015-03-13 15:03:01 -07:00
Donald Stufft
61123b770e Be explicit that -H is for sudo 2015-02-24 07:59:48 -05:00
Donald Stufft
0bc8aa5622 Style fixes for the latest flake8 2015-02-24 07:46:10 -05:00
Donald Stufft
c1c638bd88 Handle updates to flake8 2015-02-11 10:23:57 -05:00
Paul Moore
18748b3de6 Make pip.utils.rmtree retry in case antivirus etc holds a directory 2015-02-04 20:34:24 +00:00
Clark Boylan
fb0e8c8f70 Only check download hashes if download succeeds
In _download_url pip was checking the download hash in a finally block
so that it was always checked regardless of download success. This is
problematic when downloads fail in a way that will make the hash check
fail. For example, downloading zero bytes so that a zero byte file is
hashed. When this happens the hash mismatch is reported to the user and
not the underlying network issue that was run into.

Fix this by removing the try finally block completely so that early
errors are bubbled up and reported to users.

Fix issue 2332
2015-01-06 09:41:49 -08:00
Donald Stufft
adb7a3c83f Remove some other places we called os.geteuid() 2015-01-03 03:35:38 -05:00
Donald Stufft
1d29275ce0 Don't show the progress bar if the -q is being used 2015-01-02 23:52:40 -05:00
Donald Stufft
4f40530493 Warn if the cache/log directory is not owned by the current user 2014-12-30 19:49:08 -05:00
Donald Stufft
5e65df9b7b Revert "Speed up unpack_file_url" 2014-12-22 17:30:49 -05:00
Donald Stufft
d851bcf7d6 Use the --trusted-host argument to disable TLS verification as well 2014-12-20 17:27:11 -05:00