Skip to content

Commit 781b976

Browse files
gerrod3dralley
authored andcommitted
Fix upload not supporting package metadata 2.3
fixes: #682
1 parent a37d040 commit 781b976

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

CHANGES/682.bugfix

+1
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

+14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22

33
from urllib.parse import urljoin
4+
from pypi_simple import PyPISimple
45

56
from pulpcore.tests.functional.utils import PulpTaskError
67
from pulp_python.tests.functional.constants import (
@@ -108,3 +109,16 @@ def test_content_crud(
108109
monitor_task(response.task)
109110
msg = "The uploaded artifact's sha256 checksum does not match the one provided"
110111
assert msg in e.value.task.error["description"]
112+
113+
114+
@pytest.mark.parallel
115+
def test_upload_metadata_23_spec(python_content_factory):
116+
"""Test that packages using metadata spec 2.3 can be uploaded to pulp."""
117+
filename = "urllib3-2.2.2-py3-none-any.whl"
118+
with PyPISimple() as client:
119+
page = client.get_project_page("urllib3")
120+
for package in page.packages:
121+
if package.filename == filename:
122+
content = python_content_factory(filename, url=package.url)
123+
assert content.metadata_version == "2.3"
124+
break

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pulpcore>=3.49.0,<3.70.0
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)