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

Update License Info with Well-known OSA MIT License Classifier #857

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

macserv
Copy link
Contributor

@macserv macserv commented Nov 7, 2024

I am currently unable to utilize basedpyright at my place of work because the (industry-standard) managed system we use to procure external code can not identify the license type.

This change replaces the current license property with the registered classifier for the MIT License, ensuring that it will be parsed properly by managed procurement tools like ours.

  • Update license data in pyproject.toml, replacing license property with classifiers, containing the License :: OSI Approved :: MIT License classifier, and Python version classifiers from 3.83.13.

Update license data in ``pyproject.toml``, replacing ``license`` property with a ``classifiers`` item for the OSA MIT license.
Copy link
Owner

@DetachHead DetachHead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@DetachHead DetachHead merged commit deab159 into DetachHead:main Nov 7, 2024
@macserv macserv deleted the feature/license-classifier branch November 8, 2024 14:58
@jorenham
Copy link
Contributor

jorenham commented Nov 13, 2024

There's also the license = {file = "LICENSE"} you could use in [project] btw
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license

@DetachHead
Copy link
Owner

If you are using a standard, well-known license, it is not necessary to use this field. Instead, you should use one of the classifiers starting with License ::. (As a general rule, it is a good idea to use a standard, well-known license, both to avoid confusion and because some organizations avoid software whose license is unapproved.)

i guess this means since we're using MIT the classifier is the way to go

@jorenham
Copy link
Contributor

jorenham commented Nov 13, 2024

I don't think they're mutually exclusive; I use both in my project (usually BSD though). Big guys like numpy also use both in that way: https://github.com/numpy/numpy/blob/060c28aa1920f0699ef7c3725e59dcd8e99723ca/pyproject.toml#L12-L42

@macserv
Copy link
Contributor Author

macserv commented Nov 13, 2024

The reason for the change was that the license property alone was insufficient to identify the license to my company's artifact procurement system.

I doubt having both in place would cause problems, but the documentation (which you linked) does state that you should use classifiers instead of license when possible:

If you are using a standard, well-known license, it is not necessary to use [the license] field. Instead, you should use one of the classifiers starting with License ::.

@njzjz
Copy link

njzjz commented Nov 13, 2024

Per PEP 639, both license = {file = "LICENSE"} and License :: OSI Approved :: MIT License are deprecated when PEP 639 is officially accepted. The new recommended configuration will be

[project]
license = "MIT"

@jorenham
Copy link
Contributor

image

@DetachHead
Copy link
Owner

thanks for the info guys, i think i'll just leave it as is for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants