Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import path_to_url() from utils/misc.py instead of download.py #6567

Merged
merged 1 commit into from
Jun 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pip/_internal/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.download import path_to_url
from pip._internal.models.link import Link
from pip._internal.utils.compat import expanduser
from pip._internal.utils.misc import path_to_url
from pip._internal.utils.temp_dir import TempDirectory
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
from pip._internal.wheel import InvalidWheelFilename, Wheel
Expand Down
4 changes: 2 additions & 2 deletions src/pip/_internal/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.six.moves.urllib import request as urllib_request

from pip._internal.download import HAS_TLS, is_url, path_to_url, url_to_path
from pip._internal.download import HAS_TLS, is_url, url_to_path
from pip._internal.exceptions import (
BestVersionAlreadyInstalled, DistributionNotFound, InvalidWheelFilename,
UnsupportedWheel,
Expand All @@ -34,7 +34,7 @@
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import (
ARCHIVE_EXTENSIONS, SUPPORTED_EXTENSIONS, WHEEL_EXTENSION, normalize_path,
redact_password_from_url,
path_to_url, redact_password_from_url,
)
from pip._internal.utils.packaging import check_requires_python
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
Expand Down
3 changes: 1 addition & 2 deletions src/pip/_internal/models/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

from pip._vendor.six.moves.urllib import parse as urllib_parse

from pip._internal.download import path_to_url
from pip._internal.utils.misc import (
WHEEL_EXTENSION, redact_password_from_url, splitext,
WHEEL_EXTENSION, path_to_url, redact_password_from_url, splitext,
)
from pip._internal.utils.models import KeyBasedCompareMixin
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
Expand Down
6 changes: 2 additions & 4 deletions src/pip/_internal/req/constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
from pip._vendor.packaging.specifiers import Specifier
from pip._vendor.pkg_resources import RequirementParseError, parse_requirements

from pip._internal.download import (
is_archive_file, is_url, path_to_url, url_to_path,
)
from pip._internal.download import is_archive_file, is_url, url_to_path
from pip._internal.exceptions import InstallationError
from pip._internal.models.index import PyPI, TestPyPI
from pip._internal.models.link import Link
from pip._internal.pyproject import make_pyproject_path
from pip._internal.req.req_install import InstallRequirement
from pip._internal.utils.misc import is_installable_dir
from pip._internal.utils.misc import is_installable_dir, path_to_url
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
from pip._internal.vcs import vcs
from pip._internal.wheel import Wheel
Expand Down
4 changes: 2 additions & 2 deletions src/pip/_internal/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from pip._vendor.six import StringIO

from pip._internal import pep425tags
from pip._internal.download import path_to_url, unpack_url
from pip._internal.download import unpack_url
from pip._internal.exceptions import (
InstallationError, InvalidWheelFilename, UnsupportedWheel,
)
Expand All @@ -34,7 +34,7 @@
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import (
LOG_DIVIDER, call_subprocess, captured_stdout, ensure_dir,
format_command_args, read_chunks,
format_command_args, path_to_url, read_chunks,
)
from pip._internal.utils.setuptools_build import SETUPTOOLS_SHIM
from pip._internal.utils.temp_dir import TempDirectory
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
import pip
from pip._internal.download import (
CI_ENVIRONMENT_VARIABLES, MultiDomainBasicAuth, PipSession, SafeFileCache,
path_to_url, unpack_file_url, unpack_http_url, url_to_path,
unpack_file_url, unpack_http_url, url_to_path,
)
from pip._internal.exceptions import HashMismatch
from pip._internal.models.link import Link
from pip._internal.utils.hashes import Hashes
from pip._internal.utils.misc import path_to_url
from tests.lib import create_file


Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_req.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pip._vendor.packaging.requirements import Requirement

from pip._internal.commands.install import InstallCommand
from pip._internal.download import PipSession, path_to_url
from pip._internal.download import PipSession
from pip._internal.exceptions import (
HashErrors, InstallationError, InvalidWheelFilename, PreviousBuildDirError,
)
Expand All @@ -23,6 +23,7 @@
)
from pip._internal.req.req_file import process_line
from pip._internal.req.req_tracker import RequirementTracker
from pip._internal.utils.misc import path_to_url
from tests.lib import DATA_DIR, assert_raises_regexp, requirements_file


Expand Down