Skip to content

Commit 3649de9

Browse files
author
Kairo de Araujo
committed
Implement python-tuf 2.0.0
The introduction of python-tuf 2.0.0 adds the feature of Succinct Delegation Roles as part of TAP15 (https://github.com/theupdateframework/taps/blob/master/tap15.md) This feature reduces the number of lines as the Hash Bins become built-in on python-tuf. All unit tests updated. Signed-off-by: Kairo de Araujo <[email protected]>
1 parent f6c134b commit 3649de9

File tree

13 files changed

+584
-1319
lines changed

13 files changed

+584
-1319
lines changed

requirements/main.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ stdlib-list
6262
structlog
6363
transaction
6464
trove-classifiers
65-
tuf==1.1.0
65+
tuf==2.0.0
6666
typeguard
6767
webauthn>=1.0.0,<2.0.0
6868
whitenoise

requirements/main.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,10 +1168,6 @@ securesystemslib==0.22.0 \
11681168
# via
11691169
# -r requirements/main.in
11701170
# tuf
1171-
sentry-sdk==1.6.0 \
1172-
--hash=sha256:b82ad57306d5546713f15d5d70daea0408cf7f998c7566db16e0e6257e51e561 \
1173-
--hash=sha256:ddbd191b6f4e696b7845b4d87389898ae1207981faf114f968a57363aa6be03c
1174-
# via -r requirements/main.in
11751171
six==1.16.0 \
11761172
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
11771173
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
@@ -1270,9 +1266,9 @@ trove-classifiers==2022.8.7 \
12701266
--hash=sha256:10053f2df40092c2d65d750cf12fab6df28714e422114fed91465814939a3284 \
12711267
--hash=sha256:c0618efe27904e272de1212143c8554657eef8adcf9800f1d2a1cf7164cc185b
12721268
# via -r requirements/main.in
1273-
tuf==1.1.0 \
1274-
--hash=sha256:28cd35eafa5aa4223eba03a397d14acb57c522381180db9ff3b54477dcbe1b73 \
1275-
--hash=sha256:512a864789e291b5e8f5a5ace0e87b2d158303364a77ad6e53ffd042ba2b4933
1269+
tuf==2.0.0 \
1270+
--hash=sha256:1524b0fbd8504245f600f121daf86b8fdcb30df74410acc9655944c4868e461c \
1271+
--hash=sha256:76e7f2a7aced84466865fac2a7127b6085afae51d4328af896fb46f952dd3a53
12761272
# via -r requirements/main.in
12771273
typeguard==2.13.3 \
12781274
--hash=sha256:00edaa8da3a133674796cf5ea87d9f4b4c367d77476e185e80251cc13dfbb8c4 \

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
from warehouse.organizations import services as organization_services
5151
from warehouse.organizations.interfaces import IOrganizationService
5252
from warehouse.tuf.interfaces import IKeyService
53-
from warehouse.tuf.repository import MetadataRepository
53+
from warehouse.tuf.services import RepositoryService
5454

5555
from .common.db import Session
5656
from .common.db.accounts import EmailFactory, UserFactory
@@ -446,7 +446,7 @@ class FakeKeyBackend(IKeyService):
446446
"tuf.bin-n.expiry": 604800,
447447
}
448448

449-
tuf_repo = MetadataRepository(
449+
tuf_repo = RepositoryService(
450450
FakeStorageBackend, FakeKeyBackend, db_request.registry.settings
451451
)
452452
return tuf_repo

tests/unit/cli/test_tuf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,9 @@ def test_add_all_indexes_content_hash_none(self, cli, monkeypatch):
297297

298298
result = cli.invoke(add_all_indexes, obj=config)
299299

300-
assert result.exit_code == 0
300+
assert result.exit_code == 1
301301
assert config.task.calls == [
302302
pretend.call(_add_hashed_targets),
303-
pretend.call(_add_hashed_targets),
304303
]
305304
assert task.get_request.calls == [pretend.call()]
306305

tests/unit/tuf/test_hash_bins.py

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)