Changelog History
Page 1
-
v0.20.2 Changes
๐ท Tag Python 3.11 support.
-
v0.20.1 Changes
๐ Fix documentation building: upgrade to Sphinx 5.0.
๐ Fix broken user guide links in API documentation.
-
v0.20 Changes
Add keyword-only
neato_no_op
argument to.render()
,.pipe()
, and stand-alonegraphviz.render()
andgraphviz.pipe()
.๐ When building a
Graph
orDigraph
, warn about an expected DOT syntax error in rendering when passing a string that ends with an odd number of backslashes (e.g. invaliddot.node('spam', label='\\')
instead of correct..., label=r'\\'
for a node labled as a backslash).๐ Increase visibility of
graphviz.escape()
in the documentation. -
v0.19.2 Changes
โฌ๏ธ Drop Python 3.6 support (end of life 23 Dec 2021).
Fix
ExecutableNotFound
andCalledProcessError
ingraphviz.__all__
.๐ Better document
0.18
change of behaviour for thebody
argument/attribute (lines need to include their final newline). -
v0.19.1 Changes
๐ Fix undecoded
CalledProcessError.stdout
and.stderr
when.pipe()
call with anencoding
different fromself.encoding
fails.๐ Fix missing project root
conftest.py
in source distribution.Extend
examples/graphviz-escapes.ipynb
.๐ Improve test coverage.
๐ Increase build scripts verbosity.
-
v0.19 Changes
โ 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.
-
v0.18.2 Changes
๐ Fix
filepath
fallback toname
ofGraph/Digraph
for โช when filepath is not present (restoregraphviz.Graph('spam').filename == 'spam.gv'
broken in 0.18).๐ Fix unintended API docs reference to internal
backend
name forDOT_BINARY
andUNFLATTEN_BINARY
. Moved to public API asgraphviz.DOT_BINARY
andgraphviz.UNFLATTEN_BINARY
.๐ Fix broken documentation links.
๐ Docs: re-render most SVGs and notebooks with upstream Graphviz 2.49.3.
-
v0.18.1 Changes
๐ Fix
TypeError: argument of type 'WindowsPath' is not iterable
๐ on Windows platform under Python 3.6 and 3.7 โช (work around https://bugs.python.org/issue41649).โก๏ธ Update outdated examples source links.
๐ Improve mode structure and separation of concerns.
๐ Improve test structure and coverage.
๐ Improve output of
try-examples.py
. โ Add exit status for CI. Disableview()
.โ Add
build-docs.py
script for development.โ Add
update-help.py
script for development. -
v0.18 Changes
๐ Change of beaviour: File endings are now normalized so that all DOT source outputs end with a final newline (Unix convention, simplifies concatenation). This includes DOT source files written by
.render()
,.view()
, or.save()
as well was.source
generated or loaded fromSource
(orSource.from_file()
).๐ Change of behaviour:
Source
instances created bySource.from_file()
no nonger write the content read into.source
back into the file. ๐ Use.save(skip_existing=False)
before calling.render()
or.view()
if you want to overwrite the file to produce the previous (less safe) behaviour.๐ Change of undocumented behaviour: When iterating over a
Graph
,Digraph
, orSource
instance, the yielded lines now include a final newline ('\n'
). This mimics iteration overfile
object lines in text mode.๐ Change of behaviour: When adding custom DOT statements using the
body
argument ofGraph
orDigraph
or appending to thebody
attribute of an instance, the lines now need to include their final newline ('\n'
).When passing invalid parameters such as unknown
engine
,format
, etc.,.render()
now raises early before writing the file. Call.save()
explicitly to produce the previous (less safe) behaviour.โ Add optional keyword-only
encoding
argument topipe()
. Returns the decoded stdout from the rendering process (e.g.format='svg'
). Delegates encoding/decoding tosubprocess
in the common case 0๏ธโฃ (input and output encoding are the same, e.g. defaultencoding='utf-8'
). ๐ Used by the Jupyter notebook integration.โ Add optional keyword-only
engine
argument to.pipe()
and.render()
.โ Add optional keyword-only
renderer
andformatter
arguments toGraph()
,Digraph()
,Source()
andSource.from_file()
0๏ธโฃ to set default renderers and formatters (similar toformat
). ๐ Used by.pipe()
,.render()
, and.view()
if not given as method-argument.Add
pipe_string()
,pipe_lines()
, andpipe_lines_string()
. Pipeinput_string
, returnstring
. Pipeinput_lines
incrementally, returnbytes
. Pipeinput_lines
incrementally, returnstring
.0๏ธโฃ Add
set_default_engine()
andset_default_format()
Add
DOT_BINARY
andUNFLATTEN_BINARY
.Restructure the internal class hierarchy using multiple-inheritance with cooperative
super()
calling:Graph
now inherits both fromDot
and fromRender
, and both of them inherit fromBase
which defines their common interface: Lines of DOT source code thatDot
generates (alsoSource
) and rendering iterates over. This might break some undocumented use of subclassing and require adatation (e.g. if the methods don't use cooperativesuper()
calling convention or if the MRO has conflicts, supposedly rare).๐ Improve test separation. Improve test coverage of running the tests with
--skip-exe
.โ Add
pytype
checking andflake8
to build workflow.Extend type annotations.
โ Add https://mybinder.org config with head development environment. โ Add launch badge to code repository.
๐ Improve documentation and examples.
โ Add development docs.
๐ Document release process.
-
v0.17 Changes
โฌ๏ธ Drop Python 2 support. Tag Python 3.10 support.
๐ท Migrate CI to GitHub actions. Add
pypy3
to matrix.โ Tests: implement
--skip-exe
via custompytest
marker.๐ Documentation: point Anaconda users to
conda-forge/python-graphviz
.๐ Move type hints from docstrings to type annotations. Improve doctests.
Examples: standardize import convention and modernize.
Re-render example notebooks with Graphviz 2.46.1.