-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add license field support #78
Conversation
abc7eaf
to
dcb82ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took me a little while to get to this! I offered a bit of feedback, though none of the changes are strictly essential.
Oh I meant to reply about the formatting in the TOML output as well. It would definitely be nice if we could make it look like the Python packaging docs, but given that both forms are equivalent, I definitely don't see it as something particularly important. Maybe in the future if we find a way we can modify the code accordingly. (And if someone cares enough, they can make a manual edit to their |
58d1704
to
3806353
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got some stuff going on this weekend so I haven't gotten to leave a full review, but hopefully these comments help move things along 🙂
What's the timeline looking like for this? I think it's probably going to be the last thing blocking an initial release (or at least, among the things I added to the "initial release" milestone) |
Yeah, this has taken way longer than I wanted. Largely because I've been busy with work commitments before I went on leave. I'm now officially on leave until 2023-11-06 so I have some time now to clean things up. |
2fe6aef
to
13623e8
Compare
13623e8
to
56ec80e
Compare
LGTM now! Did you want to squash/reorganize the commits at all before this gets merged? (Just figured I'd ask because, you know, auto-merge is enabled and if I just click "approve" then it'll be too late to do any commit reorganization) |
I can squash it if you feel that'd be better… to be honest I find having the full commit history is useful when troubleshooting because tools like If you bundle multiple changes into a single commit, |
Oh for sure, I definitely agree in keeping things broken out for bisection and similar use cases. Sorry for the confusion: I didn't mean squashing everything together into a single commit, but I was thinking more like squashing some of the little commits that don't really stand on their own, like typo fixes or whatever, into the more standalone commits, just to reduce clutter in the commit history and maybe eliminate intermediate steps that don't compile when it makes sense to do so. In other words, I'm talking about an interactive rebase, not a squash-merge (which would be combining all the commits together into one). This is something I do routinely (although usually before pushing) so I do think it's a good idea, but it's not something import enough that I would try to insist on it. Totally up to you whether you want to do this or not. I will be happy to approve either way, I'm just making sure I don't take the option away. |
Nothing fancy, this text could be either a license expression (e.g. `MIT`, `GPLv2+`…) or a full-blown multi-line license string. We copy it verbatim with no interpretation.
- a simple one for the name of a license or a SPDR license expression - a more complex one that uses a real-world license (the Python software license v2) to ensure the text does not become mangled in the conversion.
…tests This is work in progress, as the underlying PEP has not yet been ratified and adopted. Once that is done, we'll re-visit these tests and amend as necessary.
Okay, did a final local test after a slight flattening of the commit history:
… took a bit longer than I was expecting. Hopefully CI won't take this long. |
56ec80e
to
8cfa924
Compare
Whoa, that is a looong time. It might be related to the distribution package testing, especially if it's the first time you're running those tests - it would have to download the source code for pytest and pytest-localserver. But still I wouldn't expect it to be that long (33 minutes!) unless you have a very slow internet connection or something like that. In any case, it looks like pre-merge tests in CI were still relatively quick in comparison. |
Yep, I think it is Internet connection related… 25Mbps down / 2Mbps up hybrid-fibre coax. The laptop here is no spring chicken, but it's not that slow. |
One gripe I have is that
tomlkit
makes a new section, rather than doing this as an inline table.So instead of this:
we get:
The latter may work better visually for multi-line licenses (the field can store a full custom license agreement if none of the "standard" ones suit), and should be equivalent in terms of TOML behaviour.
But it doesn't match the examples shown in Python packaging docs.
It's not obvious how I coax
tomlkit
to emit the other format.Reading the TOML spec, the two formats are seemingly identical in terms of the data represented, so I'll leave it as-is for now. Closes Issue #32.