1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

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.
This commit is contained in:
Tzu-ping Chung 2018-09-30 13:46:04 +08:00
parent d275360745
commit bd6a7ea6c6

View file

@ -886,7 +886,7 @@ class HTMLPage(object):
url = _clean_link(urllib_parse.urljoin(base_url, href))
pyrequire = anchor.get('data-requires-python')
pyrequire = unescape(pyrequire) if pyrequire else None
yield Link(url, self, requires_python=pyrequire)
yield Link(url, self.url, requires_python=pyrequire)
Search = namedtuple('Search', 'supplied canonical formats')