Skip to content

Allowed values for license #563

Closed
Closed
@erzoe

Description

@erzoe

OS version

Debian 11

Python version

Python 3.9.2

Pip version

pip 21.3.1

Guide link

https://packaging.python.org/en/latest/tutorials/packaging-projects/

Problem description

Trying to upload a package licensed under WTFPL to pypi with python3 -m twine upload dist/* I am getting the error message

Invalid value for classifiers. Error: Classifier 'License :: WTFPL' is not a valid classifier.

I have specified the license in setup.cfg as:

classifiers =
    Programming Language :: Python :: 3
    License :: WTFPL
    Operating System :: OS Independent

I have not seen any limitation for the allowed licenses on Packaging Python Projects and the setuptools help for the license field.
It does, of course, make a lot of sense to not allow any string to avoid different names for the same license but I am missing the information which values I can use.

I have somehow found this link which seems to provide the list I am searching for but it does not list the WTFPL. Is it a deliberate decision that some licenses are not allowed or has this license just never been considered? How should users deal with that if the license they want to use is not allowed?

Error message

Content received from server:
<html>
 <head>
  <title>400 Invalid value for classifiers. Error: Classifier 'License :: WTFPL' is not a valid classifier.</title>
 </head>
 <body>
  <h1>400 Invalid value for classifiers. Error: Classifier 'License :: WTFPL' is not a valid classifier.</h1>
  The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>
Invalid value for classifiers. Error: Classifier &#x27;License :: WTFPL&#x27; is not a valid classifier.


 </body>
</html>
HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
Invalid value for classifiers. Error: Classifier 'License :: WTFPL' is not a valid classifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions