Commit Graph

64 Commits

Author SHA1 Message Date
Maxim Kurnikov 8fc393a2d1 Add type annotations for pip._internal.pyproject, pip._internal.build_env, pip._internal.index, pip._internal.resolve (#6072) 2018-12-17 16:43:23 +05:30
Pradyun Gedam fc62b5b677
Move wheel extension information to remove cycle imports 2018-11-30 12:46:08 +05:30
Benjamin Peterson 5f5415756d Add missing spaces to log message about skipping a link due python version incompatibility. (#5992) 2018-11-09 12:21:13 +05:30
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 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
Chris Jerdonek 8dbbe165f8
Merge pull request #5838 from uranusjr/htmlpage-extract-breakdown-get-page
Refactor _get_html_page() to use exceptions for flow control
2018-10-11 12:27:17 -07:00
Tzu-ping Chung fc53f711b9 More tests on successful scenarios, fix docstrings 2018-10-11 17:47:08 +08:00
Tzu-ping Chung 65260d0449 Fix behavior if archive-like URL is not HTTP(S)
The original implementation erros out when this happens, and the new one
follows. The debug logging message is however changed to be clearer about
what happened.

Also fixed some minor typos.
2018-10-11 17:45:22 +08:00
Tzu-ping Chung 68cf77ac0b Only store what we need in _NotHTML 2018-10-11 17:45:22 +08:00
Tzu-ping Chung a9ebb795ed More detailed information on Content-Type error, fix typos 2018-10-11 17:45:11 +08:00
Tzu-ping Chung d4da76ceaa Move directory check out of _get_html_response()
This also "fixes" an edge case where a directory is dropped if it is
named like an archive.
2018-10-11 17:45:11 +08:00
Tzu-ping Chung 231e6165dd Group HEAD optimization logic into HTML getter, add docs 2018-10-11 17:44:59 +08:00
Tzu-ping Chung bad04d8549 Extract content type detection logic 2018-10-11 17:44:59 +08:00
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