suite-py 1.41.8__py3-none-any.whl → 1.41.10__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.
- suite_py/__version__.py +1 -1
- suite_py/cli.py +37 -25
- suite_py/commands/batch_job.py +2 -0
- suite_py/commands/secret.py +0 -1
- {suite_py-1.41.8.dist-info → suite_py-1.41.10.dist-info}/METADATA +2 -2
- {suite_py-1.41.8.dist-info → suite_py-1.41.10.dist-info}/RECORD +8 -8
- {suite_py-1.41.8.dist-info → suite_py-1.41.10.dist-info}/WHEEL +0 -0
- {suite_py-1.41.8.dist-info → suite_py-1.41.10.dist-info}/entry_points.txt +0 -0
suite_py/__version__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
__version__ = "1.41.
|
|
2
|
+
__version__ = "1.41.10"
|
suite_py/cli.py
CHANGED
|
@@ -4,13 +4,39 @@
|
|
|
4
4
|
# for performance reasons, so turn off the lint warning
|
|
5
5
|
# pylint: disable=import-outside-toplevel
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# We need to inject truststore code before we do any libraries
|
|
8
|
+
# that might end up creating an ssl.SSlContext object
|
|
9
|
+
# pylint: disable=wrong-import-position
|
|
10
|
+
|
|
8
11
|
import sys
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def maybe_inject_truststore() -> None:
|
|
15
|
+
"""
|
|
16
|
+
Injects the truststore package into the system ssl store, to fix verficiation certificate issues when using warp.
|
|
17
|
+
"""
|
|
18
|
+
if sys.version_info >= (3, 10):
|
|
19
|
+
import truststore
|
|
20
|
+
|
|
21
|
+
truststore.inject_into_ssl()
|
|
22
|
+
else:
|
|
23
|
+
# pylint: disable-next=reimported
|
|
24
|
+
from suite_py.lib import logger
|
|
25
|
+
|
|
26
|
+
logger.warning(
|
|
27
|
+
"Your python version is older than 3.10 and doesn't support the truststore package. You might experience issues with certificate verification when connected to the warp VPN.\nPlease update to python 3.10 or newer"
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# Needs to be done before any other imports
|
|
32
|
+
maybe_inject_truststore()
|
|
33
|
+
|
|
34
|
+
import os
|
|
9
35
|
from functools import wraps
|
|
36
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
10
37
|
from typing import Optional
|
|
11
38
|
|
|
12
39
|
import click
|
|
13
|
-
import pkg_resources
|
|
14
40
|
import requests
|
|
15
41
|
from autoupgrade import Package
|
|
16
42
|
from click.exceptions import ClickException
|
|
@@ -25,33 +51,21 @@ from suite_py.lib.handler.captainhook_handler import CaptainHook
|
|
|
25
51
|
from suite_py.lib.handler.okta_handler import Okta
|
|
26
52
|
from suite_py.lib.tokens import Tokens
|
|
27
53
|
|
|
54
|
+
# pylint: enable=wrong-import-position
|
|
55
|
+
|
|
28
56
|
ALLOW_NO_GIT_SUBCOMMAND = ["login", "aggregator"]
|
|
29
57
|
ALLOW_NO_HOME_SUBCOMMAND = ["login", "aggregator"]
|
|
30
58
|
|
|
31
59
|
|
|
32
|
-
def
|
|
33
|
-
"""
|
|
34
|
-
Injects the truststore package into the system ssl store, to fix verficiation certificate issues when using warp.
|
|
60
|
+
def fetch_latest_version() -> Optional[str]:
|
|
35
61
|
"""
|
|
36
|
-
|
|
37
|
-
import truststore
|
|
38
|
-
|
|
39
|
-
truststore.inject_into_ssl()
|
|
40
|
-
else:
|
|
41
|
-
logger.warning(
|
|
42
|
-
"Your python version is older than 3.10 and doesn't support the truststore package. You might experience issues with certificate verification when connected to the warp VPN.\nPlease update to python 3.10 or newer"
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def fetch_latest_version() -> Optional[pkg_resources.packaging.version.Version]:
|
|
47
|
-
"""
|
|
48
|
-
Fetches the latest version of suite-py as a pkg_resources parsed version
|
|
62
|
+
Fetches the latest version of suite-py as a str
|
|
49
63
|
Returns None on error
|
|
50
64
|
"""
|
|
51
65
|
try:
|
|
52
66
|
# pylint: disable-next=missing-timeout
|
|
53
67
|
pkg_info = requests.get("https://pypi.org/pypi/suite-py/json").json()
|
|
54
|
-
return
|
|
68
|
+
return pkg_info["info"]["version"]
|
|
55
69
|
except Exception:
|
|
56
70
|
logger.warning("Failed to fetch latest version of suite-py!")
|
|
57
71
|
return None
|
|
@@ -65,8 +79,8 @@ def upgrade_suite_py_if_needed(break_on_missing_package: bool = False) -> None:
|
|
|
65
79
|
"""
|
|
66
80
|
|
|
67
81
|
try:
|
|
68
|
-
|
|
69
|
-
except
|
|
82
|
+
installed_version = version("suite_py")
|
|
83
|
+
except PackageNotFoundError as error:
|
|
70
84
|
# We are in a virtual environment where suite-py is not installed, don't bother trying to upgrade
|
|
71
85
|
if break_on_missing_package:
|
|
72
86
|
raise error
|
|
@@ -76,12 +90,10 @@ def upgrade_suite_py_if_needed(break_on_missing_package: bool = False) -> None:
|
|
|
76
90
|
)
|
|
77
91
|
return
|
|
78
92
|
|
|
79
|
-
current_version = pkg_resources.parse_version(__version__)
|
|
80
|
-
|
|
81
93
|
try:
|
|
82
94
|
# If available, upgrade (if needed)
|
|
83
95
|
latest_version = fetch_latest_version()
|
|
84
|
-
if latest_version is None or latest_version >
|
|
96
|
+
if latest_version is None or latest_version > installed_version:
|
|
85
97
|
# If we fail to fetch the latest version, fallback to attempting the upgrade anyway
|
|
86
98
|
Package("suite_py").upgrade()
|
|
87
99
|
except Exception as error:
|
|
@@ -245,8 +257,8 @@ def cli_unlock_project(obj, environment):
|
|
|
245
257
|
@click.pass_obj
|
|
246
258
|
@catch_exceptions
|
|
247
259
|
def cli_open_pr(obj):
|
|
248
|
-
from suite_py.commands.open_pr import OpenPR
|
|
249
260
|
from suite_py.commands.ask_review import AskReview
|
|
261
|
+
from suite_py.commands.open_pr import OpenPR
|
|
250
262
|
|
|
251
263
|
ask_review = obj.call(AskReview)
|
|
252
264
|
obj.call(OpenPR, ask_review=ask_review).run()
|
suite_py/commands/batch_job.py
CHANGED
suite_py/commands/secret.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: suite-py
|
|
3
|
-
Version: 1.41.
|
|
3
|
+
Version: 1.41.10
|
|
4
4
|
Summary:
|
|
5
5
|
Author: larrywax, EugenioLaghi, michelangelomo
|
|
6
6
|
Author-email: devops@prima.it
|
|
@@ -21,7 +21,7 @@ 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
27
|
Requires-Dist: itsdangerous (==2.2.0)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
suite_py/__init__.py,sha256=REmi3D0X2G1ZWnYpKs8Ffm3NIj-Hw6dMuvz2b9NW344,142
|
|
2
|
-
suite_py/__version__.py,sha256=
|
|
3
|
-
suite_py/cli.py,sha256=
|
|
2
|
+
suite_py/__version__.py,sha256=i6HmzASsryZBCC4p1Cf_qbUBilep7P848kIqMZUnTNs,50
|
|
3
|
+
suite_py/cli.py,sha256=oGKcY9TUvGgXJl1tYBlkvSCcz6A6Aa7Fye5yEPqB4F8,15159
|
|
4
4
|
suite_py/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
suite_py/commands/aggregator.py,sha256=_xyyX7MOMZzDEvzj2AI03OF3sut5PpSIyuRjUiCp5aI,5747
|
|
6
6
|
suite_py/commands/ask_review.py,sha256=yN__Ac-fiZBPShjRDhyCCQZGfVlQE16KozoJk4UtiNw,3788
|
|
7
|
-
suite_py/commands/batch_job.py,sha256=
|
|
7
|
+
suite_py/commands/batch_job.py,sha256=flTSxmNaUv1VcL91Lv-BwEjFpEyF8APTNysQE_2jPYE,7474
|
|
8
8
|
suite_py/commands/bump.py,sha256=oFZU1hPfD11ujFC5G7wFyQOf2alY3xp2SO1h1ldjf3s,5406
|
|
9
9
|
suite_py/commands/check.py,sha256=0e2NsPi3cqvCwtNYzhR1UroT59bCojLlGo69vv3FiOA,4074
|
|
10
10
|
suite_py/commands/common.py,sha256=aWCEvO3hqdheuMUmZcHuc9EGZPQTk7VkzkHJk283MxQ,566
|
|
@@ -20,7 +20,7 @@ suite_py/commands/merge_pr.py,sha256=gUpoDx3q23X6gF9PLXCZnIL9DfRw_3D0LlqBlGVt7rA
|
|
|
20
20
|
suite_py/commands/open_pr.py,sha256=U7MVl-JFKu1mdfxC_UvxUHtPLEln0g4kKl-SvP-6zd8,7159
|
|
21
21
|
suite_py/commands/project_lock.py,sha256=b7OkGysue_Sl13VIT7B5CTBppCvrB_Q6iC0IJRBSHp8,1909
|
|
22
22
|
suite_py/commands/release.py,sha256=clKgmsNgR9DdgBkYjXI3NqVaw8_mCe2TZHegby3ESn4,16634
|
|
23
|
-
suite_py/commands/secret.py,sha256=
|
|
23
|
+
suite_py/commands/secret.py,sha256=Us7wvsqAPJhe1nUSHOmzO1RSyZriKAGKwi2YEhPNIA4,7976
|
|
24
24
|
suite_py/commands/set_token.py,sha256=fehIqKjKhE-BJGFhgkPTo3Ntr0MvpgLd6EC5yjKuRs8,1508
|
|
25
25
|
suite_py/commands/status.py,sha256=0JUK53_d1-U3WNS742JD2QTiGmCGZONo3jJx8WR7q70,1122
|
|
26
26
|
suite_py/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -48,7 +48,7 @@ suite_py/lib/requests/session.py,sha256=P32H3cWnCWunu91WIj2iDM5U3HzaBglg60VN_C9J
|
|
|
48
48
|
suite_py/lib/symbol.py,sha256=z3QYBuNIwD3qQ3zF-cLOomIr_-C3bO_u5UIDAHMiyTo,60
|
|
49
49
|
suite_py/lib/tokens.py,sha256=kK4vatd5iKEFaue0BZwK1f66YOh9zLdLzP41ZOhjMCU,5534
|
|
50
50
|
suite_py/templates/login.html,sha256=fJLls2SB84oZTSrxTdA5q1PqfvIHcCD4fhVWfyco7Ig,861
|
|
51
|
-
suite_py-1.41.
|
|
52
|
-
suite_py-1.41.
|
|
53
|
-
suite_py-1.41.
|
|
54
|
-
suite_py-1.41.
|
|
51
|
+
suite_py-1.41.10.dist-info/METADATA,sha256=A_GGYDs7Uq5qzCIiUW-PKqxk0QdgS4su2FMwpKWc4A4,1533
|
|
52
|
+
suite_py-1.41.10.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
53
|
+
suite_py-1.41.10.dist-info/entry_points.txt,sha256=dVKLC-9Infy-dHJT_MkK6LcDjOgBCJ8lfPkURJhBjxE,46
|
|
54
|
+
suite_py-1.41.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|