Skip to content

Commit befe33c

Browse files
chore(deps): update dependency python to 3.14 (#48)
* Update dependency python to 3.14 * - Change tox py env to 3 - Fixed ansible module run for newer ansible version * update sphinx * - Black formated - fixed python version for black and flake8 as 3.14 seems to be broken --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jindrich Luza <jluza@redhat.com>
1 parent 5cd384a commit befe33c

14 files changed

Lines changed: 79 additions & 125 deletions

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Python
1717
uses: actions/setup-python@v6
1818
with:
19-
python-version: 3.7
19+
python-version: 3.14
2020
- name: Install Tox
2121
run: pip install tox
2222
- name: Run Tox

.github/workflows/tox-tests.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Tox tests
33
on: [push, pull_request]
44

55
jobs:
6-
py39:
6+
py3:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v6
@@ -12,11 +12,11 @@ jobs:
1212
- name: Setup Python
1313
uses: actions/setup-python@v6
1414
with:
15-
python-version: 3.9
15+
python-version: 3.14
1616
- name: Install Tox
1717
run: pip install tox
1818
- name: Run Tox
19-
run: tox -e py39 -vv
19+
run: tox -e py314 -vv
2020
black:
2121
runs-on: ubuntu-latest
2222
steps:
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup Python
2727
uses: actions/setup-python@v6
2828
with:
29-
python-version: 3.9
29+
python-version: 3.14
3030
- name: Install Tox
3131
run: pip install tox
3232
- name: Run Tox
@@ -40,7 +40,7 @@ jobs:
4040
- name: Setup Python
4141
uses: actions/setup-python@v6
4242
with:
43-
python-version: 3.9
43+
python-version: 3.14
4444
- name: Install Tox
4545
run: pip install tox
4646
- name: Run Tox
@@ -54,7 +54,7 @@ jobs:
5454
- name: Setup Python
5555
uses: actions/setup-python@v6
5656
with:
57-
python-version: 3.9
57+
python-version: 3.14
5858
- name: Install Tox
5959
run: pip install tox
6060
- name: Run Tox
@@ -70,7 +70,7 @@ jobs:
7070
- name: Setup Python
7171
uses: actions/setup-python@v6
7272
with:
73-
python-version: 3.9
73+
python-version: 3.14
7474
- name: Install Tox
7575
run: pip install tox
7676
- name: Run Tox
@@ -84,11 +84,11 @@ jobs:
8484
- name: Setup Python
8585
uses: actions/setup-python@v6
8686
with:
87-
python-version: 3.9
87+
python-version: 3.14
8888
- name: Install Tox
8989
run: pip install tox
9090
- name: Run Tox
91-
run: tox -e py39
91+
run: tox -e py3
9292
- name: Upload coverage to Codecov
9393
uses: codecov/codecov-action@v5
9494
env:
@@ -105,7 +105,7 @@ jobs:
105105
- name: Setup Python
106106
uses: actions/setup-python@v6
107107
with:
108-
python-version: 3.9
108+
python-version: 3.14
109109
- name: Install Tox
110110
run: pip install tox
111111
- name: Run Tox

src/pubtools/sign/ansible/msg_clear_sign.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@
5959
# values.
6060
{0}
6161
{1}
62-
""".format(
63-
yaml.dump(MsgSignerResults.doc_arguments()), yaml.dump(ClearSignResult.doc_arguments())
64-
)
62+
""".format(yaml.dump(MsgSignerResults.doc_arguments()), yaml.dump(ClearSignResult.doc_arguments()))
6563

6664

6765
def run_module() -> None:

src/pubtools/sign/signers/cosignsigner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from ..utils import set_log_level, run_command, _get_config_file, run_in_parallel, FData
2323
from ..clients.registry import ContainerRegistryClient, AuthTokenWrapper
2424

25-
2625
LOG = logging.getLogger("pubtools.sign.signers.cosignsigner")
2726

2827

src/pubtools/sign/signers/msgsigner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
FData,
3535
)
3636

37-
3837
LOG = logging.getLogger("pubtools.sign.signers.msgsigner")
3938
LOG.setLevel(logging.INFO)
4039

tests/conftest.py

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838

3939
from pubtools.sign.clients.msg import _MsgClient
4040

41-
4241
LOG = logging.getLogger("pubtools.sign.signers.radas")
4342
LOG.addHandler(logging.StreamHandler(sys.stdout))
4443

@@ -258,8 +257,16 @@ def on_message(self, event):
258257
sender.send(reply)
259258

260259

261-
def run_broker(broker, stdout):
262-
sys.stdout = stdout
260+
def run_broker(port): # broker, stdout):
261+
broker = Container(_Broker(f"localhost:{port}"))
262+
# sys.stdout = stdout
263+
broker.run()
264+
return broker
265+
266+
267+
def run_broken_broker(port): # broker, stdout):
268+
broker = Container(_Broker(f"localhost:{port}"))
269+
# sys.stdout = stdout
263270
broker.run()
264271

265272

@@ -314,21 +321,19 @@ def f_find_available_port_for_broken():
314321
@fixture(scope="session")
315322
def f_qpid_broker(f_find_available_port):
316323
LOG.info("starting broker", f"localhost:{f_find_available_port}")
317-
broker = Container(_Broker(f"localhost:{f_find_available_port}"))
318-
p = Process(target=run_broker, args=(broker, sys.stdout))
324+
p = Process(target=run_broker, args=(f_find_available_port,))
319325
p.start()
320-
yield (broker, f_find_available_port)
326+
yield (f_find_available_port,)
321327
LOG.info("destroying qpid broker")
322328
p.terminate()
323329

