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

push: fix http storage ignoring method setting #6981

Merged
merged 3 commits into from
Nov 15, 2021
Merged
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
14 changes: 13 additions & 1 deletion dvc/fs/http.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import threading
from typing import Any

from funcy import cached_property, memoize, wrap_with

from dvc import prompt
from dvc.progress import DEFAULT_CALLBACK
from dvc.scheme import Schemes

from .fsspec_wrapper import FSSpecWrapper, NoDirectoriesMixin
from .fsspec_wrapper import AnyFSPath, FSSpecWrapper, NoDirectoriesMixin


@wrap_with(threading.Lock())
Expand Down Expand Up @@ -127,3 +129,13 @@ def fs(self):

def unstrip_protocol(self, path: str) -> str:
return path

def put_file(
self,
from_file: AnyFSPath,
to_info: AnyFSPath,
callback: Any = DEFAULT_CALLBACK,
**kwargs,
) -> None:
kwargs.setdefault("method", self.upload_method)
super().put_file(from_file, to_info, callback=callback, **kwargs)