Skip to content

[BUG] Making project-url as Dynamic causes PyPI to block the wheel starting from 75.8.0 #4801

@justinchuby

Description

@justinchuby

setuptools version

setuptools==75.8.0

Python version

Python 3.13

OS

Linux

Additional environment information

No response

Description

After upgrading to setuptools==75.8.0 in https://github.com/microsoft/onnxscript, the PKD-INFO generated became Metadata-Version: 2.2, with a new line Dynamic: project-url added to the metadata file. This causes PyPI to reject the wheel with message

packaging Dynamic: project-url' is invalid for 'requires-dist'

{"code":null,"details":{"errors:":"BadRequest, 'packaging Dynamic: project-url' is invalid for 'requires-dist'. See https://packaging.python.org/specifications/core-metadata for more information., {\"message\": \"The server could not comply with the request since it is either malformed or otherwise incorrect.\\n\\n\\n'packaging Dynamic: project-url' is invalid for 'requires-dist'. See https://packaging.python.org/specifications/core-metadata for more information.\\n\\n\", \"code\": \"400 'packaging Dynamic: project-url' is invalid for 'requires-dist'. See https://packaging.python.org/specifications/core-metadata for more information.\", \"title\": \"Bad Request\"}"},"innerError":null}

Expected behavior

I would expect the wheel to be valid for PyPI even when the project url is dynamic. The URLs field needs to be dynamic for us because we want to generate an url based on the git commit.

How to Reproduce

  1. git clone https://github.com/microsoft/onnxscript.git
  2. python -m build

Output

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs ReproIssues that need a reproducible example.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions