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
pganssle opened this Issue Oct 28, 2018 · 1 comment

Comments

2 participants
@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?)
@RajdeepRao

This comment has been minimized.

Copy link
Contributor

RajdeepRao commented Oct 28, 2018

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

@pganssle pganssle moved this from Help Wanted to In progress in PyPA Sprint Weekend at Bloomberg (2018) Oct 28, 2018

@RajdeepRao RajdeepRao referenced this issue Dec 29, 2018

Merged

Disallow files for license inputs #1559

2 of 2 tasks complete

pganssle added a commit to RajdeepRao/setuptools that referenced this issue Dec 29, 2018

Disallow files for license inputs
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

PyPA Sprint Weekend at Bloomberg (2018) automation moved this from In progress to Closed Issues Dec 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment