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

maintain download() interface in conda.exports #8698

Merged
merged 1 commit into from May 30, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions conda/core/package_cache_data.py
Expand Up @@ -727,6 +727,6 @@ def rm_fetched(dist):
raise NotImplementedError()


def download(url, dst_path, session=None, md5=None, urlstxt=False, retries=3):
def download(url, dst_path, session=None, md5sum=None, urlstxt=False, retries=3):
from ..gateways.connection.download import download as gateway_download
gateway_download(url, dst_path, md5)
gateway_download(url, dst_path, md5sum)
11 changes: 8 additions & 3 deletions conda/exports.py
Expand Up @@ -52,13 +52,13 @@
from .gateways.disk.link import lchmod # NOQA
lchmod = lchmod

from .gateways.connection.download import TmpDownload # NOQA
from .gateways.connection.download import TmpDownload, download as _download # NOQA

TmpDownload = TmpDownload
handle_proxy_407 = lambda x, y: _warnings.warn("handle_proxy_407 is deprecated. "
"Now handled by CondaSession.")
from .core.package_cache_data import download, rm_fetched # NOQA
download, rm_fetched = download, rm_fetched
from .core.package_cache_data import rm_fetched # NOQA
rm_fetched = rm_fetched

from .gateways.disk.delete import delete_trash, move_to_trash # NOQA
delete_trash, move_to_trash = delete_trash, move_to_trash
Expand Down Expand Up @@ -394,3 +394,8 @@ def is_linked(prefix, dist):
return prefix_record
else:
return None


def download(url, dst_path, session=None, md5sum=None, urlstxt=False, retries=3,
sha256=None, size=None):
return _download(url, dst_path, md5=md5sum, sha256=sha256, size=size)