324330

325331
@fixture(scope="session")
326332
def f_broken_qpid_broker(f_find_available_port_for_broken):
327333
LOG.debug("starting broker", f"localhost:{f_find_available_port_for_broken}")
328-
broker = Container(_BrokenBroker(f"localhost:{f_find_available_port_for_broken}"))
329-
p = Process(target=broker.run, args=())
334+
p = Process(target=run_broken_broker, args=())
330335
p.start()
331-
yield (broker, f_find_available_port_for_broken)
336+
yield (f_find_available_port_for_broken,)
332337
LOG.debug("destroying qpid broker")
333338
p.terminate()
334339

@@ -380,8 +385,7 @@ def f_fake_msgsigner_stray(
380385
@fixture
381386
def f_client_certificate():
382387
with tempfile.NamedTemporaryFile() as tmpf:
383-
tmpf.write(
384-
"""
388+
tmpf.write("""
385389
-----BEGIN PRIVATE KEY-----
386390
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC1y5rshMkYqfP2
387391
k7z2IJXto3AvLCAYDN9WX5mUUFgPFAFur38bDopqj5dSkXlR5f3MwZeRCNsxRXKD
@@ -432,19 +436,15 @@ def f_client_certificate():
432436
aoKJ9jBURYeYzd/Zi2RPLpjt8TYPir8vKQ==
433437
-----END CERTIFICATE-----
434438
435-
""".encode(
436-
"utf-8"
437-
)
438-
)
439+
""".encode("utf-8"))
439440
tmpf.flush()
440441
yield tmpf.name
441442

442443

443444
@fixture
444445
def f_ca_certificate():
445446
with tempfile.NamedTemporaryFile() as tmpf:
446-
tmpf.write(
447-
"""
447+
tmpf.write("""
448448
-----BEGIN CERTIFICATE-----
449449
MIIDtzCCAp+gAwIBAgIUATUd1WliG6ETZqKP8EZyijG9xUIwDQYJKoZIhvcNAQEL
450450
BQAwazELMAkGA1UEBhMCdVMxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEQMA4GA1UE
@@ -466,19 +466,15 @@ def f_ca_certificate():
466466
tcKssr4IEdgeVNco+UStQrrIrf+KoPN147fKzwkaUZKj3ybVExHnilr4D+HB94jL
467467
pH404Fud+v2NWjl7RSQnsMw+gCz6Sm3eU/aWC5L5ZOecawj01Qr60nv97eqc8tdG
468468
TrXd8yRh0cI5wL5KnO4hL/kYwOOaKsMwEkNlmL2Io7DrhVgJUAWycqfHfA==
469-
-----END CERTIFICATE-----""".encode(
470-
"utf-8"
471-
)
472-
)
469+
-----END CERTIFICATE-----""".encode("utf-8"))
473470
tmpf.flush()
474471
yield tmpf.name
475472

476473

477474
@fixture
478475
def f_config_msg_signer_missing():
479476
with tempfile.NamedTemporaryFile() as tmpf:
480-
tmpf.write(
481-
f"""
477+
tmpf.write(f"""
482478
msg_signer:
483479
messaging_brokers:
484480
- amqps://broker-01:5671
@@ -491,10 +487,7 @@ def f_config_msg_signer_missing():
491487
timeout: 1
492488
retries: 3
493489
message_id_key: request_id
494-
log_level: debug""".encode(
495-
"utf-8"
496-
)
497-
)
490+
log_level: debug""".encode("utf-8"))
498491
tmpf.flush()
499492
yield tmpf.name
500493

tests/conftest_cosignsig.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,54 +13,42 @@ def f_cosign_signer(f_config_msg_signer_ok):
1313
@fixture
1414
def f_config_cosign_signer_ok(f_client_certificate):
1515
with tempfile.NamedTemporaryFile() as tmpf:
16-
tmpf.write(
17-
"""
16+
tmpf.write("""
1817
cosign_signer:
1918
timeout: 30s
2019
rekor_url: https://rekor.sigstore.dev
2120
registry_user: some-user
2221
registry_password: some-password
2322
retries: 1
2423
log_level: debug
25-
""".encode(
26-
"utf-8"
27-
)
28-
)
24+
""".encode("utf-8"))
2925
tmpf.flush()
3026
yield tmpf.name
3127

3228

3329
@fixture
3430
def f_config_cosign_signer_aliases(f_client_certificate):
3531
with tempfile.NamedTemporaryFile() as tmpf:
36-
tmpf.write(
37-
"""
32+
tmpf.write("""
3833
cosign_signer:
3934
timeout: 30s
4035
rekor_url: https://rekor.sigstore.dev
4136
log_level: debug
4237
key_aliases:
4338
beta: abcde1245
44-
""".encode(
45-
"utf-8"
46-
)
47-
)
39+
""".encode("utf-8"))
4840
tmpf.flush()
4941
yield tmpf.name
5042

5143

5244
@fixture
5345
def f_config_cosign_signer_no_auth(f_client_certificate):
5446
with tempfile.NamedTemporaryFile() as tmpf:
55-
tmpf.write(
56-
"""
47+
tmpf.write("""
5748
cosign_signer:
5849
timeout: 30s
5950
rekor_url: https://rekor.sigstore.dev
6051
log_level: debug
61-
""".encode(
62-
"utf-8"
63-
)
64-
)
52+
""".encode("utf-8"))
6553
tmpf.flush()
6654
yield tmpf.name

0 commit comments

Comments
 (0)