Fedora Account System
Red Hat Associate
Red Hat Customer
python-graphviz fails to build with pytest 8. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> import file mismatch: imported module 'conftest' has this __file__ attribute: /builddir/build/BUILD/graphviz-0.20.1/tests/backend/conftest.py which is not the same as the test file we want to collect: /builddir/build/BUILD/graphviz-0.20.1/tests/conftest.py HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> PDB post_mortem (IO-capturing turned off) >>>>>>>>>>>>>>>>>>> > /usr/lib/python3.12/site-packages/_pytest/python.py(531)importtestmodule() -> raise nodes.Collector.CollectError( (Pdb) collected 121 items <Dir graphviz-0.20.1> <DoctestTextfile README.rst> <DoctestItem README.rst> <Dir docs> <DoctestTextfile api.rst> <DoctestItem api.rst> <DoctestTextfile attributes.rst> <DoctestItem attributes.rst> <DoctestTextfile basic_usage.rst> <DoctestItem basic_usage.rst> <DoctestTextfile custom_dot.rst> <DoctestItem custom_dot.rst> <DoctestTextfile engines.rst> <DoctestItem engines.rst> <DoctestTextfile escapes.rst> <DoctestItem escapes.rst> <DoctestTextfile existing_files.rst> <DoctestItem existing_files.rst> <DoctestTextfile formats.rst> <DoctestItem formats.rst> <DoctestTextfile integration_with_viewers.rst> <DoctestItem integration_with_viewers.rst> <DoctestTextfile neato_no_op.rst> <DoctestItem neato_no_op.rst> <DoctestTextfile node_ports.rst> <DoctestItem node_ports.rst> <DoctestTextfile piped_output.rst> <DoctestItem piped_output.rst> <DoctestTextfile quoting.rst> <DoctestItem quoting.rst> <DoctestTextfile raw_dot.rst> <DoctestItem raw_dot.rst> <DoctestTextfile styling.rst> <DoctestItem styling.rst> <DoctestTextfile subgraphs_and_clusters.rst> <DoctestItem subgraphs_and_clusters.rst> <DoctestTextfile unflatten.rst> <DoctestItem unflatten.rst> <Package graphviz> <DoctestModule __init__.py> Assemble DOT source code and render it with Graphviz. Example: >>> import graphviz # doctest: +NO_EXE >>> dot = graphviz.Digraph(comment='The Round Table') >>> dot.node('A', 'King Arthur') >>> dot.node('B', 'Sir Bedevere the Wise') >>> dot.node('L', 'Sir Lancelot the Brave') >>> dot.edges(['AB', 'AL']) >>> dot.edge('B', 'L', constraint='false') >>> print(dot) #doctest: +NORMALIZE_WHITESPACE // The Round Table digraph { A [label="King Arthur"] B [label="Sir Bedevere the Wise"] L [label="Sir Lancelot the Brave"] A -> B A -> L B -> L [constraint=false] } <DoctestItem graphviz> <DoctestModule _tools.py> Generic re-useable self-contained helper functions. <DoctestItem graphviz._tools.attach> <DoctestItem graphviz._tools.mapping_items> <Package backend> <DoctestModule piping.py> Pipe bytes, strings, or string iterators through Graphviz ``dot``. <DoctestItem graphviz.backend.piping.pipe> <DoctestItem graphviz.backend.piping.pipe_lines> <DoctestItem graphviz.backend.piping.pipe_lines_string> <DoctestItem graphviz.backend.piping.pipe_string> <DoctestModule rendering.py> Render DOT source files with Graphviz ``dot``. <DoctestItem graphviz.backend.rendering.get_supported_formats> <DoctestItem graphviz.backend.rendering.get_supported_suffixes> <DoctestItem graphviz.backend.rendering.infer_format> <DoctestItem graphviz.backend.rendering.render> <DoctestModule upstream_version.py> Return the version number from running ``dot -V``. <DoctestItem graphviz.backend.upstream_version.version> <DoctestModule graphs.py> Assemble DOT source code objects. Example: >>> doctest_mark_exe() >>> import graphviz >>> dot = graphviz.Graph(comment='Mønti Pythøn ik den Hølie Grailen') >>> dot.node('Møøse') >>> dot.node('trained_by', 'trained by') >>> dot.node('tutte', 'TUTTE HERMSGERVORDENBROTBORDA') >>> dot.edge('Møøse', 'trained_by') >>> dot.edge('trained_by', 'tutte') >>> dot.node_attr['shape'] = 'rectangle' >>> print(dot.source) #doctest: +NORMALIZE_WHITESPACE // Mønti Pythøn ik den Hølie Grailen graph { node [shape=rectangle] "Møøse" trained_by [label="trained by"] tutte [label="TUTTE HERMSGERVORDENBROTBORDA"] "Møøse" -- trained_by trained_by -- tutte } >>> dot.render('doctest-output/m00se.gv').replace('\\', '/') 'doctest-output/m00se.gv.pdf' <DoctestItem graphviz.graphs> <DoctestModule jupyter_integration.py> Display rendered graph as SVG in Jupyter Notebooks and QtConsole. <DoctestItem graphviz.jupyter_integration.JupyterIntegration._repr_mimebundle_> <DoctestModule piping.py> Pipe DOT code objects through Graphviz ``dot``. <DoctestItem graphviz.piping.Pipe.pipe> <DoctestModule quoting.py> Quote strings to be valid DOT identifiers, assemble quoted attribute lists. <DoctestItem graphviz.quoting.a_list> <DoctestItem graphviz.quoting.attr_list> <DoctestItem graphviz.quoting.escape> <DoctestItem graphviz.quoting.nohtml> <DoctestItem graphviz.quoting.quote> <DoctestItem graphviz.quoting.quote_edge> <DoctestModule rendering.py> Save DOT code objects, render with Graphviz ``dot``, and open in viewer. <DoctestItem graphviz.rendering.Render.render> <Dir tests> <Dir backend> <Module test_execute.py> <Function test_missing_executable[render-args0]> <Function test_missing_executable[pipe-args1]> <Function test_missing_executable[unflatten-args2]> <Function test_missing_executable[version-args3]> <Function test_run_check_oserror> <Function test_run_check_called_process_error_mocked[quiet=False]> <Function test_run_check_called_process_error_mocked[quiet=True]> <Function test_run_check_input_lines_mocked> <Module test_piping.py> <Function test_pipe_invalid_data[quiet=False]> <Function test_pipe_invalid_data[quiet=True]> <Function test_pipe_pipe_invalid_data_mocked[quiet=False]> <Function test_pipe_pipe_invalid_data_mocked[quiet=True]> <Function test_pipe[dot-svg-None-None-(?s)^<\\?xml .+</svg>\\s*$]> <Function test_pipe[dot-ps-ps-core-%!PS-]> <Function test_pipe[sfdp-svg-None-None-(?s)^<\\?xml .+</svg>\\s*$]> <Function test_pipe_mocked[quiet=False]> <Function test_pipe_mocked[quiet=True]> <Function test_pipe_string_mocked[quiet=False]> <Function test_pipe_string_mocked[quiet=True]> <Function test_pipe_lines_mocked[quiet=False]> <Function test_pipe_lines_mocked[quiet=True]> <Function test_pipe_lines_string_mocked[quiet=False]> <Function test_pipe_lines_string_mocked[quiet=True]> <Module test_rendering.py> <Function test_render_missing_file[quiet=False]> <Function test_render_missing_file[quiet=True]> <Function test_render_unknown_parameter_raises[args0-ValueError-unknown engine]> <Function test_render_unknown_parameter_raises[args1-ValueError-unknown format]> <Function test_render_unknown_parameter_raises[args2-ValueError-unknown renderer]> <Function test_render_unknown_parameter_raises[args3-RequiredArgumentError-without renderer]> <Function test_render_unknown_parameter_raises[args4-ValueError-unknown formatter]> <Function test_render[dot-pdf-None-None-pdf]> <Function test_render[dot-plain-dot-core-core.dot.plain]> <Function test_render_img> <Function test_render_outfile_differnt_parent> <Function test_render_mocked[quiet=False-None]> <Function test_render_mocked[quiet=False-dot_sources]> <Function test_render_mocked[quiet=True-None]> <Function test_render_mocked[quiet=True-dot_sources]> <Function test_render_raises_mocked[args0-kwargs0-RequiredArgumentError-filepath: \\(required]> <Function test_render_raises_mocked[args1-kwargs1-RequiredArgumentError-filepath: \\(required]> <Function test_render_raises_mocked[args2-kwargs2-RequiredArgumentError-format: \\(required]> <Function test_render_raises_mocked[args3-kwargs3-RequiredArgumentError-filepath: \\(required]> <Function test_render_raises_mocked[args4-kwargs4-ValueError-outfile 'spam\\.gv' must be different from input file 'spam\\.gv']> <Function test_render_raises_mocked[args5-kwargs5-ValueError-overwrite_filepath cannot be combined with raise_if_result_exists]> <Function test_render_raises_mocked[args6-kwargs6-FileExistsError-output file exists: 'spam.png']> <Function test_get_outfile[spam.gv-kwargs0-spam.gv.pdf]> <Function test_get_outfile[spam.gv-kwargs1-spam.gv.dot.plain]> <Function test_get_filepath[spam.pdf-spam.gv]> <Function test_get_filepath[spam-spam.gv]> <Function test_get_format[spam.gv.pdf-None-pdf]> <Function test_get_format[spam.jpeg-None-jpeg]> <Function test_get_format[spam.SVG-None-svg]> <Function test_get_format[spam.pdf-None-pdf]> <Function test_get_format[spam.pdf-pdf-pdf]> <Function test_get_format_warns[spam.jpg-jpeg-jpeg-FormatSuffixMismatchWarning-expected format 'jpg' from outfile differs from given format: 'jpeg']> <Function test_get_format_warns[spam.dot-plain-plain-FormatSuffixMismatchWarning-expected format 'dot' from outfile differs from given format: 'plain']> <Function test_get_format_warns[spam-svg-svg-UnknownSuffixWarning-unknown outfile suffix '' \\(expected: '\\.svg'\\)]> <Function test_get_format_warns[spam.peng-png-png-UnknownSuffixWarning-unknown outfile suffix '.peng' \\(expected: '\\.png'\\)]> <Function test_get_format_warns[spam-pdf-pdf-UnknownSuffixWarning-unknown outfile suffix '' \\(expected: '\\.pdf'\\)]> <Function test_get_format_raises[spam-RequiredArgumentError-cannot infer rendering format from suffix '' of outfile: 'spam']> <Function test_get_format_raises[spam.peng-RequiredArgumentError-cannot infer rendering format from suffix '.peng' of outfile: 'spam.peng']> <Function test_get_format_raises[spam.wav-RequiredArgumentError-cannot infer rendering format from suffix '.wav' of outfile: 'spam.wav']> <Module test_unflattening.py> <Function test_unflatten_stagger_missing> <Function test_unflatten[digraph {1 -> 2; 1 -> 3; 1 -> 4}-kwargs0-digraph { 1 -> 2 [minlen=1]; 1 -> 3 [minlen=2]; 1 -> 4 [minlen=3]; }]> <Function test_unflatten_mocked> <Module test_upstream_version.py> <Function test_version> <Function test_version_mocked[dot - graphviz version 1.2.3 (mocked)-expected0]> <Function test_version_mocked[dot - graphviz version 2.43.20190912.0211 (20190912.0211)\n-expected1]> <Function test_version_mocked[dot - graphviz version 2.44.2~dev.20200927.0217 (20200927.0217)\n-expected2]> <Function test_version_mocked[dot - graphviz version 2.44.1 (mocked)\n-expected3]> <Function test_version_mocked[dot - graphviz version 2.44.2~dev.20200704.1652 (mocked)\n-expected4]> <Function test_version_parsefail_mocked> <Module test_viewing.py> <Function test_view_unknown_platform> <Function test_view_mocked[platform='darwin'-quiet=False]> <Function test_view_mocked[platform='darwin'-quiet=True]> <Function test_view_mocked[platform='freebsd'-quiet=False]> <Function test_view_mocked[platform='freebsd'-quiet=True]> <Function test_view_mocked[platform='linux'-quiet=False]> <Function test_view_mocked[platform='linux'-quiet=True]> <Function test_view_mocked[platform='windows'-quiet=False]> <Function test_view_mocked[platform='windows'-quiet=True]> !!!!!!!!!!!!!!!!!!! _pytest.outcomes.Exit: Quitting debugger !!!!!!!!!!!!!!!!!!! ========================= 121 tests collected in 0.32s ========================= https://docs.pytest.org/en/stable/changelog.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07248166-python-graphviz/ For all our attempts to build python-graphviz with pytest 8, see: https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/package/python-graphviz/ Let us know here if you have any questions. Pytest 8 is planned to be included in Fedora 41. And this bugzilla is a heads up before we merge new pytest into rawhide. For more info see a Fedora Change proposal https://fedoraproject.org/wiki/Changes/Pytest_8 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.
Upstream report: https://github.com/xflr6/graphviz/issues/219
https://src.fedoraproject.org/rpms/python-graphviz/pull-request/4
Workaround merged into rawhide.