Jon Dufresne
5150129f6b
Replace compat.expanduser() with os.path.expanduser()
...
The upstream bug has been fixed and released in all supported Python
version: https://bugs.python.org/issue14768
2020-12-29 08:15:55 -08:00
Hugo van Kemenade
a3e246f7d0
Cleanup: replace 'from urllib import xyz as urllib_xyz' with import urllib.xyz
2020-12-27 16:18:44 +02:00
Pradyun Gedam
86afa89043
Merge pull request #9361 from jdufresne/f-strings
...
Use f-strings for simple string formatting
2020-12-26 10:24:18 +00:00
Jon Dufresne
cdcf74fb8e
Use f-strings for simple string formatting
...
Use pyupgrade to convert simple string formatting to use f-string
syntax. pyupgrade is intentionally timid and will not create an f-string
if it would make the expression longer or if the substitution parameters
are anything but simple names or dotted names.
2020-12-25 16:21:20 -08:00
Jon Dufresne
09b3d3a50b
Remove object from class definitions
...
Unnecessary since dropping Python 2 support. In Python 3, all classes
are new style classes.
2020-12-25 15:48:11 -08:00
Jon Dufresne
2e38024991
Drop u prefix from str literals
...
Unnecessary since dropping Python 2 support.
This makes one test case from test_str_to_display a duplicate and so has
been removed.
2020-12-25 07:26:06 -08:00
Hugo van Kemenade
817ee23051
Remove redundant Python 2.7 code
2020-12-22 09:06:26 +02: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
499e112275
Add unit tests to check vcs and 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
Devesh Kumar Singh
64c78b19b9
Reword warning for invalid content-type
2020-05-21 19:37:03 +05:30
Devesh Kumar Singh
fa67244d45
Add unit test to warn on invalid content-type
2020-05-21 19:37:03 +05:30
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
Jason R. Coombs
3511d3d493
Convert the remaining '%' formatters to '.format'. Fixes #6973 .
2020-03-06 12:43:03 -05: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 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
611fc6069b
Update references to collector.py
2019-10-19 22:24:53 +05:30
Chris Hunt
f805f328d4
Align interface of tests.lib.path.Path.mkdir with pathlib.Path.mkdir.
2019-10-06 21:55:10 -04:00
Chris Hunt
cf7ebdbbc2
Move PipSession to network.session
2019-09-27 01:02:52 -04:00
Chris Jerdonek
99ec6a5e31
Merge pull request #7057 from cjerdonek/remove-iter-links
...
Remove HTMLPage.iter_links()
2019-09-23 05:55:54 -07:00
Chris Jerdonek
6c9e0c2536
Remove HTMLPage.iter_links().
2019-09-23 05:12:33 -07:00
Chris Jerdonek
4ad5a58376
Change HTMLPage.__init__ to accept an encoding.
2019-09-23 05:12:29 -07:00
Chris Jerdonek
d30bc69073
Move make_fake_html_page() elsewhere in the module.
2019-09-23 05:08:27 -07:00
Chris Jerdonek
7c00316268
Use a single log message.
2019-09-21 15:49:43 -07:00
Chris Jerdonek
a2b2a24513
Remove duplicate links before logging.
2019-09-21 10:52:56 -07:00
Chris Jerdonek
7b7d162870
Add _remove_duplicate_links(), and test.
2019-09-21 10:52:52 -07:00
Chris Jerdonek
f5e5f403b6
Test logging in test_collect_links().
2019-09-21 10:10:53 -07:00
Chris Jerdonek
6d94944efd
Change PackageFinder.create() to accept a LinkCollector.
2019-09-18 00:59:04 -07:00
Chris Jerdonek
fe2509bd58
Move LinkCollector to a new collector.py module.
2019-09-14 02:54:07 -07:00