pulp / pulp_python

A Pulp plugin to support Python packages
GNU General Public License v2.0
37 stars 76 forks source link

Support Metadata 2.3 | update version of pkginfo #682

Closed Derioss closed 3 months ago

Derioss commented 3 months ago

Several Python packages, such as urllib3-2.2.2-py3-none-any.whl, use metadata version 2.3. We cannot upload these packages to Pulp using the following command:

pulp content upload --file "urllib3-2.2.2-py3-none-any.whl" --relative-path "urllib3-2.2.2-py3-none-any.whl"

This attempt fails with the error:

failed: 'null value in column "version" of relation "python_pythonpackagecontent" violates not-null constraint
DETAIL: Failing row contains (01904e82-d1c0-7fa8-9fff-1df6899fceef, urllib3-2.2.2-py3-none-any.whl, bdist_wheel, , null, 2.3, , <h1 align="center"

After repacking urllib3-2.2.2-py3-none-any.whl with Metadata-Version: 2.1 or Metadata-Version: 2.2, the content uploads successfully.

The issue appears to be with the pkginfo library, which does not support metadata 2.3 (this support is only available from version 1.10.0 onwards)."