Skip to content

Commit 1de1cd3

Browse files
committed
Revert "Store attestations for PEP740 (#16302)"
This reverts commit 5545884.
1 parent 00e222f commit 1de1cd3

File tree

19 files changed

+474
-1063
lines changed

19 files changed

+474
-1063
lines changed

requirements/main.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ redis>=2.8.0,<6.0.0
6262
rfc3986
6363
sentry-sdk
6464
setuptools
65-
sigstore~=3.2.0
66-
pypi-attestations==0.0.11
65+
sigstore~=3.0.0
66+
pypi-attestations==0.0.9
6767
sqlalchemy[asyncio]>=2.0,<3.0
6868
stdlib-list
6969
stripe

requirements/main.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -1770,9 +1770,9 @@ pyparsing==3.1.2 \
17701770
--hash=sha256:a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad \
17711771
--hash=sha256:f9db75911801ed778fe61bb643079ff86601aca99fcae6345aa67292038fb742
17721772
# via linehaul
1773-
pypi-attestations==0.0.11 \
1774-
--hash=sha256:b730e6b23874d94da0f3817b1f9dd3ecb6a80d685f62a18ad96e5b0396149ded \
1775-
--hash=sha256:e74329074f049568591e300373e12fcd46a35e21723110856546e33bf2949efa
1773+
pypi-attestations==0.0.9 \
1774+
--hash=sha256:3bfc07f64a8db0d6e2646720e70df7c7cb01a2936056c764a2cc3268969332f2 \
1775+
--hash=sha256:4b38cce5d221c8145cac255bfafe650ec0028d924d2b3572394df8ba8f07a609
17761776
# via -r requirements/main.in
17771777
pyqrcode==1.2.1 \
17781778
--hash=sha256:1b2812775fa6ff5c527977c4cd2ccb07051ca7d0bc0aecf937a43864abe5eff6 \
@@ -2079,9 +2079,9 @@ sentry-sdk==2.13.0 \
20792079
--hash=sha256:6beede8fc2ab4043da7f69d95534e320944690680dd9a963178a49de71d726c6 \
20802080
--hash=sha256:8d4a576f7a98eb2fdb40e13106e41f330e5c79d72a68be1316e7852cf4995260
20812081
# via -r requirements/main.in
2082-
sigstore==3.2.0 \
2083-
--hash=sha256:25c8a871a3a6adf959c0cde598ea8bef8794f1a29277d067111eb4ded4ba7f65 \
2084-
--hash=sha256:d18508f34febb7775065855e92557fa1c2c16580df88f8e8903b9514438bad44
2082+
sigstore==3.0.0 \
2083+
--hash=sha256:6cc7dc92607c2fd481aada0f3c79e710e4c6086e3beab50b07daa9a50a79d109 \
2084+
--hash=sha256:a6a9538a648e112a0c3d8092d3f73a351c7598164764f1e73a6b5ba406a3a0bd
20852085
# via
20862086
# -r requirements/main.in
20872087
# pypi-attestations

tests/common/db/attestation.py

-28
This file was deleted.

tests/common/db/packaging.py

-7
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
from warehouse.utils import readme
3535

3636
from .accounts import UserFactory
37-
from .attestation import AttestationFactory
3837
from .base import WarehouseFactory
3938
from .observations import ObserverFactory
4039

@@ -141,12 +140,6 @@ class Meta:
141140
)
142141
)
143142

144-
attestations = factory.RelatedFactoryList(
145-
AttestationFactory,
146-
factory_related_name="file",
147-
size=1,
148-
)
149-
150143

151144
class FileEventFactory(WarehouseFactory):
152145
class Meta:

tests/unit/api/test_simple.py

-25
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from pyramid.testing import DummyRequest
1919

2020
from warehouse.api import simple
21-
from warehouse.attestations import IIntegrityService
2221
from warehouse.packaging.utils import API_VERSION
2322

2423
from ...common.db.accounts import UserFactory
@@ -88,16 +87,6 @@ def test_selects(self, header, expected):
8887

8988

9089
class TestSimpleIndex:
91-
92-
@pytest.fixture
93-
def db_request(self, db_request):
94-
"""Override db_request to add the Release Verification service"""
95-
db_request.find_service = lambda svc, name=None, context=None: {
96-
IIntegrityService: pretend.stub(),
97-
}.get(svc)
98-
99-
return db_request
100-
10190
@pytest.mark.parametrize(
10291
("content_type", "renderer_override"),
10392
CONTENT_TYPE_PARAMS,
@@ -196,17 +185,6 @@ def test_quarantined_project_omitted_from_index(self, db_request):
196185

197186

198187
class TestSimpleDetail:
199-
@pytest.fixture
200-
def db_request(self, db_request):
201-
"""Override db_request to add the Release Verification service"""
202-
db_request.find_service = lambda svc, name=None, context=None: {
203-
IIntegrityService: pretend.stub(
204-
get_provenance_digest=lambda *args, **kwargs: None,
205-
),
206-
}.get(svc)
207-
208-
return db_request
209-
210188
def test_redirects(self, pyramid_request):
211189
project = pretend.stub(normalized_name="foo")
212190

@@ -308,7 +286,6 @@ def test_with_files_no_serial(self, db_request, content_type, renderer_override)
308286
"upload-time": f.upload_time.isoformat() + "Z",
309287
"data-dist-info-metadata": False,
310288
"core-metadata": False,
311-
"provenance": None,
312289
}
313290
for f in files
314291
],
@@ -357,7 +334,6 @@ def test_with_files_with_serial(self, db_request, content_type, renderer_overrid
357334
"upload-time": f.upload_time.isoformat() + "Z",
358335
"data-dist-info-metadata": False,
359336
"core-metadata": False,
360-
"provenance": None,
361337
}
362338
for f in files
363339
],
@@ -451,7 +427,6 @@ def test_with_files_with_version_multi_digit(
451427
if f.metadata_file_sha256_digest is not None
452428
else False
453429
),
454-
"provenance": None,
455430
}
456431
for f in files
457432
],

tests/unit/attestations/__init__.py

-11
This file was deleted.

0 commit comments

Comments
 (0)