You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new field, Dynamic, will be added to the Core Metadata Specification. This field will be multiple use, and will be allowed to contain the name of another core metadata field.
I read this to mean that this can only contain the name of a core metadata field that is valid for the given metadata version, and shouldn't include deprecated fields. Since Requires was deprecated in 1.2 and Dynamic was added in 2.2, Requires should never be included as a Dynamic field.
Expected behavior
Setuptools should not write deprecated Core metadata fields to Dynamic.
How to Reproduce
This setup.py:
from setuptools import setup
setup(
name="test",
version="0.0.0",
requires=["foo"],
install_requires=["bar"],
)
Built with:
$ python -m build -w
Output
This results in the following METADATA file:
Metadata-Version: 2.2
Name: test
Version: 0.0.0
Requires: foo
Requires-Dist: bar
Dynamic: requires
Dynamic: requires-dist
The text was updated successfully, but these errors were encountered:
setuptools version
75.8.0
Python version
n/a
OS
n/a
Additional environment information
Ref: pypi/warehouse#17389
Description
Since #4698, setuptools will record the deprecated
Requires
field as aDynamic
field.PEP 643 says:
I read this to mean that this can only contain the name of a core metadata field that is valid for the given metadata version, and shouldn't include deprecated fields. Since
Requires
was deprecated in 1.2 andDynamic
was added in 2.2,Requires
should never be included as aDynamic
field.Expected behavior
Setuptools should not write deprecated Core metadata fields to
Dynamic
.How to Reproduce
This
setup.py
:Built with:
Output
This results in the following
METADATA
file:The text was updated successfully, but these errors were encountered: