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

Twine check fails when there are github badges in readme file #1102

Closed
1 task done
kif opened this issue May 6, 2024 · 3 comments
Closed
1 task done

Twine check fails when there are github badges in readme file #1102

kif opened this issue May 6, 2024 · 3 comments
Labels

Comments

@kif
Copy link

kif commented May 6, 2024

Is there an existing issue for this?

  • I have searched the existing issues (open and closed), and could not find an existing issue

What keywords did you use to search existing issues?

check url pillow readme long_description

What operating system are you using?

Linux

If you selected 'Other', describe your Operating System here

No response

What version of Python are you running?

3.12: systematic fails, 3.11 sometimes fails.

How did you install twine? Did you use your operating system's package manager or pip or something else?

pip install twine

What version of twine do you have installed (include the complete output)

(py312) kieffer@mac13:~/workspace/pyFAI$ python -m twine  --version
twine version 5.0.0 (importlib-metadata: 7.1.0, keyring: 25.2.0, pkginfo: 1.10.0, requests: 2.31.0, requests-toolbelt: 1.0.0,
urllib3: 2.2.1)
(py312) kieffer@mac13:~/workspace/pyFAI$ python -m twine check --strict dist/*
Checking dist/pyfai-2024.4.0a0.tar.gz: FAILED
ERROR    `long_description` has syntax errors in markup and would not be rendered on PyPI.                                       
         line 211: Warning: Cannot scale image!                                                                                  
           Could not get size from "https://readthedocs.org/projects/pyFAI/badge":                                               
           Requires Python Imaging Library.                                                                                      
           Reading external files disabled.

Which package repository are you using?

pypi.org

Please describe the issue that you are experiencing

twine check fails when there are badges in th readme file.
Apparently the bug comes from this badge:
https://github.com/silx-kit/pyFAI/actions/workflows/python-package.yml/badge.svg

Please list the steps required to reproduce this behaviour

  • pip install twine
  • python -m build -s
  • twine check dist/*

Anything else you'd like to mention?

Here is the issue of the project :
silx-kit/pyFAI#2157

@kif kif added the bug label May 6, 2024
@sigmavirus24
Copy link
Member

I believe this is an issue to report to https://github.com/pypa/readme_renderer

@sigmavirus24
Copy link
Member

Also based on the message, it seems to be an issue with the readthedocs badge, not the GitHub actions badge. But that also looks to be the only badge with a scale setting on it in restructured text. Without knowing why you have that or why that's a problem with readme-renderer on different versions of python, I can't really help here

@kif
Copy link
Author

kif commented May 7, 2024

Thanks for your input. Removing the reference to the scale allows to work-around this bug.
You are right, the issue is probably in the readme_renderer, project I was not aware about its existence.
Feel free to close the issue in twine.

speedyleion added a commit to speedyleion/sphinx-c-autodoc that referenced this issue Oct 16, 2024
Remove scale to fix readme, see pypa/twine#1102
speedyleion added a commit to speedyleion/sphinx-c-autodoc that referenced this issue Oct 16, 2024
remove image scale in readme, see Twine check fails when there are github badges in readme file pypa/twine#1102
use uv in release.yml
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