Is there an existing issue for this?
What keywords did you use to search existing issues?
test_fails_rst_no_content
readme
What operating system are you using?
Linux
If you selected 'Other', describe your Operating System here
Gentoo Linux amd64
What version of Python are you running?
How did you install twine? Did you use your operating system's package manager or pip or something else?
git clone https://github.com/pypa/twine/
cd twine
tox -e py314
What version of twine do you have installed (include the complete output)
twine version 7.0.1.dev7+gf536ac5d0 (readme-renderer: 46.0, requests: 2.34.2, requests-toolbelt: 1.0.0, urllib3: 2.7.0, keyring:
25.7.0, rfc3986: 2.0.0, rich: 15.0.0, packaging: 26.3, id: 1.6.1)
Which package repository are you using?
n/a
Please describe the issue that you are experiencing
Looks like the tests regressed since the last CI run:
$ tox -e py314
.pkg: _optional_hooks> python /usr/lib/python3.15/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /usr/lib/python3.15/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_editable> python /usr/lib/python3.15/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /usr/lib/python3.15/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py314: install_package> python -I -m pip install --force-reinstall --no-deps /tmp/twine/.tox/.tmp/package/2/twine-7.0.1.dev7+gf536ac5d0.tar.gz
py314: commands[0]> python -m coverage run -m pytest
========================================================= test session starts =========================================================
platform linux -- Python 3.14.7, pytest-9.1.1, pluggy-1.6.0
cachedir: .tox/py314/.pytest_cache
rootdir: /tmp/twine
configfile: pytest.ini
plugins: socket-0.8.1
collected 225 items
tests/test_auth.py ............................ [ 12%]
tests/test_check.py .......F..... [ 18%]
tests/test_cli.py .. [ 19%]
tests/test_commands.py ...... [ 21%]
tests/test_main.py .... [ 23%]
tests/test_package.py ..................................... [ 40%]
tests/test_parse_config_encoding.py .. [ 40%]
tests/test_repository.py ........................ [ 51%]
tests/test_sdist.py ................. [ 59%]
tests/test_settings.py ................. [ 66%]
tests/test_upload.py .............................. [ 80%]
tests/test_utils.py ...................................... [ 96%]
tests/test_wheel.py ....... [100%]
============================================================== FAILURES ===============================================================
______________________________________________________ test_fails_rst_no_content ______________________________________________________
tmp_path = PosixPath('/tmp/pytest-of-mgorny/pytest-1/test_fails_rst_no_content0')
capsys = <_pytest.capture.CaptureFixture object at 0x7f6543b615b0>
caplog = <_pytest.logging.LogCaptureFixture object at 0x7f6542efe270>
def test_fails_rst_no_content(tmp_path, capsys, caplog):
sdist = build_sdist_with_metadata(
tmp_path,
"""\
Metadata-Version: 2.1
Name: test-package
Version: 1.2.3
Description-Content-Type: text/x-rst
test-package
============
""",
)
> assert check.check([sdist])
E AssertionError: assert False
E + where False = <function check at 0x7f6543ff4ca0>(['/tmp/pytest-of-mgorny/pytest-1/test_fails_rst_no_content0/test-1.2.3.tar.gz'])
E + where <function check at 0x7f6543ff4ca0> = check.check
tests/test_check.py:141: AssertionError
-------------------------------------------------------- Captured stdout call ---------------------------------------------------------
Checking /tmp/pytest-of-mgorny/pytest-1/test_fails_rst_no_content0/test-1.2.3.tar.gz: PASSED
======================================================= short test summary info =======================================================
FAILED tests/test_check.py::test_fails_rst_no_content - AssertionError: assert False
==================================================== 1 failed, 224 passed in 2.36s ====================================================
py314: exit 1 (3.31 seconds) /tmp/twine> python -m coverage run -m pytest pid=228338
py314: FAIL code 1 (6.99=setup[3.68]+cmd[3.31] seconds)
evaluation failed :( (7.21 seconds)
Please list the steps required to reproduce this behaviour
tox -e py314
Anything else you'd like to mention?
Looks like it's caused by readme-renderer 46.0. Downgrading to 45.0 makes the failures disappear.
Is there an existing issue for this?
What keywords did you use to search existing issues?
test_fails_rst_no_content
readme
What operating system are you using?
Linux
If you selected 'Other', describe your Operating System here
Gentoo Linux amd64
What version of Python are you running?
Python 3.14.7How did you install twine? Did you use your operating system's package manager or pip or something else?
What version of twine do you have installed (include the complete output)
Which package repository are you using?
n/a
Please describe the issue that you are experiencing
Looks like the tests regressed since the last CI run:
Please list the steps required to reproduce this behaviour
tox -e py314Anything else you'd like to mention?
Looks like it's caused by
readme-renderer 46.0. Downgrading to 45.0 makes the failures disappear.