mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
deps: bump dvc-studio-client to >=0.19,<1 (#10298)
This commit is contained in:
@@ -31,12 +31,13 @@ class CmdStudioLogin(CmdConfig):
|
||||
"logout using 'dvc studio logout'."
|
||||
)
|
||||
|
||||
open_browser = not self.args.no_open
|
||||
try:
|
||||
_, access_token = get_access_token(
|
||||
token_name=name,
|
||||
hostname=hostname,
|
||||
scopes=scopes,
|
||||
use_device_code=self.args.no_open,
|
||||
open_browser=open_browser,
|
||||
client_name="DVC",
|
||||
)
|
||||
except StudioAuthError as e:
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ dependencies = [
|
||||
"dvc-data>=3.10,<3.12",
|
||||
"dvc-http>=2.29.0",
|
||||
"dvc-render>=1.0.1,<2",
|
||||
"dvc-studio-client>=0.17.1,<1",
|
||||
"dvc-studio-client>=0.19,<1",
|
||||
"dvc-task>=0.3.0,<1",
|
||||
"flatten_dict<1,>=0.4.1",
|
||||
# https://github.com/iterative/dvc/issues/9654
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from dvc_studio_client.auth import AuthenticationExpired
|
||||
from dvc_studio_client.auth import AuthorizationExpiredError
|
||||
|
||||
from dvc.cli import main
|
||||
from dvc.utils.studio import STUDIO_URL
|
||||
@@ -6,9 +6,9 @@ from dvc.utils.studio import STUDIO_URL
|
||||
|
||||
def test_studio_login_token_check_failed(mocker):
|
||||
mocker.patch(
|
||||
"dvc_studio_client.auth.get_access_token", side_effect=AuthenticationExpired
|
||||
"dvc_studio_client.auth.get_access_token",
|
||||
side_effect=AuthorizationExpiredError,
|
||||
)
|
||||
|
||||
assert main(["studio", "login"]) == 1
|
||||
|
||||
|
||||
@@ -52,8 +52,8 @@ def test_studio_login_arguments(mocker):
|
||||
token_name="token_name",
|
||||
hostname="https://example.com",
|
||||
scopes="experiments",
|
||||
use_device_code=True,
|
||||
client_name="DVC",
|
||||
open_browser=False,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user