|
11 | 11 | import os |
12 | 12 | from functools import partial |
13 | 13 | from optparse import Values |
14 | | -from pathlib import Path |
15 | 14 | from typing import Any, Callable, TypeVar |
16 | 15 |
|
17 | | -from pip._vendor.packaging import pylock |
18 | | - |
19 | 16 | from pip._internal.build_env import ( |
20 | 17 | BuildEnvironmentInstaller, |
21 | 18 | InprocessBuildEnvironmentInstaller, |
|
51 | 48 | from pip._internal.req.req_install import InstallRequirement |
52 | 49 | from pip._internal.resolution.base import BaseResolver |
53 | 50 | from pip._internal.utils.packaging import check_requires_python |
54 | | -from pip._internal.utils.pylock import select_from_pylock_path_or_url |
| 51 | +from pip._internal.utils.pylock import ( |
| 52 | + is_valid_pylock_filename, |
| 53 | + select_from_pylock_path_or_url, |
| 54 | +) |
55 | 55 | from pip._internal.utils.temp_dir import ( |
56 | 56 | TempDirectory, |
57 | 57 | TempDirectoryTypeRegistry, |
@@ -337,8 +337,7 @@ def get_requirements( |
337 | 337 |
|
338 | 338 | # NOTE: options.require_hashes may be set if --require-hashes is True |
339 | 339 | for filename in options.requirements: |
340 | | - # TODO: filename may be a URL, so pathlib.Path may not be entirely correct |
341 | | - if pylock.is_valid_pylock_path(Path(filename)): |
| 340 | + if is_valid_pylock_filename(filename): |
342 | 341 | logger.warning( |
343 | 342 | "Using pylock.toml as a requirements source " |
344 | 343 | "is an experimental feature. " |
|
0 commit comments