pubtools-pyxis 1.3.6__py2.py3-none-any.whl → 1.3.7__py2.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.
@@ -1,5 +1,6 @@
1
1
  import os
2
2
  import subprocess
3
+ from typing import Optional
3
4
 
4
5
  from requests_kerberos import HTTPKerberosAuth, OPTIONAL
5
6
 
@@ -50,7 +51,11 @@ class PyxisKrbAuth(PyxisAuth):
50
51
  """Kerberos authentication support for PyxisClient."""
51
52
 
52
53
  def __init__(
53
- self, krb_princ: str, service: str, ccache_file: str, ktfile: str | None = None
54
+ self,
55
+ krb_princ: str,
56
+ service: str,
57
+ ccache_file: str,
58
+ ktfile: Optional[str] = None,
54
59
  ) -> None:
55
60
  """
56
61
  Initialize.
@@ -3,7 +3,7 @@ from concurrent.futures import as_completed
3
3
  from functools import partial
4
4
  import math
5
5
  import threading
6
- from typing import Callable, Any
6
+ from typing import Callable, Any, Optional, Union
7
7
 
8
8
  from more_executors import Executors
9
9
  from requests.exceptions import HTTPError
@@ -21,7 +21,7 @@ class PyxisClient:
21
21
  self,
22
22
  hostname: str,
23
23
  retries: int = 5,
24
- auth: PyxisAuth | None = None,
24
+ auth: Optional[PyxisAuth] = None,
25
25
  backoff_factor: int = 5,
26
26
  verify: bool = True,
27
27
  threads: int = DEFAULT_REQUEST_THREADS_LIMIT,
@@ -55,7 +55,7 @@ class PyxisClient:
55
55
  self.threads_limit = threads
56
56
 
57
57
  @property
58
- def pyxis_session(self) -> PyxisSession | Any:
58
+ def pyxis_session(self) -> Union[PyxisSession, Any]:
59
59
  """
60
60
  Return a thread-local session for Pyxis requests.
61
61
 
@@ -73,8 +73,8 @@ class PyxisClient:
73
73
  return session
74
74
 
75
75
  def get_operator_indices(
76
- self, ocp_versions_range: str, organization: str | None = None
77
- ) -> list[str] | Any:
76
+ self, ocp_versions_range: str, organization: Optional[str] = None
77
+ ) -> Union[list[str], Any]:
78
78
  """Get a list of index images satisfying versioning and organization conditions.
79
79
 
80
80
  Args:
@@ -97,10 +97,10 @@ class PyxisClient:
97
97
  def get_repository_metadata(
98
98
  self,
99
99
  repo_name: str,
100
- custom_registry: str | None = None,
100
+ custom_registry: Optional[str] = None,
101
101
  only_internal: bool = False,
102
102
  only_partner: bool = False,
103
- ) -> dict[Any, Any] | Any:
103
+ ) -> Union[dict[Any, Any], Any]:
104
104
  """Get metadata of a Comet repository.
105
105
 
106
106
  If checking only one registry hasn't been specified, check both with precedence on
@@ -170,7 +170,7 @@ class PyxisClient:
170
170
 
171
171
  def _do_parallel_requests(
172
172
  self, make_request: Callable[[Any], Any], data_items: list[Any]
173
- ) -> list[Any] | Any:
173
+ ) -> Union[list[Any], Any]:
174
174
  """
175
175
  Call given function with given data items in parallel, collect responses.
176
176
 
@@ -199,7 +199,7 @@ class PyxisClient:
199
199
 
200
200
  return [f.result() for f in as_completed(futures)]
201
201
 
202
- def _handle_json_response(self, response: Response) -> dict[Any, Any] | Any:
202
+ def _handle_json_response(self, response: Response) -> Union[dict[Any, Any], Any]:
203
203
  """
204
204
  Get JSON from given response or raise an informative exception.
205
205
 
@@ -237,7 +237,7 @@ class PyxisClient:
237
237
  return data
238
238
 
239
239
  def get_container_signatures(
240
- self, manifest_digests: str | None = None, references: str | None = None
240
+ self, manifest_digests: Optional[str] = None, references: Optional[str] = None
241
241
  ) -> list[str]:
