forked from pydot/pydot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChangeLog
580 lines (431 loc) · 19.6 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# `pydot` changelog
Pydot versions since 1.4.2 adhere to [PEP 440-style semantic versioning]
(https://www.python.org/dev/peps/pep-0440/#semantic-versioning).
2.0.0 (unreleased)
------------------
Changed:
- Reorganized package/module structure. (#230)
The `pydot` package is installed as a directory now instead of as
two modules:
Before (pydot 0.x, 1.x) After (pydot 2.x)
site-packages/ site-packages/
|-- pydot.py `-- pydot/
`-- dot_parser.py |-- __init__.py
|-- core.py
|-- dot_parser.py
`-- exceptions.py
This is mostly an internal change that should go unnoticed by most
users, especially those upgrading through `pip` or a software
distribution. `import pydot` should work as it did before.
Special cases:
- `import dot_parser` no longer works. Change it to
`from pydot import dot_parser` or see if you can use the wrappers
`pydot.graph_from_dot_data()` or `pydot.graph_from_dot_file()`.
**USER FEEDBACK REQUESTED**
We assume pydot users do not often directly `import dot_parser`.
If you do, please report your reasons, so that we can consider
making it available again before the final release of pydot 2.0:
https://github.com/pydot/pydot/issues/230
- If you use pydot from a (cloned) pydot source tree:
- The pydot source modules moved from the top directory to
subdirectory `src/pydot/`.
- When using a `PYTHONPATH` environment variable: Append `/src`,
e.g. `PYTHONPATH=~/Development/pydot/src`. If you need to switch
between pydot 1.x and pydot 2.x, add both, e.g.
`PYTHONPATH=~/Development/pydot/src:~/Development/pydot`
- When using an editable install (development mode): Re-run
`pip install -e .` from the top directory of the source tree to
update the links.
- For users of the test suite:
- The test suite no longer refuses to run from the top of the
source tree.
- This makes the test suite option `--no-check` redundant. It has
no effect except for printing a deprecation warning. It will be
removed in a future major release (pydot 3 or higher), then
leading to an error.
- Reorganized exception hierarchy: (#230)
- New base class `PydotException`, derived from Python's `Exception`.
- Pydot's `Error` exception class is now derived from `PydotException`
instead of from Python's built-in `Exception` directly. Existing
handlers should not be affected.
- Exception class `InvocationException` was removed. It has not been
raised by pydot since 2016 (v1.2.0).
- API (minor): Renamed the first parameter of the parser functions
listed below from `str` to `s`. These functions primarily exist for
internal use and would normally be called using positional arguments,
so few users should be affected. (#229)
push_top_graph_stmt(s, loc, toks)
push_graph_stmt(s, loc, toks)
push_subgraph_stmt(s, loc, toks)
push_default_stmt(s, loc, toks)
push_attr_list(s, loc, toks)
push_edge_stmt(s, loc, toks)
Deprecated:
- Test suite option `--no-check`. See "Reorganized package/module
structure" above.
Removed:
- Drop support for Python 2 and Python 3.4. (#229)
**USER FEEDBACK REQUESTED**
We are considering if pydot 2.0 should drop support for Python 3.5
and 3.6 as well. If this would affect you, please leave a comment in
https://github.com/pydot/pydot/issues/268.
1.4.2 (2021-02-15)
------------------
Added:
- Documentation: Basic usage examples in `README.md`. (#141)
Changed:
- More detailed error message in case of Graphviz errors. (#239)
- More detailed warning message in case of failure to import the DOT
parser module. (#241)
Deprecated:
- A future pydot 2.0.0 will drop support for Python 2, 3.4 and
possibly other Python versions that are end-of-life at that time.
Pydot does not emit any deprecation warnings about this. Further
pydot 1.x.x releases are currently not foreseen, but if there are
any, should still support the mentioned Python versions. (#229)
Fixed:
- On Python 2, non-equality comparison (`!=`) between two separate, but
equal `Edge` instances will now correctly return `False`, as it
already did on Python 3. (#248)
- Prevent `TypeError` in handling of DOT parser error. (#176)
- Prevent `TypeError` in `graph_from_adjacency_matrix()` and
`graph_from_incidence_matrix()`. (#98)
- Prevent `TypeError` when creating an edge with a `Subgraph` or
`Cluster` object (as opposed to name string) as an edge point. (#89)
- Windows only: Fixed most failures to find Graphviz when a conda or
Anaconda installation exists, but Graphviz was installed manually or
through pip (`.bat`/`.exe` suffix problem). (#205)
- Windows only: Fixed failure to run Graphviz related to side-by-side
assembly (SxS) by now propagating the `SYSTEMROOT` environment
variable. (#208)
1.4.1 (2018-12-12)
------------------
- Make graph, edge, node attributes order deterministic
- Fix string formatting after catching error (#201)
1.4.0 (2018-12-01)
------------------
- Installation of pydot in conda env on Windows directly supported
- Fixed comparing of SHA hash in regression tests (which fail now)
1.3.0 (2018-11-19)
------------------
- Dropped Python 2.6 support (#185)
- Move errno from os to builtin. Fixes #177 (#191, #182)
1.2.4 (2017-12-25)
------------------
- ENH: propagate `LD_LIBRARY_PATH` when calling GraphViz
- API: raise `OSError` when a GraphViz executable is not found
- API: add method `__str__` to classes `Node, Edge, Graph`
- API: add arg `encoding` to `Dot` methods `create, write`
- API: quote cluster names when necessary
- API: give source and destination nodes as separate args to `Edge.__init__`
- API: never ignore `src, dst`, overwrite if `points` defined in `obj_dict`
1.2.3 (2016-10-06)
------------------
- support Python 2.6
- several corrections
- quote empty strings to avoid graphviz errors
1.2.0 (2016-07-01)
------------------
- support Python 3
- bumped dependency to `pyparsing >= 2.1.4`
- tests running on Travis CI
- tests require `chardet`
- detect character encoding for most test files
using the package `chardet`
API:
- on all operating systems, search GraphViz
executables in environment `$PATH`,
using `subprocess.Popen`.
No paths hard-coded due to security and privacy issues.
- add option to pass GraphViz executable name
or absolute path as `prog` to `pydot.Dot.write_*` methods.
This provides an alternative to
adding GraphViz to the `$PATH`.
- the functions:
- `pydot.graph_from_dot_data`
- `pydot.graph_from_dot_file`
- `dot_parser.parse_dot_data`
changed to always return a `list` of graphs,
instead of behaving differently for singletons.
- require that the user explicitly give an encoding to
the function `pydot.graph_from_dot_file`,
with default encoding same as `io.open`.
- decode to unicode at program boundaries, and
treat binary images as bytes,
for more compatibility with python 3.
Use `io.open`, instead of the built-in `open`.
- rm function `pydot.set_graphviz_executables`
- rm attribute `pydot.Dot.progs`
1.1.0 (2016-05-23)
------------------
- compatibility with `pyparsing >= 1.5.7`
API:
- `pydot.Graph.to_string`: hide `subgraph` keyword only if so requested
- produce `warnings.warn` if `pydot.dot_parser` fails to import,
instead of `print`
1.0.29 (2016-05-16)
-------------------
- Maintenance release that keeps the same API
- pin `pyparsing == 1.5.7`
- update version number in source code
- update `setup.py`
1.0.28 (2012-01-03)
-------------------
- Fixed issue 52. Improved handling of BOM-less UTF-8 encoded files.
- Fixed issue 55 regarding unicode handling.
- Fixed issue 50 where an ending colon in a node name was understood
as a port separator. Colons as the last character of node names will
be left as-is.
- Issue 59 (and duplicate issue 62): Program arguments are mishandled
in `Dot.create` - Patch merged.
- Fixed issue 49, handling of quotes in unicode html-labels.
- Fixed issue 60. Added an additional check in `__get_attribute__` to not
assume the parent graph is always retrievable.
- Fixed issue 61. Graph names will be adequately quoted when necessary.
1.0.25 (2011-04-10)
-------------------
- 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 (around 2011-03-03)
--------------------------
- 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 (2010-12-31)
------------------
- 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 (2010-11-02)
------------------
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 (2008-02-14)
------------------
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
pydot 1.0 . Handling graphs should be much faster, as no linear
searches are performed in pydot 1.0
0.9.10 (2004-12-21) and earlier
-------------------------------
2004-12-21 09:12 carrer
* dot_parser.py, pydot.py: Updated docstrings
2004-12-20 11:19 carrer
* dot_parser.py: Parsing of dot files greatly improved
2004-12-20 11:17 carrer
* pydot.py: Added new attributes introduced in Graphviz 1.16.
Added support to pickle graphs. Parsing of dot files greatly
improved. Bumped version to 0.9.10.
2004-12-14 07:48 carrer
* pydot.py: Improved the processing of the graph's default values
2004-10-11 21:10 carrer
* README:
Added list of required software to the README
2004-10-11 21:09 carrer
* MANIFEST, setup.py:
Added dot_parser module
2004-10-11 21:06 carrer
* dot_parser.py, pydot.py:
Thanks to a great contribution from Michael Krause, pydot is now
able to load DOT files. The loader has been tested against
plethora of test DOT files, and the results written to PS files,
which ended up being identical to the ones obtained straight from
running them through dot. Functions 'graph_from_dot_file' and
'graph_from_dot_data' have been added. This feature requires the
pyparsing module.
Note that if using pyparsing <1.2 the tabs in labels are
converted to whitespaces. 1.2 fixed that.
Adrian Heilbut noticed that there was no way of telling pydot to
create HTML labels. Starting from this version, if the label's
first character is '<' and last is '>', the label will be treated
as HTML. If this is not the desired behaviour it suffices with
adding a whitespace before the first '<' character or after the
last '>'.
Version bumped to 0.9.9
2004-10-11 21:02 carrer
* pydot.py:
Added check to add_node() avoid creating nodes with the same
names.
2004-10-11 20:59 carrer
* pydot.py:
When adding an edge through add_edge() the correspoding Node
objects were not being created. While the graph was correctly
displayed it was not possible to modify the node attributes, as
it did not exist. Thus now, everytime an edge is added, the
corresponding nodes are created if they did not previously exist.
2004-07-08 01:44 carrer
* pydot.py: Fixed bug reported by Hector Villafuerte.
2004-07-08 00:11 carrer
* pydot.py: Fixed bug reported by Colin Gillespie regarding the
problem creating clusters due to the 'simplify' attribute
missing.
2004-07-07 23:51 carrer
* pydot.py: Set default program with which to process the output
and added some minor enhacement enabling to pass non-str objects
as Node names, which will be converted to str by retrieving their
string representation with str()
2004-05-20 10:47 carrer
* pydot.py: Bumped version to 0.9.4
2004-05-20 10:41 carrer
* pydot.py: Minor bugfix
2004-05-03 23:45 carrer
* pydot.py: Merged fixes by Ramon Felciano: -Better handling of
default 'node' and 'edge' definitions. -Subgraph class now
accepts the same parametes as Graph.
2004-05-01 14:24 carrer
* README, setup.py: Changed license from GPL to MIT.
2004-05-01 14:00 carrer
* pydot.py: Minor bugfix. Added methods to retrieve an edge's
source and destination.
2004-05-01 13:49 carrer
* pydot.py: Minor bugfixes. License has been changed from GPL to
MIT. The following features have been implemented, as suggested
by Ramon Felciano: -Ability to retrieve nodes/subgraphs (by
name) and edges (by src+target) from a graph. -Ability to get
the graph's node/edge/subgraph lists. -Ability to get the
attributes from the objects, not only set them.
2004-05-01 13:34 carrer
* LICENSE: Changed license from GPL to MIT.
2004-04-28 21:52 carrer
* ChangeLog: [no log message]
2004-04-28 21:50 carrer
* pydot.py: Some of the changes already made should allow pydot to
run on OSX. Bumped version to 0.9.2
2004-04-24 17:52 carrer
* setup.py: Added more metainformation to the distribution.
2004-04-24 17:51 carrer
* pydot.py: Added support for circo and fdp. Fixed piping mechanism
to not to capture stderr.
2004-04-24 13:26 carrer
* ChangeLog, LICENSE, MANIFEST, README, setup.py: Adding
supplementary files to the distribution to the CVS.
2004-04-24 12:57 carrer
* pydot.py: Bumped version to 0.9.1
2004-04-24 01:36 carrer
* pydot.py: Implemented tweaks suggested by John B. Cole to handle
non-str nodes, converting them to strings.
2004-04-24 01:10 carrer
* pydot.py: Applied patch for Windows support by Kent Johnson.
2004-04-24 01:05 carrer
* pydot.py: Fixed to properly handle unicode strings in attributes.
2004-04-20 00:06 carrer
* pydot.py:
Fixed silly error in graph_from_edges. When pasting the function
into the code, the references to the pydot module were not
removed, which are no longer needed since we now are _in_ the
module.
2004-04-19 23:33 carrer
* pydot.py:
Added support to write files with the desired output format with
write_[format]
2004-04-19 22:53 carrer
* pydot.py:
Done some clean up, no major changes.
2004-04-08 00:22 carrer
* pydot.py:
Initial revision.
2004-04-08 00:22 carrer
* pydot.py: Initial revision