mainsequence 8.1.27.dev28__py3-none-any.whl → 8.1.27.dev29__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
mainsequence/cli/cli.py CHANGED
@@ -44,6 +44,7 @@ from textwrap import dedent
44
44
  from typing import NoReturn
45
45
 
46
46
  import click
47
+ import requests
47
48
  import typer
48
49
  from packaging.specifiers import InvalidSpecifier, SpecifierSet
49
50
  from packaging.version import InvalidVersion, Version
@@ -713,7 +714,8 @@ def _require_login() -> dict:
713
714
  Returns:
714
715
  profile dict
715
716
 
716
- Raises typer.Exit(1) with user-friendly message on failure.
717
+ Raises typer.Exit(1) with user-friendly message on failure: a missing or
718
+ rejected session, or a backend that could not be reached.
717
719
  """
718
720
  try:
719
721
  prof = get_current_user_profile()
@@ -726,6 +728,11 @@ def _require_login() -> dict:
726
728
  except ApiError as e:
727
729
  error("Not logged in. Run: mainsequence login")
728
730
  raise typer.Exit(1) from e
731
+ except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
732
+ # The backend gave no answer about the session, so this is not "Not logged in".
733
+ # Never echo the exception: a transport error can carry request details.
734
+ error(f"The backend at {cfg.backend_url()} could not be reached ({type(e).__name__}).")
735
+ raise typer.Exit(1) from e
729
736
 
730
737
 
731
738
  def _runtime_credential_mode_enabled() -> bool:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mainsequence
3
- Version: 8.1.27.dev28
3
+ Version: 8.1.27.dev29
4
4
  Summary: Main Sequence SDK
5
5
  Author-email: Main Sequence GmbH <dev@main-sequence.io>
6
6
  License-Expression: MIT
@@ -21,7 +21,7 @@ mainsequence/scaffold_skills.py,sha256=mhjn7Xy5BSp8711xf7jziOC-DgyI1QUNWDup-fg_7
21
21
  mainsequence/cli/__init__.py,sha256=sMWTnomCaISjnureLuXFRqOzkH2Y77uYEivsd-M6_8Y,28
22
22
  mainsequence/cli/api.py,sha256=r9D0lSaw2Ah-39i04w9JgNkg3yjq88TLesB63B6nvug,128586
23
23
  mainsequence/cli/browser_auth.py,sha256=C-Sbpt0Pr9Pv3Z9dO80TMk7zPcaaZ-4zvW0tbRVMrTU,9863
24
- mainsequence/cli/cli.py,sha256=Rr9gTkoQ5SOmXhARx8fggSp8QCtGFB7Z8-vZUT0qCd4,274949
24
+ mainsequence/cli/cli.py,sha256=RYtT5DDCvoIrZQixAQWycJyqHxa4kD0xxoXj3DU7_0Y,275424
25
25
  mainsequence/cli/code_repository_status.py,sha256=SHEnU8YSWFowPG6dEdE4Yd8CS1tIcJSE1MXFLfvD3Os,5975
26
26
  mainsequence/cli/config.py,sha256=IT42UzG93uBhR98yUyg8YR-wMlQAgfx8UrybJcpih7Y,44884
27
27
  mainsequence/cli/docker_utils.py,sha256=eAnp9MI042cHWwKasA5IF2I7INL3A6tV2JX-cSIe7rc,10687
@@ -50,9 +50,9 @@ mainsequence/instrumentation/utils.py,sha256=b-ihjSioAepeLfMpudM2SqCtvnxMqIXileH
50
50
  mainsequence/server/__init__.py,sha256=559DiiBcCP6veWRmK2mXUEbsl7gbZofTvsbTUFjn0VE,82
51
51
  mainsequence/server/caller_assertions.py,sha256=5q8LZrDYozaonG1eBb9P8DojKQlB2i2qUJwO5VhsrW4,9780
52
52
  mainsequence/server/fastapi.py,sha256=tD1aVuJOgoBTu7H8bs9IldPNYRT4fhkr1leN3KZP1pI,10521
53
- mainsequence-8.1.27.dev28.dist-info/licenses/LICENSE,sha256=b6Ecsk8wjsEby3lbSzdljR6hHiFGHBizt9iWV2p1c_I,1074
54
- mainsequence-8.1.27.dev28.dist-info/METADATA,sha256=2EfQf7FEkuV7OsBd798j0RrA1GIMdsA87tlAjGPueyc,7436
55
- mainsequence-8.1.27.dev28.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
56
- mainsequence-8.1.27.dev28.dist-info/entry_points.txt,sha256=XGAOq3-mF2lWWpeRJvoaWyMarRcK167mH1g124aGdUs,88
57
- mainsequence-8.1.27.dev28.dist-info/top_level.txt,sha256=BFeblM_Q9q0cUWBvTxnfWcWQEHtf5XZi9nOS-Gdfwus,28
58
- mainsequence-8.1.27.dev28.dist-info/RECORD,,
53
+ mainsequence-8.1.27.dev29.dist-info/licenses/LICENSE,sha256=b6Ecsk8wjsEby3lbSzdljR6hHiFGHBizt9iWV2p1c_I,1074
54
+ mainsequence-8.1.27.dev29.dist-info/METADATA,sha256=BcTupmmCCzmd58lNNYyLxK7BrxzwDzpwwJYyUXmYn8s,7436
55
+ mainsequence-8.1.27.dev29.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
56
+ mainsequence-8.1.27.dev29.dist-info/entry_points.txt,sha256=XGAOq3-mF2lWWpeRJvoaWyMarRcK167mH1g124aGdUs,88
57
+ mainsequence-8.1.27.dev29.dist-info/top_level.txt,sha256=BFeblM_Q9q0cUWBvTxnfWcWQEHtf5XZi9nOS-Gdfwus,28
58
+ mainsequence-8.1.27.dev29.dist-info/RECORD,,