Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #690/781b9767 backport][3.12] Fix upload not supporting package metadata 2.3 #733

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/682.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed uploads not supporting packages using metadata spec 2.3
14 changes: 14 additions & 0 deletions pulp_python/tests/functional/api/test_crud_content_unit.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest

from urllib.parse import urljoin
from pypi_simple import PyPISimple

from pulpcore.tests.functional.utils import PulpTaskError
from pulp_python.tests.functional.constants import (
Expand Down Expand Up @@ -108,3 +109,16 @@ def test_content_crud(
monitor_task(response.task)
msg = "The uploaded artifact's sha256 checksum does not match the one provided"
assert msg in e.value.task.error["description"]


@pytest.mark.parallel
def test_upload_metadata_23_spec(python_content_factory):
"""Test that packages using metadata spec 2.3 can be uploaded to pulp."""
filename = "urllib3-2.2.2-py3-none-any.whl"
with PyPISimple() as client:
page = client.get_project_page("urllib3")
for package in page.packages:
if package.filename == filename:
content = python_content_factory(filename, url=package.url)
assert content.metadata_version == "2.3"
break
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pulpcore>=3.49.0,<3.70.0
pkginfo>=1.8.2,<1.9.7
pkginfo>=1.10.0,<1.12.0 # Twine has <1.11 in their requirements
bandersnatch>=6.1,<6.2
pypi-simple>=0.9.0,<1.0.0