Commit Graph

148 Commits

Author SHA1 Message Date
Tzu-ping Chung 44713cafe5 Move VCS scheme check back out 2018-10-11 17:44:59 +08:00
Xavier Fernandez 3832020a1f
Merge pull request #5483 from popravich/retry_fix
Handle RetryError in HTMLPage (fixes #5270)
2018-10-08 23:12:34 +02:00
Chris Jerdonek 69b5917bc1
Merge pull request #5836 from uranusjr/bugfix-warn-directory-path-drop-index-url
Warn when dropping index URL value to directory
2018-10-08 11:20:35 -07:00
Pradyun Gedam 9e26002fcd
Bump deprecation version to unlock workflow 2018-10-08 20:46:17 +05:30
Alexey Popravka a853ca02b8 fix lint issues 2018-10-02 12:53:06 +03:00
Alexey Popravka 41a9d5e003 handle RetryError in HTMLPage/PackageFinder 2018-10-02 12:53:06 +03:00
Tzu-ping Chung 025dc45ad1 Don't need to unpack prematurely 2018-10-01 16:49:57 +08:00
Tzu-ping Chung bb6dae6e71 Inline PackageFinder._get_page() 2018-10-01 16:07:41 +08:00
Tzu-ping Chung 72779c674e Extract request part of get_page into helper
Also switch to use exceptions as flow control for VCS and Content-Type
detection. Hopefully this makes the flow much clearer.
2018-10-01 16:07:00 +08:00
Tzu-ping Chung 7a17a1f7dd Extract VCS scheme check into helper function 2018-10-01 15:54:04 +08:00
Tzu-ping Chung 8dcae5ba48 Warn when dropping index URL value to directory 2018-10-01 14:50:09 +08:00
Tzu-ping Chung bd6a7ea6c6 Pass the URL instead of the page itself into Link
This argument (comes_from) is only used for reporting, and it is enough
to pass in only the URL since that's what is actually used.
2018-09-30 17:46:21 +08:00
Tzu-ping Chung d275360745 Move static methods out of HTMLPage
Because the class is going away, but these functions will still be
needed by the thing replacing it.
2018-09-30 17:46:21 +08:00
Tzu-ping Chung 6f85fcdd7d Move clean_link out of HTMLPage 2018-09-28 23:58:24 +08:00
Tzu-ping Chung 47ba191d3a Rename HTMLPage.links to clarify its purpose 2018-09-28 16:53:02 +08:00
Tzu-ping Chung aa83222bf0 Rename base URL detection function 2018-09-28 16:52:57 +08:00
Tzu-ping Chung dc7e6b5950 Refactor _parse_base_url to use early return 2018-09-28 15:52:00 +08:00
Tzu-ping Chung 28ef0c2014 Convert HTMLPage.parsed into a local variable
This attribute is only used by HTMLPage.links, which is only used once
per instance in PackageFinder.find_all_candidates(), so this change does
not affect performance or behavior, but improves data locality.
2018-09-28 15:02:51 +08:00
Tzu-ping Chung 94d0428924 Extract encoding detection into helper function 2018-09-28 15:00:58 +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
Tzu-ping Chung 96a3254a1f Extract base URL parsing logic 2018-09-28 14:49:40 +08:00
Tzu-ping Chung d71f3311dc Fix egg_info_matches version split logic 2018-09-27 15:41:07 +08:00
Tzu-ping Chung 894f6558f1 Remove skip_archives argument 2018-09-27 15:41:02 +08:00
Donald Stufft dcc3c16b54 Only revalidate /simple/ pages instead of caching for 10 minutes 2018-09-18 06:54:51 -04:00
Nitesh Sharma 82b25ffe6c sort imports properly 2018-09-02 23:25:14 +05:30
Nitesh Sharma fd692f32ba move format control to models and write parametrized test 2018-09-02 23:08:07 +05:30
Nitesh Sharma b818b8324d refactor format control and rename test functions 2018-08-28 21:45:40 +05:30
Nitesh Sharma e10a613212 Refactoring: Move FormatControl to separate class
This moves FormatControl named tuple and it's all related
methods to separate class.

Closes https://github.com/pypa/pip/issues/5592
2018-08-28 21:12:42 +05:30
Pradyun Gedam afd3945089
Mention PEP 508 URL dependencies as a replacement for dependency links 2018-08-23 12:29:58 +05:30
Pradyun Gedam 4fc697847a
Update imports for the moved compat module 2018-07-29 18:32:20 +05:30
Pradyun Gedam 8df8e53901
Merge branch 'master' into refactor/introduce-models 2018-07-24 01:35:56 +05:30
Pradyun Gedam e027cd8449
Update deprecation utilities to specify versions
Also:
- Remove conditional warning/error level logging
- Remove now-obsolete class
- Update call sites as per new signature
2018-07-15 17:15:31 +05:30
Pradyun Gedam a8eaf1e0ff
Add a helper function for deprecation (and use it) 2018-07-15 17:02:03 +05:30
Pradyun Gedam 89223dd47c
Sort imports 2018-06-24 02:41:57 +05:30
Pradyun Gedam 39995b32db
Move Link to models 2018-06-24 02:38:21 +05:30
Pradyun Gedam f1cf9a06e9
Move InstallationCandidate to models + add tests 2018-06-24 02:38:21 +05:30
Pradyun Gedam aa146d5dc2
Kick the can down the road for dependency-links 2018-06-21 21:19:24 +05:30
Philip Molloy 8d3f5e7b76 Improve dependency links log message (#4936) 2018-05-30 23:01:14 +05:30
Pradyun Gedam 88e17b4aed
Update the import for PyPI Index model 2018-05-30 01:44:51 +05:30
Pradyun Gedam 144b42d799
Remove username/password from log message
Merge pull request #5339 from jzafran/remove-password-from-stdout
2018-05-22 11:03:10 +05:30
Daniel Shaulov d67d98dd91 Add a --prefer-binary flag. (#5370)
The flag makes pip prefer an older but valid binary distributions over a newer source distributions.

Fixes #3785.
2018-05-11 11:17:32 +05:30
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
Pradyun Gedam 729990c986
Round 1 of Cleanups (#4844)
* misc: fix typo
* misc: 🎨 cleanup parenthesis
* misc: 🎨 minor simplifications
* tests: fix test_console_to_str_warning
2017-12-25 15:23:27 +05:30
Anthony Sottile 9762eb02e3 Upgrade syntax in src/pip/_internal
Changes were automated via https://github.com/asottile/pyupgrade

See #4921
2017-12-14 21:59:22 -08:00
Pradyun Gedam 353a13ddff
isort: Include trailing commas 2017-11-21 13:23:59 +05:30
Ville Skyttä 8fb2b6318f Python 3.6 invalid escape sequence deprecation fixes
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
2017-09-15 23:35:45 +03:00
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Renamed from pip/index.py (Browse further)