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

A better description for "Requires-Python" metadata field #1274

Merged
merged 5 commits into from Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 5 additions & 6 deletions source/specifications/core-metadata.rst
Expand Up @@ -551,18 +551,17 @@ Requires-Python
.. versionadded:: 1.2

This field specifies the Python version(s) that the distribution is
guaranteed to be compatible with. Installation tools may look at this when
compatible with. Installation tools may look at this when
wimglenn marked this conversation as resolved.
Show resolved Hide resolved
picking which version of a project to install.

The value must be in the format specified in :doc:`version-specifiers`.

This field cannot be followed by an environment marker.
For example, if a distribution uses :ref:`f-strings <whatsnew36-pep498>`
then it may prevent installation on Python < 3.6 by specifying::

Examples::
Requires-Python: >=3.6

Requires-Python: >=3
Requires-Python: >2.6,!=3.0.*,!=3.1.*
Requires-Python: ~=2.6
wimglenn marked this conversation as resolved.
Show resolved Hide resolved
This field cannot be followed by an environment marker.

wimglenn marked this conversation as resolved.
Show resolved Hide resolved
.. _core-metadata-requires-external:

Expand Down