Fedora Account System
Red Hat Associate
Red Hat Customer
python-readme-renderer fails to build with Python 3.15.0a3. _ test_cli_package[docutils-Docutils is a modular system for processing documentation] _ package = 'docutils' contains = 'Docutils is a modular system for processing documentation' @pytest.mark.parametrize("package, contains", [ ("readme_renderer", "Readme Renderer is a library that will safely render"), ("docutils", "Docutils is a modular system for processing documentation"), ]) def test_cli_package(package, contains): with mock.patch("builtins.print") as print_: > main(["-p", package]) tests/test_cli.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cli_args = ['-p', 'docutils'] def main(cli_args: Optional[List[str]] = None) -> None: parser = argparse.ArgumentParser( description="Renders a .md, .rst, or .txt README to HTML", ) parser.add_argument("-p", "--package", help="Get README from package metadata", action="store_true") parser.add_argument("-f", "--format", choices=["md", "rst", "txt"], help="README format (inferred from input file name or package)") parser.add_argument('input', help="Input README file or package name") parser.add_argument('-o', '--output', help="Output file (default: stdout)", default='-') args = parser.parse_args(cli_args) 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/ # Infer the format of the description from package metadata. if not content_format: content_type = message.get("Description-Content-Type", "text/x-rst") if content_type == "text/x-rst": content_format = "rst" elif content_type == "text/markdown": content_format = "md" elif content_type == "text/plain": content_format = "txt" else: raise ValueError(f"invalid content type {content_type} for package " "`long_description`") else: filename = pathlib.Path(args.input) content_format = content_format or filename.suffix.lstrip(".") with filename.open() as fp: source = fp.read() if content_format == "md": rendered = render_md(source, stream=sys.stderr) elif content_format == "rst": rendered = render_rst(source, stream=sys.stderr) elif content_format == "txt": rendered = render_txt(source, stream=sys.stderr) else: raise ValueError(f"invalid README format: {content_format} (expected `md`, " "`rst`, or `txt`)") if rendered is None: > sys.exit(1) E SystemExit: 1 readme_renderer/__main__.py:57: SystemExit ----------------------------- Captured stderr call ----------------------------- No content rendered from RST source. =========================== short test summary info ============================ 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] =================== 2 failed, 88 passed, 2 skipped in 0.34s ==================== https://docs.python.org/3.15/whatsnew/3.15.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/09935409-python-readme-renderer/ For all our attempts to build python-readme-renderer with Python 3.15, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/python-readme-renderer/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.15: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/ Let us know here if you have any questions. Python 3.15 is planned to be included in Fedora 45. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
*** Bug 2485951 has been marked as a duplicate of this bug. ***