|
17 | 17 |
|
18 | 18 | from pip.compat import ipaddress
|
19 | 19 | from pip.utils import (
|
20 |
| - Inf, cached_property, normalize_name, splitext, normalize_path, |
| 20 | + Inf, cached_property, splitext, normalize_path, |
21 | 21 | ARCHIVE_EXTENSIONS, SUPPORTED_EXTENSIONS)
|
22 | 22 | from pip.utils.deprecation import RemovedInPip9Warning
|
23 | 23 | from pip.utils.logging import indent_log
|
@@ -527,30 +527,6 @@ def find_requirement(self, req, upgrade):
|
527 | 527 |
|
528 | 528 | return selected_version
|
529 | 529 |
|
530 |
| - def _find_url_name(self, index_url, url_name): |
531 |
| - """ |
532 |
| - Finds the true URL name of a package, when the given name isn't quite |
533 |
| - correct. |
534 |
| - This is usually used to implement case-insensitivity. |
535 |
| - """ |
536 |
| - if not index_url.url.endswith('/'): |
537 |
| - # Vaguely part of the PyPI API... weird but true. |
538 |
| - # FIXME: bad to modify this? |
539 |
| - index_url.url += '/' |
540 |
| - page = self._get_page(index_url) |
541 |
| - if page is None: |
542 |
| - logger.critical('Cannot fetch index base URL %s', index_url) |
543 |
| - return |
544 |
| - norm_name = normalize_name(url_name) |
545 |
| - for link in page.links: |
546 |
| - base = posixpath.basename(link.path.rstrip('/')) |
547 |
| - if norm_name == normalize_name(base): |
548 |
| - logger.debug( |
549 |
| - 'Real name of requirement %s is %s', url_name, base, |
550 |
| - ) |
551 |
| - return base |
552 |
| - return None |
553 |
| - |
554 | 530 | def _get_pages(self, locations, project_name):
|
555 | 531 | """
|
556 | 532 | Yields (page, page_url) from the given locations, skipping
|
|
0 commit comments