Donald Stufft
75cef55df7
Do a check prior to returning HTMLPage that it is indeed html
...
Previously pip would check with a HEAD request if the url looked
like it contained an archive and skip the file. However this didn't
work if the url didn't look like an archive and instead just
redirected to an archive.
This will therefore, after the url has been fetched, inspect the
headers and look to see if the Content-Type is text/html.
2013-06-07 08:42:49 -04:00
Donald Stufft
2eb43b25ab
Use html5lib to parse HTML instead of using regexs
...
HTML is not a regular language and thus cannot be accurately parsed
with a regex. The regexs that pip had were gnarly, and required
multiple levels of them in order to "work".
Using html5lib instead of regexs makes the parsing step simpler,
better tested, and much more robust.
There is still some use of regex to parse html. Namely the hack
that looks for a <th> tag with a "rel" after it. This hack is
required to work inside of HTML comments so it cannot be parsed
as HTML.
2013-06-02 10:01:40 -04:00
Marcus Smith
c721a735b5
wheel finder priority based on supported_tags order
2013-05-02 15:28:32 -07:00
Marcus Smith
6e2bfe8323
remove python 2.5 logic
2013-04-17 22:50:22 -07:00
Marcus Smith
f1fb4b4fda
wheel requirement checks with tests
2013-04-05 14:21:11 -07:00
Daniel Holth
0ea48dcf5a
check for proper distribute when using wheels
2013-04-05 11:16:03 -07:00
Marcus Smith
00fa9bea96
merge with develop
2013-03-15 23:46:46 -07:00
Donald Stufft
4d5c5f8f97
Only install stable releases by default
...
* Adds the --pre flag to pip install to specify that you wish
to install pre-releases
* If the version spec contains any pre-releases then continue to
install pre-releases
2013-03-09 10:27:19 -05:00
Jannis Leidel
06e65d826a
Revert "Update method description to match expected behaviour."
...
This reverts commit 6a483a3778
.
2013-03-08 00:09:05 +01:00
Jannis Leidel
a3584d1766
Revert "Explicitly ignore rel='download' links while looking for html pages."
...
This reverts commit 0bb9c31aea
.
2013-03-08 00:08:51 +01:00
Marcus Smith
72812c52ff
close socket upon CertificateError
2013-03-03 22:38:37 -08:00
Marcus Smith
50e2662bb4
ssl errors should show by default w/o -v
2013-03-01 11:07:29 -08:00
Marcus Smith
cf3a5619b0
fix mirror url parsing and add tests
2013-02-19 11:49:19 -08:00
Marcus Smith
1857ece79b
fix import syntax
2013-02-16 15:40:43 -08:00
Marcus Smith
22bf924b52
merge with develop
2013-02-16 14:17:22 -08:00
Jannis Leidel
8a4458bf56
Fixed a whole bunch of cosmetic problems, mostly to adhere to PEP8.
2013-02-16 19:02:41 +01:00
Marcus Smith
a4a9197e7e
py25 import fixes
2013-02-06 02:08:23 -08:00
Marcus Smith
b2e0b6dfb0
log relevant message if URLError.reason is SSLError or CertificateError
2013-02-06 01:48:28 -08:00
Marcus Smith
dff849ce27
existing install has priority over wheels
2012-11-03 22:10:58 -07:00
Marcus Smith
7ad52b423d
link sort key as instance method; guard when link is InfLink
2012-11-03 21:35:56 -07:00
Paul Moore
4b01b90df2
Give wheels priority over sdists when installing
2012-10-28 22:02:48 +00:00
Marcus Smith
be12f79ab4
merge pypa/develop
2012-10-25 12:51:07 -07:00
Paul Nasrat
32f0be7a96
Merge pull request #702 from qwcode/link_sort2
...
put back finder link priority (with tests)
2012-10-24 23:53:39 -07:00
Paul Nasrat
f54f422e11
Merge pull request #677 from blaze33/develop
...
Explicitly ignore rel='download' links while looking for html pages.
2012-10-24 06:02:37 -07:00
Marcus Smith
c770ad66db
let installed version be it's own item
2012-10-13 23:03:09 -07:00
Paul Moore
50c21119e5
Add platform checks to wheel location code
2012-10-12 09:36:05 +01:00
Marcus Smith
758c3368e9
finder link priority
2012-10-10 21:49:29 -07:00
Alex Grönholm
47af6d4094
Append / to the PyPI URL to reduce unnecessary redirects
2012-10-02 21:19:56 +03:00
Daniel Holth
aa5b33dbf4
experimental support for installing wheel archives
2012-10-01 22:50:24 -07:00
Maxime Rouyrre
6a483a3778
Update method description to match expected behaviour.
2012-10-02 03:33:29 +02:00
Marcus Smith
93bdb858d8
fix finder version sorting with Inf object
2012-09-25 07:56:09 -07:00
Marcus Smith
e066d36de8
don't add local dirs that are not findlinks to url list
2012-09-16 22:41:51 -07:00
Marcus Smith
af7bd9ccdb
index file:// urls that are dirs should not have listdir run against them
2012-09-16 17:41:27 -07:00
Maxime Rouyrre
0bb9c31aea
Explicitly ignore rel='download' links while looking for html pages.
...
This way we avoid requesting archive headers just to see they're not
HTML pages.
2012-09-14 17:27:58 +02:00
Carl Meyer
f2df551094
Merge pull request #671 from pfmoore/develop
...
Fix for issue 670 (unorderable Link types under Python 3)
2012-09-10 18:20:56 -07:00
Paul Moore
1dee479184
Code changes for fix to issue 670
2012-09-10 21:04:00 +01:00
Carl Meyer
895bfee767
Allow --no-index and --find-links relative path in reqs file.
2012-09-10 00:48:48 -06:00
Paul Moore
04f01f227e
Support local file paths in --find-links arguments
2012-09-09 21:15:32 +01:00
Phil Whelan
888ae41ccf
stop get_mirrors returning 216k invalid hostname from Japan
2012-07-18 15:05:23 +09:00
Donald Stufft
b4737a4d13
modify the hashing functions so that they accept any of the guarenteed hashers
2012-05-26 17:56:26 -04:00
Carl Meyer
58ad223871
Fix issue #510 - prevent sdist filename matches on partial project names. Thanks casevh for the report.
2012-04-16 17:27:47 -06:00
Carl Meyer
d382a36cf6
Remove the poorly-named Link.url_fragment property.
2012-04-16 16:05:21 -06:00
W. Trevor King
c3d51bd891
Preserve the query portion of URL-type InstallRequirement URLs.
...
With this patch, install commands like:
pip install 'http://foo.com/?p=bar.git;a=snapshot;h=v0.3;sf=tgz '
will work as expected.
2012-04-05 16:55:29 -04:00
dengzhp
ccad8dae62
use dummy_threading when the threading module is not present.
2012-02-13 14:40:28 +08:00
Rene Dudfield
885dc01a3b
Yeah ('.zip') is not a tuple. doh. Applied wart remover.
2011-12-16 17:10:03 +01:00
Rene Dudfield
c8d11dee87
For issue #57 pip wrongly selects a macosx binary .zip file
...
Instead of a source file it downloads a binary macosx .zip file
which contains a binary installer.
2011-12-15 17:54:01 +01:00
Olivier Girardot
d1b787f961
fixes #310 and allows for versions like -py3 instead of -py2.6 or -py3.0
2011-12-12 00:07:25 -07:00
Carl Meyer
cdec82b5e6
Merge branch 'fix-issue-49' into develop
2011-10-22 23:50:19 -06:00
Hugo Lopes Tavares
04838268e1
Fix issue #366 - pip throws IndexError when it calls scraped_rel_links
2011-10-14 21:39:27 -03:00
Erik Bray
1ecda0db16
Fix --upgrade to leave already up-to-date packages alone. Add --force-reinstall to force reinstallation even of up-to-date packages, as was the prior behavior.
2011-08-24 14:07:16 -04:00