pubtools-pyxis 1.3.6__py2.py3-none-any.whl → 1.3.8__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.
- pubtools/_pyxis/pyxis_authentication.py +6 -1
- pubtools/_pyxis/pyxis_client.py +10 -10
- pubtools/_pyxis/pyxis_ops.py +27 -18
- {pubtools_pyxis-1.3.6.dist-info → pubtools_pyxis-1.3.8.dist-info}/METADATA +12 -2
- pubtools_pyxis-1.3.8.dist-info/RECORD +13 -0
- {pubtools_pyxis-1.3.6.dist-info → pubtools_pyxis-1.3.8.dist-info}/WHEEL +1 -1
- pubtools_pyxis-1.3.6.dist-info/RECORD +0 -13
- {pubtools_pyxis-1.3.6.dist-info → pubtools_pyxis-1.3.8.dist-info}/entry_points.txt +0 -0
- {pubtools_pyxis-1.3.6.dist-info → pubtools_pyxis-1.3.8.dist-info}/licenses/LICENSE +0 -0
- {pubtools_pyxis-1.3.6.dist-info → pubtools_pyxis-1.3.8.dist-info}/top_level.txt +0 -0
|
@@ -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,
|
|
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.
|
pubtools/_pyxis/pyxis_client.py
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
77
|
-
) -> list[str]
|
|
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
|
|
100
|
+
custom_registry: Optional[str] = None,
|
|
101
101
|
only_internal: bool = False,
|
|
102
102
|
only_partner: bool = False,
|
|
103
|
-
) -> dict[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]
|
|
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]
|
|
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
|
|
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
|
|
pubtools/_pyxis/pyxis_ops.py
CHANGED
|
@@ -2,14 +2,13 @@ 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
|
|
9
9
|
from .pyxis_client import PyxisClient
|
|
10
10
|
from .utils import setup_arg_parser
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
CMD_ARGS = {
|
|
14
13
|
("--pyxis-server",): {
|
|
15
14
|
"help": "Pyxis service hostname",
|
|
@@ -163,7 +162,7 @@ def set_get_operator_indices_args() -> ArgumentParser:
|
|
|
163
162
|
return setup_arg_parser(GET_OPERATORS_INDICES_ARGS)
|
|
164
163
|
|
|
165
164
|
|
|
166
|
-
def _get_operator_indices(sysargs: list[str]
|
|
165
|
+
def _get_operator_indices(sysargs: Optional[list[str]] = None) -> Union[list[str], Any]:
|
|
167
166
|
"""
|
|
168
167
|
Entrypoint for getting operator indices.
|
|
169
168
|
|
|
@@ -184,7 +183,7 @@ def _get_operator_indices(sysargs: list[str] | None = None) -> list[str] | Any:
|
|
|
184
183
|
return resp
|
|
185
184
|
|
|
186
185
|
|
|
187
|
-
def get_operator_indices_main(sysargs: list[str]
|
|
186
|
+
def get_operator_indices_main(sysargs: Optional[list[str]] = None) -> int:
|
|
188
187
|
"""
|
|
189
188
|
Entrypoint for getting operator indices.
|
|
190
189
|
|
|
@@ -200,7 +199,9 @@ def get_operator_indices_main(sysargs: list[str] | None = None) -> int:
|
|
|
200
199
|
return 1
|
|
201
200
|
|
|
202
201
|
|
|
203
|
-
def get_operator_indices_mod(
|
|
202
|
+
def get_operator_indices_mod(
|
|
203
|
+
sysargs: Optional[list[str]] = None,
|
|
204
|
+
) -> Union[list[str], Any]:
|
|
204
205
|
"""
|
|
205
206
|
Entrypoint for getting operator indices in module mode.
|
|
206
207
|
|
|
@@ -215,7 +216,9 @@ def set_get_repo_metadata_args() -> ArgumentParser:
|
|
|
215
216
|
return setup_arg_parser(GET_REPO_METADATA_ARGS)
|
|
216
217
|
|
|
217
218
|
|
|
218
|
-
def _get_repo_metadata(
|
|
219
|
+
def _get_repo_metadata(
|
|
220
|
+
sysargs: Optional[list[str]] = None,
|
|
221
|
+
) -> Union[dict[Any, Any], Any]:
|
|
219
222
|
"""
|
|
220
223
|
Entrypoint for getting repository metadata.
|
|
221
224
|
|
|
@@ -245,7 +248,9 @@ def _get_repo_metadata(sysargs: list[str] | None = None) -> dict[Any, Any] | Any
|
|
|
245
248
|
return res
|
|
246
249
|
|
|
247
250
|
|
|
248
|
-
def get_repo_metadata_main(
|
|
251
|
+
def get_repo_metadata_main(
|
|
252
|
+
sysargs: Optional[list[str]] = None,
|
|
253
|
+
) -> Union[dict[Any, Any], Any]:
|
|
249
254
|
"""
|
|
250
255
|
Entrypoint for getting repository metadata.
|
|
251
256
|
|
|
@@ -261,7 +266,9 @@ def get_repo_metadata_main(sysargs: list[str] | None = None) -> dict[Any, Any] |
|
|
|
261
266
|
return 1
|
|
262
267
|
|
|
263
268
|
|
|
264
|
-
def get_repo_metadata_mod(
|
|
269
|
+
def get_repo_metadata_mod(
|
|
270
|
+
sysargs: Optional[list[str]] = None,
|
|
271
|
+
) -> Union[dict[Any, Any], Any]:
|
|
265
272
|
"""
|
|
266
273
|
Entrypoint for getting repository metadata in module mode.
|
|
267
274
|
|
|
@@ -277,7 +284,7 @@ def set_upload_signatures_args() -> ArgumentParser:
|
|
|
277
284
|
return setup_arg_parser(UPLOAD_SIGNATURES_ARGS)
|
|
278
285
|
|
|
279
286
|
|
|
280
|
-
def _upload_signatures(sysargs: list[str]
|
|
287
|
+
def _upload_signatures(sysargs: Optional[list[str]] = None) -> list[Any]:
|
|
281
288
|
"""
|
|
282
289
|
Entrypoint for uploading signatures from JSON or a file.
|
|
283
290
|
|
|
@@ -298,7 +305,7 @@ def _upload_signatures(sysargs: list[str] | None = None) -> list[Any]:
|
|
|
298
305
|
return resp
|
|
299
306
|
|
|
300
307
|
|
|
301
|
-
def upload_signatures_main(sysargs: list[str]
|
|
308
|
+
def upload_signatures_main(sysargs: Optional[list[str]] = None) -> int:
|
|
302
309
|
"""
|
|
303
310
|
Entrypoint for uploading signatures from JSON or a file.
|
|
304
311
|
|
|
@@ -314,7 +321,7 @@ def upload_signatures_main(sysargs: list[str] | None = None) -> int:
|
|
|
314
321
|
return 1
|
|
315
322
|
|
|
316
323
|
|
|
317
|
-
def upload_signatures_mod(sysargs: list[str]
|
|
324
|
+
def upload_signatures_mod(sysargs: Optional[list[str]] = None) -> list[Any]:
|
|
318
325
|
"""
|
|
319
326
|
Entrypoint for uploading signatures from JSON or a file in module mode.
|
|
320
327
|
|
|
@@ -325,7 +332,9 @@ def upload_signatures_mod(sysargs: list[str] | None = None) -> list[Any]:
|
|
|
325
332
|
# No return value, output is printed directly
|
|
326
333
|
|
|
327
334
|
|
|
328
|
-
def deserialize_list_from_arg(
|
|
335
|
+
def deserialize_list_from_arg(
|
|
336
|
+
value: str, csv_input: bool = False
|
|
337
|
+
) -> Union[list[Any], Any]:
|
|
329
338
|
"""
|
|
330
339
|
Conditionally load contents of a file if specified in argument value.
|
|
331
340
|
|
|
@@ -360,7 +369,7 @@ def set_get_signatures_args() -> ArgumentParser:
|
|
|
360
369
|
return setup_arg_parser(GET_SIGNATURES_ARGS)
|
|
361
370
|
|
|
362
371
|
|
|
363
|
-
def _get_signatures(sysargs: list[str]
|
|
372
|
+
def _get_signatures(sysargs: Optional[list[str]] = None) -> list[str]:
|
|
364
373
|
"""
|
|
365
374
|
Entrypoint for getting container signature metadata.
|
|
366
375
|
|
|
@@ -393,7 +402,7 @@ def _get_signatures(sysargs: list[str] | None = None) -> list[str]:
|
|
|
393
402
|
return res
|
|
394
403
|
|
|
395
404
|
|
|
396
|
-
def get_signatures_main(sysargs: list[str]
|
|
405
|
+
def get_signatures_main(sysargs: Optional[list[str]] = None) -> int:
|
|
397
406
|
"""
|
|
398
407
|
Entrypoint for getting container signature metadata.
|
|
399
408
|
|
|
@@ -409,7 +418,7 @@ def get_signatures_main(sysargs: list[str] | None = None) -> int:
|
|
|
409
418
|
return 1
|
|
410
419
|
|
|
411
420
|
|
|
412
|
-
def get_signatures_mod(sysargs: list[str]
|
|
421
|
+
def get_signatures_mod(sysargs: Optional[list[str]] = None) -> list[str]:
|
|
413
422
|
"""
|
|
414
423
|
Entrypoint for getting container signature metadata in module mode.
|
|
415
424
|
|
|
@@ -425,7 +434,7 @@ def set_delete_signatures_args() -> ArgumentParser:
|
|
|
425
434
|
return setup_arg_parser(DELETE_SIGNATURES_ARGS)
|
|
426
435
|
|
|
427
436
|
|
|
428
|
-
def _delete_signatures(sysargs: list[str]
|
|
437
|
+
def _delete_signatures(sysargs: Optional[list[str]] = None) -> None:
|
|
429
438
|
"""
|
|
430
439
|
Entrypoint for removing existing signatures.
|
|
431
440
|
|
|
@@ -446,7 +455,7 @@ def _delete_signatures(sysargs: list[str] | None = None) -> None:
|
|
|
446
455
|
pyxis_client.delete_container_signatures(signature_ids)
|
|
447
456
|
|
|
448
457
|
|
|
449
|
-
def delete_signatures_main(sysargs: list[str]
|
|
458
|
+
def delete_signatures_main(sysargs: Optional[list[str]] = None) -> int:
|
|
450
459
|
"""
|
|
451
460
|
Entrypoint for removing existing signatures.
|
|
452
461
|
|
|
@@ -461,7 +470,7 @@ def delete_signatures_main(sysargs: list[str] | None = None) -> int:
|
|
|
461
470
|
return 1
|
|
462
471
|
|
|
463
472
|
|
|
464
|
-
def delete_signatures_mod(sysargs: list[str]
|
|
473
|
+
def delete_signatures_mod(sysargs: Optional[list[str]] = None) -> None:
|
|
465
474
|
"""
|
|
466
475
|
Entrypoint for removing existing signatures in module mode.
|
|
467
476
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pubtools-pyxis
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.8
|
|
4
4
|
Summary: Pubtools-pyxis
|
|
5
5
|
Home-page: https://github.com/release-engineering/pubtools-pyxis
|
|
6
6
|
Author: Lubomir Gallovic
|
|
@@ -20,7 +20,6 @@ Requires-Dist: setuptools
|
|
|
20
20
|
Requires-Dist: more-executors>=2.3.0
|
|
21
21
|
Requires-Dist: requests
|
|
22
22
|
Requires-Dist: requests-kerberos
|
|
23
|
-
Requires-Dist: urllib3<2
|
|
24
23
|
Provides-Extra: rest
|
|
25
24
|
Requires-Dist: Sphinx; extra == "rest"
|
|
26
25
|
Dynamic: author
|
|
@@ -145,6 +144,17 @@ Get signatures:
|
|
|
145
144
|
ChangeLog
|
|
146
145
|
=========
|
|
147
146
|
|
|
147
|
+
1.3.8 (2026-02-05)
|
|
148
|
+
------------------
|
|
149
|
+
|
|
150
|
+
* Unpin unsafe urllib3 version
|
|
151
|
+
* Add Python 3.11 and 3.14 to CI
|
|
152
|
+
|
|
153
|
+
1.3.7 (2025-05-06)
|
|
154
|
+
------------------
|
|
155
|
+
|
|
156
|
+
* python3.9 compatibility fixes
|
|
157
|
+
|
|
148
158
|
1.3.6 (2025-03-06)
|
|
149
159
|
------------------
|
|
150
160
|
|
|
@@ -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=1lCXrfk-Alx20orN4gf4F4jq2iVtvt2qmIrGChfMYTE,15207
|
|
6
|
+
pubtools/_pyxis/pyxis_session.py,sha256=o2FvQ26TewuJhpESrRaYsMDpdAwfHAjTqaygJf5GmDI,3843
|
|
7
|
+
pubtools/_pyxis/utils.py,sha256=_suuI_EcWqlSjdPS56uzUd9HfEF7imFCXDaI8Qk1nxQ,1284
|
|
8
|
+
pubtools_pyxis-1.3.8.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
9
|
+
pubtools_pyxis-1.3.8.dist-info/METADATA,sha256=OTMpX-agxfqwojahV0hPkp1illxCSHKQ2jcJhL25Mv0,5383
|
|
10
|
+
pubtools_pyxis-1.3.8.dist-info/WHEEL,sha256=Mk1ST5gDzEO5il5kYREiBnzzM469m5sI8ESPl7TRhJY,110
|
|
11
|
+
pubtools_pyxis-1.3.8.dist-info/entry_points.txt,sha256=ieho9QgtOLFUD8E5TNXQk5EP0lPLWxkWMWJOscNocto,860
|
|
12
|
+
pubtools_pyxis-1.3.8.dist-info/top_level.txt,sha256=OojGd4bFkXX5XG4HOnyDjk9j-gLOzB0AOBI8msYhmdY,9
|
|
13
|
+
pubtools_pyxis-1.3.8.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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|