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

license field in setup.cfg should not accept file: #1551

Closed
4 tasks done
pganssle opened this issue Oct 28, 2018 · 1 comment
Closed
4 tasks done

license field in setup.cfg should not accept file: #1551

pganssle opened this issue Oct 28, 2018 · 1 comment
Labels

Comments

@pganssle
Copy link
Member

pganssle commented Oct 28, 2018

As brought to my attention by this comment, it seems that in setup.cfg, license accepts a file:, and the docstring of _parse_file even mentions file: LICENSE. I think this was based on a misunderstanding of what the license file does, and I think will lead to problems with #1390 if actually used this way.

We should remove support for file: in the license field.

To do on this:

  • Remove file: support from the code. I'd start with just removing it and seeing what error is raised if you have file: in there, but if the error message is confusing, we need to add a "throw error if it's file:" parser.
  • Remove file: from the setup.cfg documentation.
  • Make sure there's a test using something like license: Apache 2.0
  • Add a test that license: file: throws an exception (Maybe?)
@pganssle pganssle added bug help wanted good first issue Needs Implementation Issues that are ready to be implemented. labels Oct 28, 2018
@RajdeepRao
Copy link
Contributor

I'd like to work on this as a part of the bloomberg pypa sprint

pganssle pushed a commit to RajdeepRao/setuptools that referenced this issue Dec 29, 2018
The ability to handle files was originally added and documented based on
a misunderstanding of what the `license` field should include. The field
should be the name of the license, not the full text.

It is likely that anyone actually using this was outputing malformed
PKG-INFO files, because most license files contain newlines.

See GH issue pypa#1551
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants