Graphviz v0.19 Release Notes

  • โž• Add PendingDeprecationWarning to calls using positional arguments ๐Ÿ—„ that will be deprecated in a later version. The future API will allow from one to three positional arguments depending on the method or function. Keyword-only arguments where not around when this library was created. โšก๏ธ This signals dependents and in general users to start updating ๐Ÿ“Œ or pinning to the wanted version (or range). Crucially, this helps new users with a safer API that allows to avoid some common mistakes. โœ… Warnings reported in tests.

    โž• Add keyword-only outfile argument to .render() and stand-alone graphviz.render(). ๐Ÿ‘ Allows to override the rendered output file name: .render(filename='spam.gv', outfile='spam.pdf') ๐Ÿ‘ Allows to derive the format and the filename from the rendered outfile name: .render(outfile='spam.svg') 0๏ธโƒฃ Tries to infer default format from the outfile suffix. You can override by setting format explicitly. โš  Warns with a graphviz.FormatSuffixMismatchWarning if there is a mismatch between given format and the inferred format from outfile suffix. โš  Warns with a graphviz.UnknownSuffixWarning if format is given and outfile uses a suffix ๐Ÿ‘ that cannot be mapped to a supported format.

    Add graphviz.set_jupyter_format() to set the output format ๐Ÿ‘‰ used by the Jupyter visualization of graphviz.Graph, graphviz.Digraph, ๐Ÿ‘ and graphviz.Source (supported formats: 'svg', 'png', 'jpeg'). Replace _repr_svg_() internally with _repr_mimebundle_(include, exclude) 0๏ธโƒฃ returning a mimebundle {'image/svg+xml', '<?xml version=...'} by default. โž• Adds support for IPython.display.display_png(). โž• Adds support for IPython.display.display_jpeg(). PR #150 <https://github.com/xflr6/graphviz/pull/150>_ Christoph Boeddeker.

    Add keyword-only raise_if_result_exists argument to .render() and stand-alone graphviz.render(). Raises graphviz.FileExistsError if the rendered file already exists.

    โž• Add support to for .render() and stand-alone .render() to overwrite the input source file with the rendered output when using the outfile keyword-only argument. This probably only makes sense for text-based Graphviz formats such as dot or plain. You need to specify overwrite_filepath=True to enable this.

    โž• Add graphviz.CalledProcessError derived from subprocess.CalledProcessError so users can choose either one in their excepts.

    โž• Add graphviz.FileExistsError derived from FileExistsError so users can choose either one in their excepts.

    โž• Add --only-exe flag to run-tests.py (overrides --skip-exe).

    โž• Add --no-open and --open flags to build-docs.py.

    โž• Add lint-code.py and use in build job.

    โœ… Increase doctest coverage.

    Extend type annotations. Accept path-like objects for filename, directory, and filepath.

    ๐Ÿ“š Extend and improve documentation.

    ๐Ÿ‘Œ Improve build tests.