Graph-theory

Latest version: v2023.7.8

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

Scan your dependencies

Page 1 of 3

2023.7.8

Bug fix for shortest path.

In 42 joshinils discovered that a call to shortest path with `0` as starting node, would result a call to `graph.edges(from_node=0)` which python interprets as `False` in the function selection in [`if from_node: ...`](https://github.com/root-11/graph-theory/blob/235c7e06b420bc2235ea7e8fbb13cedbcd5e9d82/graph/base.py#L268)

This bug is now solved with commit: [21e9d376](https://github.com/root-11/graph-theory/commit/21e9d376b824b5b2185e6a5cb803abeaf94dabe0).

There are no other changes.

2023.7.7

This is a maintenance release with bugfix for 41, where the variable `_edges` creates a key (which is default behaviour in `collections.defaultdict`). This causes the graph to grow and can cause divergence when attempting to compare two otherwise identical graphs.

2023.7.6

Bug fix release for `__eq__` with credit to sappique (bug 40).

Changes:
- [new tests](https://github.com/root-11/graph-theory/commit/5b52a0942c22b33b7eaabcf3ed5ab0ab18529533)
- [code changes](https://github.com/root-11/graph-theory/commit/5b52a0942c22b33b7eaabcf3ed5ab0ab18529533)

2023.7.5

Bug fix release for error when [detecting cycles](39) with credit to [Sappique](https://github.com/Sappique).

the method `g.has_cycle()` now uses topological sort instead of phaselines.

Changes:
- new test [1](https://github.com/root-11/graph-theory/commit/87e812907a0b602ec864b2f49e9f7fbbea5109a0)
- change: [2](https://github.com/root-11/graph-theory/commit/65ab8b5d5c5461671bb93dfd3df82fdc3e735731)

2023.7.4

matplotlib is no longer a requirement.
no api changes other wise.

2023.7.3

Patches a speed improvement for TSP.

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.