242
242
  """Get a list of signature metadata matching given fields.
243
243
 
@@ -2,7 +2,7 @@ import json
2
2
  import sys
3
3
  import tempfile
4
4
  from argparse import ArgumentParser, Namespace
5
- from typing import Any
5
+ from typing import Any, Optional, Union
6
6
 
7
7
  from .constants import DEFAULT_REQUEST_THREADS_LIMIT
8
8
  from .pyxis_authentication import PyxisKrbAuth, PyxisSSLAuth, PyxisAuth
@@ -163,7 +163,7 @@ def set_get_operator_indices_args() -> ArgumentParser:
163
163
  return setup_arg_parser(GET_OPERATORS_INDICES_ARGS)
164
164
 
165
165
 
166
- def _get_operator_indices(sysargs: list[str] | None = None) -> list[str] | Any:
166
+ def _get_operator_indices(sysargs: Optional[list[str]] = None) -> Union[list[str], Any]:
167
167
  """
168
168
  Entrypoint for getting operator indices.
169
169
 
@@ -184,7 +184,7 @@ def _get_operator_indices(sysargs: list[str] | None = None) -> list[str] | Any:
184
184
  return resp
185
185
 
186
186
 
187
- def get_operator_indices_main(sysargs: list[str] | None = None) -> int:
187
+ def get_operator_indices_main(sysargs: Optional[list[str]] = None) -> int:
188
188
  """
189
189
  Entrypoint for getting operator indices.
190
190
 
@@ -200,7 +200,9 @@ def get_operator_indices_main(sysargs: list[str] | None = None) -> int:
200
200
  return 1
201
201
 
202
202
 
203
- def get_operator_indices_mod(sysargs: list[str] | None = None) -> list[str] | Any:
203
+ def get_operator_indices_mod(
204
+ sysargs: Optional[list[str]] = None,
205
+ ) -> Union[list[str], Any]:
204
206
  """
205
207
  Entrypoint for getting operator indices in module mode.
206
208
 
@@ -215,7 +217,9 @@ def set_get_repo_metadata_args() -> ArgumentParser:
215
217
  return setup_arg_parser(GET_REPO_METADATA_ARGS)
216
218
 
217
219
 
218
- def _get_repo_metadata(sysargs: list[str] | None = None) -> dict[Any, Any] | Any:
220
+ def _get_repo_metadata(
221
+ sysargs: Optional[list[str]] = None,
222
+ ) -> Union[dict[Any, Any], Any]:
219
223
  """
220
224
  Entrypoint for getting repository metadata.
221
225
 
@@ -245,7 +249,9 @@ def _get_repo_metadata(sysargs: list[str] | None = None) -> dict[Any, Any] | Any
245
249
  return res
246
250
 
247
251
 
248
- def get_repo_metadata_main(sysargs: list[str] | None = None) -> dict[Any, Any] | Any:
252
+ def get_repo_metadata_main(
253
+ sysargs: Optional[list[str]] = None,
254
+ ) -> Union[dict[Any, Any], Any]:
249
255
  """
250
256
  Entrypoint for getting repository metadata.
251
257
 
@@ -261,7 +267,9 @@ def get_repo_metadata_main(sysargs: list[str] | None = None) -> dict[Any, Any] |
261
267
  return 1
262
268
 
263
269
 
264
- def get_repo_metadata_mod(sysargs: list[str] | None = None) -> dict[Any, Any] | Any:
270
+ def get_repo_metadata_mod(
271
+ sysargs: Optional[list[str]] = None,
272
+ ) -> Union[dict[Any, Any], Any]:
265
273
  """
266
274
  Entrypoint for getting repository metadata in module mode.
267
275
 
@@ -277,7 +285,7 @@ def set_upload_signatures_args() -> ArgumentParser:
277
285
  return setup_arg_parser(UPLOAD_SIGNATURES_ARGS)
278
286
 
279
287
 
280
- def _upload_signatures(sysargs: list[str] | None = None) -> list[Any]:
288
+ def _upload_signatures(sysargs: Optional[list[str]] = None) -> list[Any]:
281
289
  """
282
290
  Entrypoint for uploading signatures from JSON or a file.
283
291
 
@@ -298,7 +306,7 @@ def _upload_signatures(sysargs: list[str] | None = None) -> list[Any]:
298
306
  return resp
299
307
 
300
308
 
301
- def upload_signatures_main(sysargs: list[str] | None = None) -> int:
309
+ def upload_signatures_main(sysargs: Optional[list[str]] = None) -> int:
302
310
  """
303
311
  Entrypoint for uploading signatures from JSON or a file.
304
312
 
@@ -314,7 +322,7 @@ def upload_signatures_main(sysargs: list[str] | None = None) -> int:
314
322
  return 1
315
323
 
316
324
 
317
- def upload_signatures_mod(sysargs: list[str] | None = None) -> list[Any]:
325
+ def upload_signatures_mod(sysargs: Optional[list[str]] = None) -> list[Any]:
318
326
  """
319
327
  Entrypoint for uploading signatures from JSON or a file in module mode.
320
328
 
@@ -325,7 +333,9 @@ def upload_signatures_mod(sysargs: list[str] | None = None) -> list[Any]:
325
333
  # No return value, output is printed directly
326
334
 
327
335
 
328
- def deserialize_list_from_arg(value: str, csv_input: bool = False) -> list[Any] | Any:
336
+ def deserialize_list_from_arg(
337
+ value: str, csv_input: bool = False
338
+ ) -> Union[list[Any], Any]:
329
339
  """
330
340
  Conditionally load contents of a file if specified in argument value.
331
341
 
@@ -360,7 +370,7 @@ def set_get_signatures_args() -> ArgumentParser:
360
370
  return setup_arg_parser(GET_SIGNATURES_ARGS)
361
371
 
362
372
 
363
- def _get_signatures(sysargs: list[str] | None = None) -> list[str]:
373
+ def _get_signatures(sysargs: Optional[list[str]] = None) -> list[str]:
364
374
  """
365
375
  Entrypoint for getting container signature metadata.
366
376
 
@@ -393,7 +403,7 @@ def _get_signatures(sysargs: list[str] | None = None) -> list[str]:
393
403
  return res
394
404
 
395
405
 
396
- def get_signatures_main(sysargs: list[str] | None = None) -> int:
406
+ def get_signatures_main(sysargs: Optional[list[str]] = None) -> int:
397
407
  """
398
408
  Entrypoint for getting container signature metadata.
399
409
 
@@ -409,7 +419,7 @@ def get_signatures_main(sysargs: list[str] | None = None) -> int:
409
419
  return 1
410
420
 
411
421
 
412
- def get_signatures_mod(sysargs: list[str] | None = None) -> list[str]:
422
+ def get_signatures_mod(sysargs: Optional[list[str]] = None) -> list[str]:
413
423
  """
414
424
  Entrypoint for getting container signature metadata in module mode.
415
425
 
@@ -425,7 +435,7 @@ def set_delete_signatures_args() -> ArgumentParser:
425
435
  return setup_arg_parser(DELETE_SIGNATURES_ARGS)
426
436
 
427
437
 
428
- def _delete_signatures(sysargs: list[str] | None = None) -> None:
438
+ def _delete_signatures(sysargs: Optional[list[str]] = None) -> None:
429
439
  """
430
440
  Entrypoint for removing existing signatures.
431
441
 
@@ -446,7 +456,7 @@ def _delete_signatures(sysargs: list[str] | None = None) -> None:
446
456
  pyxis_client.delete_container_signatures(signature_ids)
447
457
 
448
458
 
449
- def delete_signatures_main(sysargs: list[str] | None = None) -> int:
459
+ def delete_signatures_main(sysargs: Optional[list[str]] = None) -> int:
450
460
  """
451
461
  Entrypoint for removing existing signatures.
452
462
 
@@ -461,7 +471,7 @@ def delete_signatures_main(sysargs: list[str] | None = None) -> int:
461
471
  return 1
462
472
 
463
473
 
464
- def delete_signatures_mod(sysargs: list[str] | None = None) -> None:
474
+ def delete_signatures_mod(sysargs: Optional[list[str]] = None) -> None:
465
475
  """
466
476
  Entrypoint for removing existing signatures in module mode.
467
477
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pubtools-pyxis
3
- Version: 1.3.6
3
+ Version: 1.3.7
4
4
  Summary: Pubtools-pyxis
5
5
  Home-page: https://github.com/release-engineering/pubtools-pyxis
6
6
  Author: Lubomir Gallovic
@@ -145,6 +145,11 @@ Get signatures:
145
145
  ChangeLog
146
146
  =========
147
147
 
148
+ 1.3.7 (2025-05-06)
149
+ ------------------
150
+
151
+ * python3.9 compatibility fixes
152
+
148
153
  1.3.6 (2025-03-06)
149
154
  ------------------
150
155
 
@@ -0,0 +1,13 @@
1
+ pubtools/_pyxis/__init__.py,sha256=ZnFi6YKGt05oNY8_T3YQ1TjRPB51KMAy2amP-slamN8,22
2
+ pubtools/_pyxis/constants.py,sha256=oIkf5gluf-vmpjVIHHvWqfoUOpOnuWx9obK3pkcsuCI,139
3
+ pubtools/_pyxis/pyxis_authentication.py,sha256=-WGX3c2Lo8x-YK68zXP8TrJ9IxF9LhUo0cVUyPHzlYc,3683
4
+ pubtools/_pyxis/pyxis_client.py,sha256=QhKHV0hWtuTDrquXahuxCxDY9DkCKcLIpU3uv_hui6A,11761
5
+ pubtools/_pyxis/pyxis_ops.py,sha256=0RzNygX9JXcoZE1dZoFEmSfsoIq5sqStuBKk2RF6J4c,15208
6
+ pubtools/_pyxis/pyxis_session.py,sha256=o2FvQ26TewuJhpESrRaYsMDpdAwfHAjTqaygJf5GmDI,3843
7
+ pubtools/_pyxis/utils.py,sha256=_suuI_EcWqlSjdPS56uzUd9HfEF7imFCXDaI8Qk1nxQ,1284
8
+ pubtools_pyxis-1.3.7.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
9
+ pubtools_pyxis-1.3.7.dist-info/METADATA,sha256=BB2601aKa_AiBKpQbhlwizeiDHDZQf-d252qqdC9lQg,5304
10
+ pubtools_pyxis-1.3.7.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
11
+ pubtools_pyxis-1.3.7.dist-info/entry_points.txt,sha256=ieho9QgtOLFUD8E5TNXQk5EP0lPLWxkWMWJOscNocto,860
12
+ pubtools_pyxis-1.3.7.dist-info/top_level.txt,sha256=OojGd4bFkXX5XG4HOnyDjk9j-gLOzB0AOBI8msYhmdY,9
13
+ pubtools_pyxis-1.3.7.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- pubtools/_pyxis/__init__.py,sha256=ZnFi6YKGt05oNY8_T3YQ1TjRPB51KMAy2amP-slamN8,22
2
- pubtools/_pyxis/constants.py,sha256=oIkf5gluf-vmpjVIHHvWqfoUOpOnuWx9obK3pkcsuCI,139
3
- pubtools/_pyxis/pyxis_authentication.py,sha256=1Lrdr-DmAJ9Aa-tdYtyrcc0ZA6aTsOZP5RMBeIZRnUs,3619
4
- pubtools/_pyxis/pyxis_client.py,sha256=Fov5Yr3L2EAm-vfKY1yosBr4xrJl2eo1SNYwUv-o6PU,11699
5
- pubtools/_pyxis/pyxis_ops.py,sha256=qAN74CD8k6Qg_7T8ztko1A-9_bCKVLQl1-JPcbTqVrY,15076
6
- pubtools/_pyxis/pyxis_session.py,sha256=o2FvQ26TewuJhpESrRaYsMDpdAwfHAjTqaygJf5GmDI,3843
7
- pubtools/_pyxis/utils.py,sha256=_suuI_EcWqlSjdPS56uzUd9HfEF7imFCXDaI8Qk1nxQ,1284
8
- pubtools_pyxis-1.3.6.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
9
- pubtools_pyxis-1.3.6.dist-info/METADATA,sha256=YOK-_IC7AC2XNwkyTH1rPjawuFDhEB7lZTelWz2UiSA,5232
10
- pubtools_pyxis-1.3.6.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
11
- pubtools_pyxis-1.3.6.dist-info/entry_points.txt,sha256=ieho9QgtOLFUD8E5TNXQk5EP0lPLWxkWMWJOscNocto,860
12
- pubtools_pyxis-1.3.6.dist-info/top_level.txt,sha256=OojGd4bFkXX5XG4HOnyDjk9j-gLOzB0AOBI8msYhmdY,9
13
- pubtools_pyxis-1.3.6.dist-info/RECORD,,