Package: src:python-readme-renderer
Version: 44.0-4
User: [email protected]
Usertags: python3.15
Tags: patch, ftbfs, forky, sid

Hi!

While rebuilding the python related packages against the Python 3.15rc1
version we found that python-readme-renderer fails to build from source
[1].
FAILED tests/test_cli.py::test_cli_package[readme_renderer-Readme
Renderer is a library that will safely render] FAILED
tests/test_cli.py::test_cli_package[docutils-Docutils is a modular
system for processing documentation]

The tests fail because there was a behavior change in importlib.metadata
when trying to access a directory without the metadata file [2]. I've
worked around this by checking the Description field first, as was
suggested in the upstream PR #361 [3].

I applied the fix in the sandbox [4] to be able to build the packages
that depend on python-readme-renderer, please consider applying the
patch to support the upcoming 3.15 version.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4434740/
[2]: https://docs.python.org/3.15/whatsnew/3.15.html#importlib-metadata
[3]: https://github.com/pypa/readme_renderer/pull/361
[4]: https://debusine.debian.net/debian/r-python-python3.15/

--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
Description: Read package description from Description header
 In Python 3.15, importlib.metadata moves the description from payload to the
 Description header.
Forwarded: not-needed
Index: python-readme-renderer/readme_renderer/__main__.py
===================================================================
--- python-readme-renderer.orig/readme_renderer/__main__.py
+++ python-readme-renderer/readme_renderer/__main__.py
@@ -24,7 +24,7 @@ def main(cli_args: Optional[List[str]] =
     content_format = args.format
     if args.package:
         message = metadata(args.input)
-        source = message.get_payload()  # type: ignore[attr-defined] # noqa: E501 https://peps.python.org/pep-0566/
+        source = message.get("Description") or message.get_payload()  # type: ignore[attr-defined] # noqa: E501 https://peps.python.org/pep-0566/
 
         # Infer the format of the description from package metadata.
         if not content_format:

Attachment: signature.asc
Description: PGP signature

Reply via email to