Skip to content

Trove classifiers prefixed with "Private ::" fail poetry check #7167

@sethfischer

Description

@sethfischer
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the FAQ and general documentation and believe that my question is not already covered.

Feature Request

pypi.org recommends:

To prevent a package from being uploaded to PyPI, use the special "Private :: Do Not Upload" classifier. PyPI will always reject packages with classifiers beginning with "Private ::".

The same recommendation is also published on packaging.python.org.

When validating a pyproject.toml file with the following, poetry check will fail.

classifiers = [
    "Private :: Do not Upload",  # Prevent uploading to PyPI
]

Error message:

Error: Unrecognized classifiers: ['Private :: Do not Upload'].

This is correct behaviour for projects that are intended to be uploaded to PyPI.

However, there are projects that are not intended to be uploaded to PyPI and follow the above recommendation. How should those projects validate their pyproject.toml?

Suggestions

  1. Would it be reasonable to add an option such as --allow-private-classifiers to poetry check? This option could allow classifiers with the prefix "Private ::".
  2. See Implement private projects #1537 which discusses a number of alternatives to "Private :: Do not Upload". Possibly one of these alternatives could be used as a flag which, if present, adds the "Private :: Do not Upload" classifier to the built package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureFeature requests/implementationsstatus/triageThis issue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions