Commit Graph

36 Commits

Author SHA1 Message Date
Pradyun Gedam 58c594c06b
Prepare isort for black 2020-09-23 21:47:47 +05:30
Pradyun Gedam 25ab172b55
Update linter: isort 2020-09-23 19:52:28 +05:30
Pradyun Gedam 6fa4a9a0a7 Clean up code style changes
Toward minimizing style changes in the overall PR diff, or toward
consistency with the future use of black (in cases where I wasn't sure
of a good way to minimize the diff).
2020-07-17 14:33:19 +07:00
Nguyễn Gia Phong f8b06a3906 Enable flake8-logging-format 2020-07-17 14:33:19 +07:00
gutsytechster 8c267e6e39
feat(pip/_internal/*): Use custom raise_for_status method 2020-07-08 18:08:55 +05:30
Christopher Hunt 4ba51d2e9c
Merge pull request #8501 from uranusjr/refactor-create-link-collector
Tidy up link collector constructor imports
2020-07-05 21:44:31 -04:00
Devesh Kumar Singh 6c899ed0c8 Update warning message to specify HTTP request 2020-06-29 22:20:11 +05:30
Devesh Kumar Singh 46790a4f3c Improve warning message for invalid vcs schemes 2020-06-28 16:23:07 +05:30
Devesh Kumar Singh 51f4c03221 Warn if package url is a vcs or an archive url with invalid scheme 2020-06-28 16:23:07 +05:30
Tzu-ping Chung ec7324fba0 Tidy up link collector constructor imports
make_link_collector() was in self_outdated_check, a module responsible
for checking whether the currently-running pip is outdated, but is
imported by things that has nothing to do with this outdated check. Move
the function to be a class method in LinkCollector so the module
hierarchy makes more sense.
2020-06-26 17:31:28 +08:00
Tzu-ping Chung ebb90c6411 Reject incompatibile direct wheel link
This mirrors the behavior in the legacy resolver. In the future we may
want to backtrack in this situation instead, but I haven't found a clean
way to do this. We may need to introduce an "empty" requirement class.

The `PackageFinder.target_python` interface is also not the most clean.
Maybe we should expose the target Python object instead. Not sure yet.
2020-06-10 20:57:23 +08:00
Pradyun Gedam d5265e24b7
Merge pull request #8083 from deveshks/warn-on-unexpected-content-type 2020-05-23 17:12:08 +05:30
Devesh Kumar Singh 0d48186d1b Allow --prefer-binary option in requirements file 2020-05-21 19:37:45 +05:30
Devesh Kumar Singh 64c78b19b9 Reword warning for invalid content-type 2020-05-21 19:37:03 +05:30
Devesh Kumar Singh 1bc7f535ca Warn if package index gets unexpected Content-Type 2020-05-21 19:37:03 +05:30
Tzu-ping Chung 806067f09f Move yanked link warning into the legacy resolver 2020-04-25 02:28:43 +08:00
Tzu-ping Chung f35f37ef72 Add find_requirement() wrapper in legacy resolver 2020-04-25 02:28:43 +08:00
Danny McClanahan 6e7b16cec4
add failing test ; apply the fix ; add template NEWS entry
add failing test

apply the fix

add template NEWS entry according to https://pip.pypa.io/en/latest/development/contributing/#news-entries (wrong PR #)

rename news entry to the current PR #

respond to review comments

fix test failures

fix tests by adding uuid salt in urls

cache html page fetching by link

make CI pass (?)

make the types much better

finally listen to the maintainer and cache parse_links() by url :)

avoid caching parse_links() when the url is an index url

cleanup

add testing for uncachable marking

only conditionally vendor _lru_cache for py2

bugfix => feature

python 2 does not cache!

Do away with type: ignore with getattr()

respond to review comments
2020-04-07 12:01:43 -07:00
Pradyun Gedam cdae7277ef
Merge pull request #7596 from uranusjr/6446-link-url-quoting
Fix incorrect quoting Link.url
2020-02-14 16:00:43 +05:30
Deepak Sharma d31cf696e8 string_formatting 2020-01-30 20:33:00 +05:30
Tzu-ping Chung 9d1e1ed8ae Whitespace 2020-01-15 16:26:58 +08:00
Tzu-ping Chung 5fb0957219 Add required type hints 2020-01-14 16:24:45 +08:00
Tzu-ping Chung cdd7821d92 Fix incorrect quoting Link.url
Cherry-picked manually from atugushev:fix-issue-6446.

Co-Authored-By: Albert Tugushev <albert@tugushev.ru>
2020-01-14 16:12:11 +08:00
Chris Hunt 80b2c82d0c Use packaging.tags.Tag in place of Tuple
This is the standard type used by packaging.tags. Making this change
throughout the code lets us start switching over to using its
tag-generating functions in get_supported().

We also get rid of a test, since it was superseded by `__str__` in
packaging.tags.Tag.
2020-01-07 01:42:42 -05:00
Maxim Kurnikov 3cb30385d8 remove disallow_untyped_defs=False for more modules 2019-12-13 10:22:21 +03:00
Chris Hunt 60f6ed9387 Move wheel.Wheel to models.wheel.Wheel
This aligns more closely with how the class is used and makes it easier
to move the rest of the wheel module to a dedicated module for
installation.
2019-12-02 11:52:51 +08:00
Maxim Kurnikov e9fcd75cab add disallow_untyped_defs=True for pip._internal.collector 2019-11-16 16:53:44 +03:00
Maxim Kurnikov d1452ffabd add global disallow_any_generics=True 2019-11-12 21:08:48 +03:00
Pradyun Gedam 6c04feff1d
Sort applicable candidates before computing best candidate (#7332) 2019-11-11 22:10:57 +05:30
Pradyun Gedam 9b25cd512b
Rename InstallationCandidate.{project -> name} 2019-11-11 11:37:53 +05:30
Chris Jerdonek f4cad3d403 Add PackageFinder.process_project_url(), and test. 2019-11-10 21:27:13 -05:00
Chris Jerdonek bab1e4f8a1 Change CollectedLinks to store project_urls. 2019-11-10 21:27:00 -05:00
Chris Jerdonek 024038cf10 Add LinkCollector.fetch_page(). 2019-11-10 21:19:07 -05:00
Pradyun Gedam 0f03a05207
Sort applicable candidates before computing best candidate 2019-11-10 14:00:59 +05:30
Pradyun Gedam 611fc6069b
Update references to collector.py 2019-10-19 22:24:53 +05:30
Pradyun Gedam d766c448e1
Move index interaction code into pip._internal.index
Why: To better group code that handles index interactions.

Renames pip._internal.{collector -> index.collector} and
pip._internal.{index -> index.package_finder}
2019-10-19 22:22:12 +05:30