Skip to content

Commit b90aa94

Browse files
authored
Merge pull request #724 from gerrod3/patchback/backports/3.11/781b9767dae34e8619e3831ff8ad07de1a6222ec/pr-690
Fix upload not supporting package metadata 2.3
2 parents ed49fb5 + 6eccadc commit b90aa94

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

CHANGES/682.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed uploads not supporting packages using metadata spec 2.3

pulp_python/tests/functional/api/test_crud_content_unit.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# coding=utf-8
22
"""Tests that perform actions over content unit."""
3+
import pytest
34
from pulp_smash.pulp3.bindings import delete_orphans, monitor_task, PulpTaskError
45

56
from pulp_python.tests.functional.utils import (
@@ -12,6 +13,7 @@
1213
from pulp_python.tests.functional.utils import set_up_module as setUpModule # noqa:F401
1314
from tempfile import NamedTemporaryFile
1415
from urllib.parse import urljoin
16+
from pypi_simple import PyPISimple
1517

1618
from pulp_smash.utils import http_get
1719
from pulp_python.tests.functional.constants import (
@@ -227,3 +229,16 @@ def check_package_data(self, content_unit, expected=PYTHON_PACKAGE_DATA):
227229
for k, v in expected.items():
228230
with self.subTest(key=k):
229231
self.assertEqual(content_unit[k], v)
232+
233+
234+
@pytest.mark.parallel
235+
def test_upload_metadata_23_spec(python_content_factory):
236+
"""Test that packages using metadata spec 2.3 can be uploaded to pulp."""
237+
filename = "urllib3-2.2.2-py3-none-any.whl"
238+
with PyPISimple() as client:
239+
page = client.get_project_page("urllib3")
240+
for package in page.packages:
241+
if package.filename == filename:
242+
content = python_content_factory(filename, url=package.url)
243+
assert content.metadata_version == "2.3"
244+
break

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pulpcore>=3.28,<3.55
2-
pkginfo>=1.8.2,<1.9.7
2+
pkginfo>=1.10.0,<1.12.0 # Twine has <1.11 in their requirements
33
bandersnatch>=6.1,<6.2
44
pypi-simple>=0.9.0,<1.0.0

0 commit comments

Comments
 (0)