suite-py 1.42.1__tar.gz → 1.42.2__tar.gz

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.
Files changed (44) hide show
  1. {suite_py-1.42.1 → suite_py-1.42.2}/PKG-INFO +4 -4
  2. {suite_py-1.42.1 → suite_py-1.42.2}/pyproject.toml +4 -4
  3. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/__version__.py +1 -1
  4. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/cli.py +5 -3
  5. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/handler/okta_handler.py +13 -9
  6. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/oauth.py +1 -1
  7. {suite_py-1.42.1 → suite_py-1.42.2}/LICENSE-APACHE +0 -0
  8. {suite_py-1.42.1 → suite_py-1.42.2}/LICENSE-MIT +0 -0
  9. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/__init__.py +0 -0
  10. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/__init__.py +0 -0
  11. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/ask_review.py +0 -0
  12. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/bump.py +0 -0
  13. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/check.py +0 -0
  14. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/common.py +0 -0
  15. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/context.py +0 -0
  16. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/create_branch.py +0 -0
  17. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/login.py +0 -0
  18. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/merge_pr.py +0 -0
  19. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/open_pr.py +0 -0
  20. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/project_lock.py +0 -0
  21. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/release.py +0 -0
  22. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/set_token.py +0 -0
  23. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/commands/status.py +0 -0
  24. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/__init__.py +0 -0
  25. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/config.py +0 -0
  26. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/handler/__init__.py +0 -0
  27. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/handler/aws_handler.py +0 -0
  28. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/handler/captainhook_handler.py +0 -0
  29. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/handler/changelog_handler.py +0 -0
  30. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/handler/frequent_reviewers_handler.py +0 -0
  31. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/handler/git_handler.py +0 -0
  32. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/handler/github_handler.py +0 -0
  33. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/handler/metrics_handler.py +0 -0
  34. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/handler/prompt_utils.py +0 -0
  35. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/handler/version_handler.py +0 -0
  36. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/handler/youtrack_handler.py +0 -0
  37. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/logger.py +0 -0
  38. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/metrics.py +0 -0
  39. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/requests/__init__.py +0 -0
  40. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/requests/auth.py +0 -0
  41. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/requests/session.py +0 -0
  42. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/symbol.py +0 -0
  43. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/lib/tokens.py +0 -0
  44. {suite_py-1.42.1 → suite_py-1.42.2}/suite_py/templates/login.html +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: suite-py
3
- Version: 1.42.1
3
+ Version: 1.42.2
4
4
  Summary:
5
5
  Author: larrywax, EugenioLaghi, michelangelomo
6
6
  Author-email: devops@prima.it
@@ -21,12 +21,12 @@ Requires-Dist: black (>=22.6,<25.0)
21
21
  Requires-Dist: boto3 (>=1.17.84)
22
22
  Requires-Dist: cement (>=3.0)
23
23
  Requires-Dist: colorama (>=0.4.3)
24
- Requires-Dist: cryptography (==43.0.0)
24
+ Requires-Dist: cryptography (==43.0.1)
25
25
  Requires-Dist: halo (>=0.0.28)
26
26
  Requires-Dist: inquirer (==3.1.4)
27
27
  Requires-Dist: itsdangerous (==2.2.0)
28
28
  Requires-Dist: keyring (>=23.9.1,<26.0.0)
29
- Requires-Dist: kubernetes (==30.1.0)
29
+ Requires-Dist: kubernetes (==31.0.0)
30
30
  Requires-Dist: logzero (==1.7.0)
31
31
  Requires-Dist: markupsafe (==2.0.1)
32
32
  Requires-Dist: pptree (==3.1)
@@ -36,7 +36,7 @@ Requires-Dist: pytest (>=7.0.0)
36
36
  Requires-Dist: python-dateutil (>=2.8.2)
37
37
  Requires-Dist: requests (>=2.26.0)
38
38
  Requires-Dist: requests-toolbelt (>=0.9.1)
39
- Requires-Dist: rich (==13.7.1)
39
+ Requires-Dist: rich (==13.9.2)
40
40
  Requires-Dist: semver (>=2.13.0,<3.0.0)
41
41
  Requires-Dist: termcolor (>=1.1.0)
42
42
  Requires-Dist: truststore (>=0.7,<0.10) ; python_version >= "3.10"
@@ -2,7 +2,7 @@
2
2
  authors = ["larrywax, EugenioLaghi, michelangelomo <devops@prima.it>"]
3
3
  description = ""
4
4
  name = "suite-py"
5
- version = "1.42.1"
5
+ version = "1.42.2"
6
6
 
7
7
  [tool.poetry.dependencies]
8
8
  Click = ">=7.0"
@@ -19,7 +19,7 @@ halo = ">=0.0.28"
19
19
  inquirer = "==3.1.4"
20
20
  itsdangerous = "==2.2.0"
21
21
  keyring = ">=23.9.1,<26.0.0"
22
- kubernetes = "==30.1.0"
22
+ kubernetes = "==31.0.0"
23
23
  logzero = "==1.7.0"
24
24
  markupsafe = "==2.0.1"
25
25
  pptree = "==3.1"
@@ -30,11 +30,11 @@ python = ">=3.8,<4.0"
30
30
  python-dateutil = ">=2.8.2"
31
31
  requests = ">=2.26.0"
32
32
  requests-toolbelt = ">=0.9.1"
33
- rich = "==13.7.1"
33
+ rich = "==13.9.2"
34
34
  semver = "^2.13.0"
35
35
  termcolor = ">=1.1.0"
36
36
  truststore = {version = ">=0.7,<0.10", python = ">=3.10"}
37
- cryptography = "43.0.0"
37
+ cryptography = "43.0.1"
38
38
 
39
39
  [tool.poetry.dev-dependencies]
40
40
 
@@ -1,2 +1,2 @@
1
1
  # -*- encoding: utf-8 -*-
2
- __version__ = "1.42.1"
2
+ __version__ = "1.42.2"
@@ -107,9 +107,11 @@ def catch_exceptions(func):
107
107
  def wrapper(*args, **kwargs):
108
108
  try:
109
109
  return func(*args, **kwargs)
110
- except ClickException as e:
111
- raise e
112
110
  except Exception as e:
111
+ # Ignore all exception classes from the click module
112
+ if type(e).__module__.startswith("click."):
113
+ raise e
114
+
113
115
  logger.debug("An error occured:", exc_info=True)
114
116
  raise ClickException(f"{str(e)}. rerun with -v for more details") from e
115
117
 
@@ -168,7 +170,7 @@ def main(ctx, project, timeout, verbose):
168
170
  if not skip_confirmation and not prompt_utils.ask_confirm(
169
171
  f"Do you want to continue on project {os.path.basename(project)}?"
170
172
  ):
171
- return
173
+ ctx.exit()
172
174
  if timeout:
173
175
  config.user["captainhook_timeout"] = timeout
174
176
 
@@ -9,7 +9,9 @@ _SCOPE = "openid offline_access"
9
9
 
10
10
 
11
11
  class OktaError(Exception):
12
- pass
12
+ def __init__(self, message) -> None:
13
+ message = f"{message}\nTry relogging with 'suite-py login'"
14
+ super().__init__(message)
13
15
 
14
16
 
15
17
  class Okta:
@@ -38,15 +40,17 @@ class Okta:
38
40
 
39
41
  refresh_token = self._get_refresh_token()
40
42
  if not isinstance(refresh_token, str):
41
- raise OktaError(
42
- "Invalid okta refresh token. Try logging in with `suite-py login`"
43
+ raise OktaError("Invalid okta refresh token")
44
+
45
+ try:
46
+ res = oauth.do_refresh_token(
47
+ self._config.okta["client_id"],
48
+ self._config.okta["base_url"],
49
+ _SCOPE,
50
+ refresh_token,
43
51
  )
44
- res = oauth.do_refresh_token(
45
- self._config.okta["client_id"],
46
- self._config.okta["base_url"],
47
- _SCOPE,
48
- refresh_token,
49
- )
52
+ except oauth.OAuthError as e:
53
+ raise OktaError(f"Error refreshing a token with okta: {e}") from e
50
54
 
51
55
  return self._update_tokens(res)
52
56
 
@@ -37,7 +37,7 @@ def retrieve_token(base_url, params) -> OAuthTokenResponse:
37
37
  data = requests.post(url, headers=headers, data=params, timeout=30).json()
38
38
  logger.debug(data)
39
39
 
40
- if error := data.get("error_description", None):
40
+ if error := data.get("error_description", data.get("errorSummary", None)):
41
41
  raise OAuthError(f"OAuth error: {error}")
42
42
 
43
43
  return OAuthTokenResponse(
File without changes
File without changes