toolforge-components-cli 0.0.15__tar.gz → 0.0.17__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.
@@ -1,20 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: toolforge-components-cli
3
- Version: 0.0.15
3
+ Version: 0.0.17
4
4
  Summary: Toolforge components client
5
5
  License: GPLv3
6
6
  License-File: LICENSE
7
7
  Author: Slavina Stefanova
8
8
  Author-email: sstefanova@wikimedia.org
9
- Requires-Python: >=3.7,<4.0
9
+ Requires-Python: >=3.13,<4.0
10
10
  Classifier: License :: Other/Proprietary License
11
11
  Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.7
13
- Classifier: Programming Language :: Python :: 3.8
14
- Classifier: Programming Language :: Python :: 3.9
15
- Classifier: Programming Language :: Python :: 3.10
16
- Classifier: Programming Language :: Python :: 3.11
17
- Classifier: Programming Language :: Python :: 3.12
18
12
  Classifier: Programming Language :: Python :: 3.13
19
13
  Classifier: Programming Language :: Python :: 3.14
20
14
  Requires-Dist: PyYAML (>=6.0,<7.0)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "toolforge-components-cli"
3
- version = "0.0.15"
3
+ version = "0.0.17"
4
4
  description = "Toolforge components client"
5
5
  authors = ["Slavina Stefanova <sstefanova@wikimedia.org>"]
6
6
  license = "GPLv3"
@@ -8,7 +8,7 @@ readme = "README.md"
8
8
  homepage = "https://gitlab.wikimedia.org/repos/cloud/toolforge/components-cli"
9
9
 
10
10
  [tool.poetry.dependencies]
11
- python = "^3.7"
11
+ python = "^3.13"
12
12
  click = "^8.0.3"
13
13
  PyYAML = "^6.0"
14
14
  requests = "^2.27.1"
@@ -21,9 +21,9 @@ toolforge-weld = ">=1.4,<2.0"
21
21
  "toolforge-components" = "toolforge_components_cli.cli:main"
22
22
 
23
23
  [tool.poetry.group.dev.dependencies]
24
- coverage = "^6.2"
25
- pytest = "^6.2.5"
26
- pytest-cov = "^3.0.0"
24
+ coverage = "^7.13.5"
25
+ pytest = "^9.0.3"
26
+ pytest-cov = "^7.1.0"
27
27
  bats-core-pkg = "^0.1.3"
28
28
  requests-mock = "^1.11.0"
29
29
 
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env python3
2
1
  from __future__ import annotations
3
2
 
4
3
  import json
@@ -602,7 +601,7 @@ def main() -> int:
602
601
  except subprocess.CalledProcessError as e:
603
602
  handle_error(e, debug=debug)
604
603
  return e.returncode
605
- except Exception as e:
604
+ except Exception as e: # noqa: BLE001
606
605
  handle_error(e, debug=debug)
607
606
  return 1
608
607
 
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import socket
4
- from typing import Any, Type, Union
4
+ from typing import Any
5
5
 
6
6
  import requests
7
7
  from toolforge_weld.api_client import ConnectionError, ToolforgeClient
@@ -30,7 +30,7 @@ def handle_http_exception(e: requests.exceptions.HTTPError) -> Exception:
30
30
  if e.response is None:
31
31
  return ComponentsClientError(message="Got no response", context={})
32
32
 
33
- error_class: Union[Type[ComponentsClientError], Type[ComponentsClientUserError]]
33
+ error_class: type[ComponentsClientError | ComponentsClientUserError]
34
34
  if 400 <= e.response.status_code <= 499:
35
35
  error_class = ComponentsClientUserError
36
36
  else:
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from dataclasses import dataclass, field
4
- from functools import lru_cache
4
+ from functools import cache
5
5
  from typing import Any
6
6
 
7
7
  from toolforge_weld.config import Config, Section, load_config
@@ -20,6 +20,6 @@ class ComponentsConfig(Section):
20
20
  return cls(**params)
21
21
 
22
22
 
23
- @lru_cache(maxsize=None)
23
+ @cache
24
24
  def get_loaded_config() -> Config:
25
25
  return load_config(client_name="components", extra_sections=[ComponentsConfig])