Chris Jerdonek
8af3f21a57
Filter out yanked links earlier when allow_yanked=False.
2019-06-27 19:50:25 -07:00
Chris Jerdonek
a447be4785
Update PackageFinder to support "yanked" files (PEP 592).
2019-06-26 02:32:40 -07:00
Chris Jerdonek
8666bb1a5d
Start parsing the "data-yanked" attribute.
2019-06-25 03:34:42 -07:00
Chris Jerdonek
b6077c5227
Move the existing Link tests to test_link.py.
2019-06-22 16:44:13 -07:00
Chris Jerdonek
cab7316e2b
Change PackageFinder.create() to accept a SearchScope object.
2019-06-21 14:41:49 -07:00
Chris Jerdonek
7d08bb37a5
Add SearchScope class.
2019-06-18 00:47:10 -07:00
Chris Jerdonek
c0bda1b906
Log when adding a trusted host from a file.
2019-06-14 01:14:36 -07:00
Chris Jerdonek
d72758394d
Fully support --trusted-host inside requirements files.
2019-06-13 01:21:05 -07:00
Chris Jerdonek
4c1ccaec73
Store PackageFinder.trusted_hosts instead of secure_origins.
2019-06-12 02:18:23 -07:00
Chris Jerdonek
210dab7470
Add make_test_finder() helper function.
2019-06-11 19:18:56 -07:00
Chris Jerdonek
b8d693c71e
Add a TargetPython class.
2019-06-11 18:19:20 -07:00
Chris Jerdonek
8dbf88dff7
Update pip-download to respect --python-version.
2019-06-06 13:20:29 -07:00
Chris Jerdonek
798d814629
Change PackageFinder to use Tuple[int, ...] instead of List[str] for --python-version.
2019-05-28 03:05:14 -07:00
Chris Jerdonek
a9a9cfd98c
Improve the debug log message when installing an incompatible wheel.
2019-05-25 23:59:32 -07:00
Chris Jerdonek
eeb74aeb29
Merge pull request #6518 from cjerdonek/issue-6371-ignore-requires-python
...
Fix #6371 : make pip install respect --ignore-requires-python
2019-05-22 22:38:20 -07:00
Chris Jerdonek
5528d353d2
Add some tests of CandidateEvaluator.evaluate_link().
2019-05-22 21:34:45 -07:00
Chris Jerdonek
ad2b07898d
Fix pip-install to respect --ignore-requires-python.
2019-05-22 21:34:41 -07:00
Andreas Lutro
9eccfae10d
redact passwords in output when using --find-links ( #6489 )
2019-05-22 23:33:41 +02:00
Chris Jerdonek
7e142bae64
Refactor out _check_link_requires_python(), and test.
2019-05-22 09:07:14 -07:00
Chris Jerdonek
1875a8e3f6
Merge pull request #6511 from cjerdonek/package-finder-create-function
...
Simplify PackageFinder's constructor by accepting a CandidateEvaluator
2019-05-19 09:39:32 -07:00
Chris Jerdonek
10ae49d932
Add py_version_info to CandidateEvaluator's constructor.
2019-05-18 22:40:08 +02:00
Chris Jerdonek
cad71a7117
Add PackageFinder.create(), and simplify PackageFinder().
2019-05-17 11:55:21 -07:00
Nicolas Bock
265b4e7e65
Protect @
as safe character when cleaning URLs
...
Remote URLs that contain a link to a git repository and a tag
reference will have the `@` character converted into `%40`. This is
incorrect.
Fixes : #6437
Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
2019-04-25 06:26:04 -06:00
Nicolas Bock
913757cb53
Do not clean base_url
...
When the `base_url` is a `[]` protected IPv6 address, the
`_clean_link()` function converts `[` to `%5B` and `]` to `%5D`, which
renders the `base_url` invalid. For example:
```
Starting new HTTP connection (1): fd00:0:0:236:💯 8181
http://fd00:0:0:236:💯 8181 "GET /os-releases/19.0.0.0b1/opensuse_leap-42.3-x86_64/requirements_absolute_requirements.txt HTTP/1.1" 200 None
Setting setuptools==40.6.3 (from -c http://[fd00:0:0:236::100]:8181/os-releases/19.0.0.0b1/opensuse_leap-42.3-x86_64/requirements_absolute_requirements.txt (line 204)) extras to: ()
Looking in indexes: http://[fd00:0:0:236::100]:8181/simple
Collecting setuptools==40.6.3 (from -c http://[fd00:0:0:236::100]:8181/os-releases/19.0.0.0b1/opensuse_leap-42.3-x86_64/requirements_absolute_requirements.txt (line 204))
1 location(s) to search for versions of setuptools:
* http://[fd00:0:0:236::100]:8181/simple/setuptools/
Getting page http://[fd00:0:0:236::100]:8181/simple/setuptools/
http://fd00:0:0:236:💯 8181 "GET /simple/setuptools/ HTTP/1.1" 200 376
Analyzing links from page http://[fd00:0:0:236::100]:8181/simple/setuptools/
_package_versions: link = http://%5bfd00:0:0:236::100%5d:8181/packages/opensuse_leap-42.3-x86_64/setuptools/setuptools-40.6.3-py2.py3-none-any.whl#md5=389d3cd088d7afec3a1133b1d8e15df0 (from http://[fd00:0:0:
236::100]:8181/simple/setuptools/)
_link_package_versions: link = http://%5bfd00:0:0:236::100%5d:8181/packages/opensuse_leap-42.3-x86_64/setuptools/setuptools-40.6.3-py2.py3-none-any.whl#md5=389d3cd088d7afec3a1133b1d8e15df0 (from http://[fd00
:0:0:236::100]:8181/simple/setuptools/)
Found link http://%5bfd00:0:0:236::100%5d:8181/packages/opensuse_leap-42.3-x86_64/setuptools/setuptools-40.6.3-py2.py3-none-any.whl#md5=389d3cd088d7afec3a1133b1d8e15df0 (from http://[fd00:0:0:236::100]:8181/
simple/setuptools/), version: 40.6.3
Using version 40.6.3 (newest of versions: 40.6.3)
Could not install packages due to an EnvironmentError.
InvalidURL: Failed to parse: %5bfd00:0:0:236::100%5d:8181
```
This change uses the vendored `urllib` library to split the host part
off of the url before URL quoting only the path part.
Fixes : #6285
Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
2019-04-07 05:57:03 -06:00
Chris Jerdonek
5c93250fa9
Merge pull request #5875 from uranusjr/egg-info-canonical
...
Rewrite egg_info_matches with canonicalize_name
2018-10-30 01:30:40 -07:00
Tzu-ping Chung
033a47cbf2
More test cases
2018-10-29 15:48:43 +08:00
Tzu-ping Chung
5d0a5761be
Add (invalid) edge case inputs to tests
2018-10-22 16:48:24 +08:00
Tzu-ping Chung
ad9cbf50ca
More robust egg-info/name match
...
The idea is to use regex to scan for character sequences that would
be canonicalized into a dash, and skip the equal amount of sequences
to the given canonical name.
2018-10-22 16:48:24 +08:00
Tzu-ping Chung
3368819156
Split, simplify, and fix egg_info_matches
2018-10-22 16:46:42 +08:00
Tom Forbes
78371cc950
Redact basic authentication passwords from log messages ( #5773 )
...
Redact basic authentication passwords from URLs.
2018-10-19 02:06:10 -07:00
Alexey Popravka
290e3d592e
split test into two
2018-10-02 13:23:34 +03:00
Alexey Popravka
5295d8b0a6
test fix: setup logging level
2018-10-02 12:53:06 +03:00
Alexey Popravka
b36d91c2a6
add failing test for HTMLPage.get_page raising RetryError
2018-10-02 12:50:57 +03:00
Tzu-ping Chung
00c043d144
Add unit tests for egg_info_matches
2018-09-30 01:41:06 +08:00
Tzu-ping Chung
aa83222bf0
Rename base URL detection function
2018-09-28 16:52:57 +08:00
Tzu-ping Chung
40bf3688b4
Convert base_url property into local variable
...
This property is only used in HTMLPage.links, which is only called once
per instance in PackageFinder.find_all_candidates(). This would not
affect performance or behavior, but improves data locality.
The unit test of this property is and modified to test the underlying
function instead.
2018-09-28 14:56:52 +08:00
Jeremy Zafran
7655893601
remove usernames and passwords for index URLs using basic auth from "Looking in indexes" log messages
2018-04-27 00:41:54 -04:00
Donald Stufft
275ab7c3f5
Switch pip to use Warehouse by default
2018-04-16 15:54:11 -04:00
Donald Stufft
95bcf8c5f6
Move all internal APIs to pip._internal
2017-08-31 14:53:00 -04:00
Pradyun S. Gedam
9923c1ad7e
Sort imports and minor Flake8 changes ( #4520 )
...
* Run isort on the codebase
Command: isort --recursive --skip __main__.py --skip _vendor -o pip._vendor -sd THIRDPARTY -m 5 -p pip -p tests ./pip ./tests
* 📰
2017-06-13 14:17:00 +02:00
Pradyun S. Gedam
1832569530
Sort all imports
2017-05-16 15:47:47 +05:30
Donald Stufft
c8e8a99b7a
Upgrade Dependencies ( #4038 )
...
* Upgrade distlib to 0.2.4
* Upgrade distro to 1.0.0
* Upgrade html5lib to 1.0b10
* Upgrade requests to 2.11.1
* Upgrade CacheControl to 0.11.7
* Upgrade ipaddress to 1.0.17
* Upgrade pyparsing to 2.1.10
* Upgrade packaging to 16.8
* Add webencodings 0.5
* Add ordereddict 1.1
2016-10-30 01:35:28 -04:00
Donald Stufft
37da4b21fa
Merge pull request #3435 from fungi/develop
...
Case-insensitive match secure origin names
2016-03-03 07:21:40 -05:00
Stéphane Bidoul
5e2a59cd2a
add test for link fragments
2016-02-09 15:53:42 +01:00
Jeremy Stanley
9597acdbba
Case-insensitive match secure origin names
...
DNS is non-case-sensitive, so case mismatches between origin names
and any declared trusted hosts are also irrelevant.
2016-02-03 20:08:12 +00:00
Xavier Fernandez
ac0bb3f444
Ignores invalid urls with warning
...
for non-existing paths or url without scheme
closes #2968
2016-01-07 23:08:37 +01:00
Xavier Fernandez
12cc427865
Fix test_sort_locations_file_not_find_link test
...
_sort_locations expects a list
2015-12-04 22:36:52 +01:00
Xavier Fernandez
f1bf7515c2
pip.index: remove INSTALLED_VERSION
...
closes #703
2015-11-04 22:52:44 +01:00
Roy Wellington Ⅳ
455f3b4e74
SSH is a secure protocol, and allow repository links ("git+") to validate.
2015-09-09 18:59:03 -07:00
Xavier Fernandez
a1451b192d
add expand_dir arg to _sort_locations
2015-04-07 10:59:14 +02:00