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-alonegraphviz.render()
. ๐ Allows to override the rendered output file name:.render(filename='spam.gv', outfile='spam.pdf')
๐ Allows to derive theformat
and thefilename
from the renderedoutfile
name:.render(outfile='spam.svg')
0๏ธโฃ Tries to infer defaultformat
from theoutfile
suffix. You can override by settingformat
explicitly. โ Warns with agraphviz.FormatSuffixMismatchWarning
if there is a mismatch between givenformat
and the inferred format fromoutfile
suffix. โ Warns with agraphviz.UnknownSuffixWarning
ifformat
is given andoutfile
uses a suffix ๐ that cannot be mapped to a supported format.Add
graphviz.set_jupyter_format()
to set the outputformat
๐ used by the Jupyter visualization ofgraphviz.Graph
,graphviz.Digraph
, ๐ andgraphviz.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 forIPython.display.display_png()
. โ Adds support forIPython.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-alonegraphviz.render()
. Raisesgraphviz.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 theoutfile
keyword-only argument. This probably only makes sense for text-based Graphviz formats such asdot
orplain
. You need to specifyoverwrite_filepath=True
to enable this.โ Add
graphviz.CalledProcessError
derived fromsubprocess.CalledProcessError
so users can choose either one in their excepts.โ Add
graphviz.FileExistsError
derived fromFileExistsError
so users can choose either one in their excepts.โ Add
--only-exe
flag torun-tests.py
(overrides--skip-exe
).โ Add
--no-open
and--open
flags tobuild-docs.py
.โ Add
lint-code.py
and use in build job.โ Increase doctest coverage.
Extend type annotations. Accept path-like objects for
filename
,directory
, andfilepath
.๐ Extend and improve documentation.
๐ Improve build tests.