IIUC PEP 345, the predecessor of PEP 426, replaced Requires with
Requires-Dist because the former was never very well specified, easier to
re-name the field rather than redefine it. bdist_wheel's egg-info
conversion assumes the only useful requirements are in the setuptools
requires.txt. It would make sense to go ahead and delete the obsolete
fields, I'm sure they were overlooked because they are not common in the
wild.

>From PEP 345:

   - Deprecated fields:
      - Requires (in favor of Requires-Dist)
      - Provides (in favor of Provides-Dist)
      - Obsoletes (in favor of Obsoletes-Dist)


On Wed, Feb 15, 2017 at 10:31 AM Vinay Sajip <vinay_sa...@yahoo.co.uk>
wrote:

> > the full METADATA format is documented in the pre-JSON revision of PEP
> 426.
>
> Can you confirm which exact revision in the PEPs repo you mean? I could
> guess at
> 0451397. That version does not refer to a field "Requires" (rather, the
> more recent
> "Requires-Dist"). Your conversion function reads the existing PKG-INFO,
> updates the
> Metadata-Version, and adds "Provides-Dist" and "Requires-Dist". It does
> not check
> whether the result conforms to that version of the PEP. For example, in
> the presence
> of "Requires" in PKG-INFO, you add "Requires-Dist", possibly leading to an
> ambiguity,
> because they sort of mean the same thing but could contain conflicting
> information
> (for example, different version constraints). The python-dateutils wheel
> which Jim
> referred to contained both "Requires" and "Requires-Dist" fields in its
> METADATA
> file, and, faced with a metadata set with both fields, the old packaging
> code used
> by distlib to handle the different metadata versions raised a "Unknown
> metadata set"
> error. In the face of ambiguity, it's refusing the temptation to guess :-)
>
> If the conversion function adds "Requires-Dist" but doesn't remove
> "Requires", I'm not
> sure it conforms to that version of the PEP.
>
> Regards,
>
> Vinay Sajip
>
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to