tag-publish 1.2.0.dev99__tar.gz → 1.2.0.dev101__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,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tag-publish
3
- Version: 1.2.0.dev99
3
+ Version: 1.2.0.dev101
4
4
  Summary: Tools used to publish Python packages, Docker images and Helm charts for GitHub tag and branch
5
5
  License: FreeBSD
6
6
  License-File: LICENSE
7
7
  Keywords: ci
8
8
  Author: Camptocamp
9
9
  Author-email: info@camptocamp.com
10
- Requires-Python: >=3.9
10
+ Requires-Python: >=3.10
11
11
  Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: Environment :: Console
13
13
  Classifier: Intended Audience :: Developers
@@ -15,7 +15,6 @@ Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Operating System :: OS Independent
16
16
  Classifier: Programming Language :: Python
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.9
19
18
  Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
21
20
  Classifier: Programming Language :: Python :: 3.12
@@ -15,7 +15,6 @@ classifiers = [
15
15
  'Operating System :: OS Independent',
16
16
  'Programming Language :: Python',
17
17
  'Programming Language :: Python :: 3',
18
- 'Programming Language :: Python :: 3.9',
19
18
  'Programming Language :: Python :: 3.10',
20
19
  'Programming Language :: Python :: 3.11',
21
20
  'Programming Language :: Python :: 3.12',
@@ -34,9 +33,9 @@ include = [
34
33
  "tag_publish/py.typed",
35
34
  "tag_publish/*.json",
36
35
  ]
37
- requires-python = ">=3.9"
36
+ requires-python = ">=3.10"
38
37
  dependencies = ["requests<3,>=2", "twine<7,>=6", "PyYAML<7,>=6", "id<2,>=1", "security-md<2,>=1", "applications-download<2,>=1", "jsonschema-validator-new<1,>=0", "debian-inspector<32,>=31", "multi-repo-automation<2,>=1", "githubkit<1,>=0"]
39
- version = "1.2.0.dev99"
38
+ version = "1.2.0.dev101"
40
39
 
41
40
  [project.urls]
42
41
  repository = "https://github.com/camptocamp/tag-publish"
@@ -48,7 +47,7 @@ tag-publish-new = "tag_publish.new:main"
48
47
 
49
48
  [tool.ruff]
50
49
  line-length = 110
51
- target-version = "py39"
50
+ target-version = "py310"
52
51
 
53
52
  [tool.ruff.lint]
54
53
  select = []
@@ -8,7 +8,7 @@ import re
8
8
  import subprocess # nosec
9
9
  from pathlib import Path
10
10
  from re import Match, Pattern
11
- from typing import Any, Optional, TypedDict, cast, overload
11
+ from typing import Any, TypedDict, cast, overload
12
12
 
13
13
  import applications_download
14
14
  import githubkit
@@ -124,7 +124,7 @@ def get_config() -> tag_publish.configuration.Configuration:
124
124
  return config
125
125
 
126
126
 
127
- def get_value(matched: Optional[Match[str]], config: Optional[VersionTransform], value: str) -> str:
127
+ def get_value(matched: Match[str] | None, config: VersionTransform | None, value: str) -> str:
128
128
  """
129
129
  Get the final value.
130
130
 
@@ -176,7 +176,7 @@ def compile_re(config: tag_publish.configuration.Transform) -> list[VersionTrans
176
176
  def match(
177
177
  value: str,
178
178
  config: list[VersionTransform],
179
- ) -> tuple[Optional[Match[str]], Optional[VersionTransform], str]:
179
+ ) -> tuple[Match[str] | None, VersionTransform | None, str]:
180
180
  """
181
181
  Get the matched version.
182
182
 
@@ -204,7 +204,7 @@ def download_application(application_name: str, binary_filename: Path) -> Path:
204
204
  def download_application(application_name: str) -> None: ...
205
205
 
206
206
 
207
- def download_application(application_name: str, binary_filename: Optional[Path] = None) -> Optional[Path]:
207
+ def download_application(application_name: str, binary_filename: Path | None = None) -> Path | None:
208
208
  """Download the application if necessary, with the included version."""
209
209
  binary_full_filename = Path.home() / ".local" / "bin" / binary_filename if binary_filename else None
210
210
 
@@ -10,7 +10,7 @@ import subprocess # nosec
10
10
  import sys
11
11
  from pathlib import Path
12
12
  from re import Match
13
- from typing import Optional, cast
13
+ from typing import cast
14
14
 
15
15
  import security_md
16
16
  import yaml
@@ -22,7 +22,7 @@ import tag_publish.lib.oidc
22
22
  import tag_publish.publish
23
23
 
24
24
 
25
- def match(tpe: str, base_re: str) -> Optional[Match[str]]:
25
+ def match(tpe: str, base_re: str) -> Match[str] | None:
26
26
  """
27
27
  Return the match for `GITHUB_REF` basically like: `refs/<tpe>/<base_re>`.
28
28
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  import subprocess # nosec: B404
4
4
  from pathlib import Path
5
- from typing import Optional, cast
5
+ from typing import cast
6
6
 
7
7
  import yaml
8
8
  from debian_inspector.version import Version
@@ -10,8 +10,8 @@ from debian_inspector.version import Version
10
10
 
11
11
  def get_dpkg_packages_versions(
12
12
  image: str,
13
- default_distribution: Optional[str] = None,
14
- default_release: Optional[str] = None,
13
+ default_distribution: str | None = None,
14
+ default_release: str | None = None,
15
15
  ) -> tuple[bool, dict[str, Version]]:
16
16
  """
17
17
  Get the versions of the dpkg packages installed in the image.
@@ -84,7 +84,7 @@ def get_dpkg_packages_versions(
84
84
  f"The package {package} has different version "
85
85
  f"({package_version[package]} != {version})",
86
86
  )
87
- if package not in ("base-files",):
87
+ if package != "base-files":
88
88
  package_version[package] = version
89
89
  package = value
90
90
  version = None
@@ -110,8 +110,8 @@ def get_versions_config() -> tuple[dict[str, dict[str, str]], bool]:
110
110
  def check_versions(
111
111
  versions_config: dict[str, str],
112
112
  image: str,
113
- default_distribution: Optional[str] = None,
114
- default_release: Optional[str] = None,
113
+ default_distribution: str | None = None,
114
+ default_release: str | None = None,
115
115
  ) -> bool:
116
116
  """
117
117
  Check if the versions are correct.
@@ -7,7 +7,6 @@ import re
7
7
  import subprocess # nosec
8
8
  import sys
9
9
  from pathlib import Path
10
- from typing import Optional
11
10
 
12
11
  import ruamel
13
12
  import tomllib
@@ -175,7 +174,7 @@ def docker(
175
174
  tag_src: str,
176
175
  dst_tags: list[str],
177
176
  images_full: list[str],
178
- published: Optional[list[tag_publish.PublishedPayload]] = None,
177
+ published: list[tag_publish.PublishedPayload] | None = None,
179
178
  ) -> bool:
180
179
  """
181
180
  Publish to a Docker registry.