Pydot

Latest version: v2.0.0

Safety actively analyzes 629908 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

1.0.25

-------------------

- Improved the message raised by `TypeErrors`.
- If arguments need to be specified for 'dot', 'neato' and rest of
graph layout engines they can now be passed to the `create()` and
`create_*()` family of functions. If a string is passed it's expected
to be simply the name of the program. If a list is passed it's
assumed to contain strings, the name of the layout engine as the
first element, followed by any optional arguments that will be later
appended to the command line.
- Improved parsing of DOT files where a subgraph was given inline as
the source or destination of an edge.

1.0.23

--------------------------

- Fixed Issue 46 and modified the version number to include the
subversion revision number, hence the small jump from 1.0.4 to 1.0.23
;-)

1.0.4

------------------

- Merged fixes by Nelson Elhage
- The "id_re_with_port" regex was too lax, and let through many
illegal strings just because they contained colons. Fix it to
require that both the ID and port component be independently safe.
- Even when the code detected that a string needed quoting, ", \n,
and \r were left alone inside the double quotes, which is illegal.
Replace them with appropriately escaped versions.
- We also add a test that pydot is correctly able to quote Python's
"string.printable" string, which exercises both of the above cases.
- Added testing script and test data
- Fixed issue 42. Graphviz's executable "sfdp" has been included in the
list of executables to search for and will now be found if available.
- Updated main docstring
- Fixed setup.py script to not include the dot-underscore files in OSX
(the resource fork) when building the tar.gz for distribution

1.0.3

------------------

The release 1.0.3 of **pydot** is mainly a maintenance release. It
badly needed some attention. Most of the open issues have been
addressed.

dot_parser.py:
- Improved the parsing of attributes with no explicit value but
implicit defaults
- Improved handling of subgraphs
- Improved handling of whitespace within HTML node names/labels

pydot.py:
- Updated Graph, Cluster, Subgraph, Node and Edge attributes to reflect
the latest GraphViz version (2.26.3)
- Improved the parsing of attributes with no explicit value but
implicit defaults
- Improved handling of boolean attributes
- Fixed issue 17, 12
- Fixed issues 19, 29, 35, 37 finding the Graphviz binary in Windows
- Added method del_node() to delete Nodes from the graph
- Added method del_edges() to delete Edges from the graph
- get_node() will now always return a list of nodes
- get_edge() will now always return a list of edges
- get_subgraph() will now always return a list of edges
- Other minor improvements

1.0.2

------------------

The release 1.0.2 of **pydot** boasts the following:

- The parser has been improved a lot. It passes all of GraphViz's
regression tests (which I consider quite an accomplishment seeing the
kind of crazy constructs on those )
- Different charsets should now be dealt with properly.
- The search of GraphViz's executables has been improved for all
platforms. On Windows, paths and registry keys are searched. On Unix
now it should exhibit the same behavior as the traditional shell path
search. (Thanks Andy Gimblett and many others)
- Double-quoted paths in Windows are nor properly handled. The
os.path.exists() check fails if a valid path is enclosed within
quotes.
- 'type' keyword has been changed everywhere to 'graph_type'
- Better handling of Node/Edge/Graph defaults. Added methods:
set_graph_defaults, set_node_defaults, set_edge_defaults,
get_graph_defaults, get_node_defaults, get_edge_defaults
- Now it's possible to use rank to lay out nodes at the same level

graph = pydot.Dot('graphname', graph_type='digraph')
subg = pydot.Subgraph('', rank='same')
subg.add_node(pydot.Node('a'))
graph.add_subgraph(subg)
subg.add_node(pydot.Node('b'))
subg.add_node(pydot.Node('c'))

- Multiple main graphs in a file are now supported, will be returned as
a list of graph instances
- Handling of shapefiles Dot().set_shape_files()
- Added method "add_style()" to the Node class to easily append styles
to a node
- Attribute lists updated to reflect the available ones in graphviz 2.16
- Added error reporting when rendering graphs with GraphViz
executables. There was an often reported problem where the output
graphs would have 0 size. In most cases this was due to Graphviz
missing a library for a format that pydot assumed to be there. Now
the error given by the executable will be reported instead of being
silently ignored (Thanks Jarno)
- Improved parsing of identifiers
- Added non-GraphViz attributes needed by dot2tex
- Jose Fonseca contributed a fix dealing with quoted strings the the
dot parsing module
- setup.py updated so that it's possible to install pydot through
Setuptools' easy_install
- Edge()'s can be created passing two Node objects as well as, the
previously supported, two strings with node names. Warning: when
passing two Node instances, the attributes won't be taken into
account. The edge will only read the Nodes' names to create an edge,
the Nodes must be separately added to the graph so all their
attributes are "remembered".
- Substituted all str()'s for unicode()'s
- It's possible now to manually specify the path to GraphViz's
executables in the case they can't be found automatically. The method
'set_graphviz_executables(paths)' will take a dictionary specifying
the location of the executables. Please refer to the documentation
for usage detailed information.
- And too many bugfixes to list...

**Performance:**

The new pydot stores graphs and their objects using a hierarchy of
nested dictionaries and lists. Graph, Node, Edge objects are mere
proxies to the data and are created on demand. So that now it's
possible to have a graph with a 1 million edges and there will not be a
single Edge instance (only if requested, then they will be created on
demand, mapping the data and providing with all the methods to act on
the data in the global dictionary).

Storing a graph with 1 million edges in pydot 1.0 has approximately the
same memory requirements (~813MiB) as dealing with one with only 40.000
edges in pydot 0.9 (~851MiB), the 40.000 edges graph needs ~35MiB in

1.0

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.