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

PyPI: Very long license badge #8689

Closed
maximlt opened this issue Dec 6, 2022 · 2 comments · Fixed by #8690
Closed

PyPI: Very long license badge #8689

maximlt opened this issue Dec 6, 2022 · 2 comments · Fixed by #8690
Labels
bug Bugs in badges and the frontend service-badge New or updated service badge

Comments

@maximlt
Copy link

maximlt commented Dec 6, 2022

Are you experiencing an issue with...

shields.io

🐞 Description

Per PEP 621 a Python package can be distributed with a license metadata field set to either file: link_to_license_file or text: some_license_text.

Packages that set file instead of text can end up with very long content. This seems to be valid, as demonstrated by the long version content you can see on Bokeh's PyPI page, this project setting file indeed.

🔗 Link to the badge

This leads to a very long badge :)
https://img.shields.io/pypi/l/bokeh
image

💡 Possible Solution

Shouldn't the badges be built from the License classifier instead of the core license metadata?

@maximlt maximlt added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Dec 6, 2022
@chris48s
Copy link
Member

chris48s commented Dec 7, 2022

This is an amusing example :)

One issue here is that there is nothing in the JSON response from PyPI (e.g: https://pypi.org/pypi/bokeh/json ) that explicitly says whether the contents of license is file or text so we'll have to use some judgement. I'll get a PR up shortly..

@chris48s chris48s added bug Bugs in badges and the frontend service-badge New or updated service badge and removed question Support questions, usage questions, unconfirmed bugs, discussions, ideas labels Dec 7, 2022
@maximlt
Copy link
Author

maximlt commented Dec 9, 2022

For what it's worth this issue triggered a longer discussion on DPO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs in badges and the frontend service-badge New or updated service badge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants