pypa / twine

Utilities for interacting with PyPI

Home Page:https://twine.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twine check fails when there are github badges in readme file

kif opened this issue · comments

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

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

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

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.