suite-py 1.41.7__tar.gz → 1.41.9__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.
- {suite_py-1.41.7 → suite_py-1.41.9}/PKG-INFO +4 -4
- {suite_py-1.41.7 → suite_py-1.41.9}/pyproject.toml +4 -4
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/__version__.py +1 -1
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/cli.py +7 -9
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/batch_job.py +2 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/context.py +12 -1
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/secret.py +0 -1
- {suite_py-1.41.7 → suite_py-1.41.9}/LICENSE-APACHE +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/LICENSE-MIT +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/__init__.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/__init__.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/aggregator.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/ask_review.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/bump.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/check.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/common.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/create_branch.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/deploy.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/docker.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/generator.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/id.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/ip.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/login.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/merge_pr.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/open_pr.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/project_lock.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/release.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/set_token.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/commands/status.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/__init__.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/config.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/__init__.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/aws_handler.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/captainhook_handler.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/changelog_handler.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/drone_handler.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/frequent_reviewers_handler.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/git_handler.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/github_handler.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/metrics_handler.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/okta_handler.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/prompt_utils.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/vault_handler.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/version_handler.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/handler/youtrack_handler.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/logger.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/metrics.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/oauth.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/requests/__init__.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/requests/auth.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/requests/session.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/symbol.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/suite_py/lib/tokens.py +0 -0
- {suite_py-1.41.7 → suite_py-1.41.9}/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.41.
|
|
3
|
+
Version: 1.41.9
|
|
4
4
|
Summary:
|
|
5
5
|
Author: larrywax, EugenioLaghi, michelangelomo
|
|
6
6
|
Author-email: devops@prima.it
|
|
@@ -21,10 +21,10 @@ 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 (==42.0.
|
|
24
|
+
Requires-Dist: cryptography (==42.0.7)
|
|
25
25
|
Requires-Dist: halo (>=0.0.28)
|
|
26
26
|
Requires-Dist: inquirer (==3.1.4)
|
|
27
|
-
Requires-Dist: itsdangerous (==2.0
|
|
27
|
+
Requires-Dist: itsdangerous (==2.2.0)
|
|
28
28
|
Requires-Dist: keyring (>=23.9.1,<26.0.0)
|
|
29
29
|
Requires-Dist: kubernetes (==29.0.0)
|
|
30
30
|
Requires-Dist: logzero (==1.7.0)
|
|
@@ -39,4 +39,4 @@ Requires-Dist: requests-toolbelt (>=0.9.1)
|
|
|
39
39
|
Requires-Dist: rich (==13.7.1)
|
|
40
40
|
Requires-Dist: semver (>=2.13.0,<3.0.0)
|
|
41
41
|
Requires-Dist: termcolor (>=1.1.0)
|
|
42
|
-
Requires-Dist: truststore (>=0.7,<0.
|
|
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.41.
|
|
5
|
+
version = "1.41.9"
|
|
6
6
|
|
|
7
7
|
[tool.poetry.dependencies]
|
|
8
8
|
Click = ">=7.0"
|
|
@@ -17,7 +17,7 @@ cement = ">=3.0"
|
|
|
17
17
|
colorama = ">=0.4.3"
|
|
18
18
|
halo = ">=0.0.28"
|
|
19
19
|
inquirer = "==3.1.4"
|
|
20
|
-
itsdangerous = "==2.0
|
|
20
|
+
itsdangerous = "==2.2.0"
|
|
21
21
|
keyring = ">=23.9.1,<26.0.0"
|
|
22
22
|
kubernetes = "==29.0.0"
|
|
23
23
|
logzero = "==1.7.0"
|
|
@@ -33,8 +33,8 @@ requests-toolbelt = ">=0.9.1"
|
|
|
33
33
|
rich = "==13.7.1"
|
|
34
34
|
semver = "^2.13.0"
|
|
35
35
|
termcolor = ">=1.1.0"
|
|
36
|
-
truststore = {version = ">=0.7,<0.
|
|
37
|
-
cryptography = "42.0.
|
|
36
|
+
truststore = {version = ">=0.7,<0.10", python = ">=3.10"}
|
|
37
|
+
cryptography = "42.0.7"
|
|
38
38
|
|
|
39
39
|
[tool.poetry.dev-dependencies]
|
|
40
40
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
__version__ = "1.41.
|
|
2
|
+
__version__ = "1.41.9"
|
|
@@ -9,8 +9,8 @@ import sys
|
|
|
9
9
|
from functools import wraps
|
|
10
10
|
from typing import Optional
|
|
11
11
|
|
|
12
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
12
13
|
import click
|
|
13
|
-
import pkg_resources
|
|
14
14
|
import requests
|
|
15
15
|
from autoupgrade import Package
|
|
16
16
|
from click.exceptions import ClickException
|
|
@@ -43,15 +43,15 @@ def maybe_inject_truststore() -> None:
|
|
|
43
43
|
)
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
def fetch_latest_version() -> Optional[
|
|
46
|
+
def fetch_latest_version() -> Optional[str]:
|
|
47
47
|
"""
|
|
48
|
-
Fetches the latest version of suite-py as a
|
|
48
|
+
Fetches the latest version of suite-py as a str
|
|
49
49
|
Returns None on error
|
|
50
50
|
"""
|
|
51
51
|
try:
|
|
52
52
|
# pylint: disable-next=missing-timeout
|
|
53
53
|
pkg_info = requests.get("https://pypi.org/pypi/suite-py/json").json()
|
|
54
|
-
return
|
|
54
|
+
return pkg_info["info"]["version"]
|
|
55
55
|
except Exception:
|
|
56
56
|
logger.warning("Failed to fetch latest version of suite-py!")
|
|
57
57
|
return None
|
|
@@ -65,8 +65,8 @@ def upgrade_suite_py_if_needed(break_on_missing_package: bool = False) -> None:
|
|
|
65
65
|
"""
|
|
66
66
|
|
|
67
67
|
try:
|
|
68
|
-
|
|
69
|
-
except
|
|
68
|
+
installed_version = version("suite_py")
|
|
69
|
+
except PackageNotFoundError as error:
|
|
70
70
|
# We are in a virtual environment where suite-py is not installed, don't bother trying to upgrade
|
|
71
71
|
if break_on_missing_package:
|
|
72
72
|
raise error
|
|
@@ -76,12 +76,10 @@ def upgrade_suite_py_if_needed(break_on_missing_package: bool = False) -> None:
|
|
|
76
76
|
)
|
|
77
77
|
return
|
|
78
78
|
|
|
79
|
-
current_version = pkg_resources.parse_version(__version__)
|
|
80
|
-
|
|
81
79
|
try:
|
|
82
80
|
# If available, upgrade (if needed)
|
|
83
81
|
latest_version = fetch_latest_version()
|
|
84
|
-
if latest_version is None or latest_version >
|
|
82
|
+
if latest_version is None or latest_version > installed_version:
|
|
85
83
|
# If we fail to fetch the latest version, fallback to attempting the upgrade anyway
|
|
86
84
|
Package("suite_py").upgrade()
|
|
87
85
|
except Exception as error:
|
|
@@ -17,10 +17,21 @@ class Context:
|
|
|
17
17
|
|
|
18
18
|
# Call the function to_call with kwargs, injecting fields from self as default arguments
|
|
19
19
|
def call(self, to_call, **kwargs):
|
|
20
|
-
provided =
|
|
20
|
+
provided = self.shallow_dict()
|
|
21
21
|
needed = signature(to_call).parameters.keys()
|
|
22
22
|
provided = {k: provided[k] for k in needed if k in provided}
|
|
23
23
|
|
|
24
24
|
kwargs = provided | kwargs
|
|
25
25
|
|
|
26
26
|
return to_call(**kwargs)
|
|
27
|
+
|
|
28
|
+
def shallow_dict(self):
|
|
29
|
+
"""
|
|
30
|
+
Converts the dataclass to a dict.
|
|
31
|
+
|
|
32
|
+
Unlike dataclasses.asdict this function only shallow copies the fields
|
|
33
|
+
instead of using copy.deepcopy()
|
|
34
|
+
"""
|
|
35
|
+
return {
|
|
36
|
+
field.name: getattr(self, field.name) for field in dataclasses.fields(self)
|
|
37
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|