Skip to content

Commit

Permalink
deps: bump dvc-studio-client to >=0.19,<1 (iterative#10298)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored Feb 10, 2024
1 parent f639ab5 commit 6efd699
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion dvc/commands/studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ def run(self):
"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:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/command/test_studio.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
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


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


Expand Down Expand Up @@ -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,
)


Expand Down

0 comments on commit 6efd699

Please sign in to comment.