# What changed in networkx

> 99 changes in networkx 3 from its official release notes, upgrade guides and advisories: 17 breaking, 3 deprecations, 32 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/pypi/networkx/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## networkx 3

### Breaking changes

- Removes deprecated could-be isomorphism aliases. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Raises an error when a negative cycle is found. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Decoders now reject out-of-range bytes. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Deprecated aliases for isomorphism checking are removed. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Now returns a set instead of a list. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Python 3.11 is dropped from supported versions. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- The random lobster dependency is expired. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- The map returned by vf2pp functions is reversed. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Raises ValueError for mixed typed attributes. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Its deprecation expires, so the deprecated API is removed. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Raises an error when called on directed graphs. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Removes the unused dissuade_hubs keyword argument. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Replaces maybe_regular_expander. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- This API is removed. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- The deprecated link keyword argument is removed from node-link functions. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Updates semantics for nonisomorphic trees with order 0 or 1. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Replaces random_lobster. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)

### Deprecations

- A proposal to deprecate this API is noted. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- The p2g module is deprecated. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- The function is deprecated. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)

### New APIs and options

- Adds a format parameter. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds Barber's bipartite modularity quality function. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds butterflies() to the bipartite cluster module. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Flow algorithms accept a callable capacity parameter. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds centroid as an alias for barycenter. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds an optional sp argument. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds DAG antichain width functionality. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Floyd-Warshall accepts a callable as the weight parameter. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds a nonedge argument to support completing the roundtrip. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds description and keywords support. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds Leiden-based community detection as an alternative to Louvain functions. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds Leiden-based community detection as an alternative to Louvain functions. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds magnetic_laplacian_matrix. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds a sample-count parameter for multi-sample averaging in rich_club_coefficient. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds a generator for a random k-lift of a d-regular graph. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds basic random walk utilities. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds Shen's overlapping modularity quality function. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- VF2++ adds subgraph isomorphism checking. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- VF2++ adds subgraph monomorphism checking. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Supports nodelists when creating a graph from a biadjacency matrix. (3.6.1) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6.1)
- Adds greedy bipartition using node swaps. (3.6.1) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6.1)
- Adds spectral bipartition community finding. (3.6.1) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6.1)
- Adds a generator yielding all unique triangles in a graph. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Adds a method providing basic information about graphs. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Adds a directed star graph generator. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Adds missing connection styles. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Adds a directed keyword argument. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Graph classes can be dispatched using a backend argument. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Adds the hyper_wiener_index function. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Adds is_perfect_graph using SPGT. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Adds panther++. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Implements an algorithm to find the centroid or centroids of a tree. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)

### Performance

- Uses linear algebra to compute communicability. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Fixes an accidentally quadratic use of a list as a queue. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Bidirectional Dijkstra is optimized, with reported speedups from 1.1x to 25x. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Optimizes harmonic centrality. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Optimizes is_reachable. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Short-circuits the check for directed graphs. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Dijkstra paths to a target are optimized, with graphs having multiple-hop shortest paths reported as about 50 times faster. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)

### Behavior and default changes

- Aligns the keys default with kruskal and prim. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Power iteration becomes the default HITS implementation. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Symmetry-aware isomorphism and subgraph checks now support directed and multigraphs, as well as non-induced subgraph monomorphism. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- A proposal suggests adding density to the defaults; the notes do not establish that it shipped. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds GEXF 1.3 to the recognized GEXF versions. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Adds support for directed graphs and multigraphs. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)

### Tooling

- The library is provided via pip with wheels that include GraphViz binaries, making the NetworkX interface easier to use for layout and rendering. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)

### Fixes and other changes

- Fixes ARF layout behavior with zero iterations. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Fixes edge cases for n < 2. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Fixes errors for null graphs. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Fixes handling of non-array complete initial positions. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Fixes incorrect values and path counting, adjustments for zero sigma, KeyErrors, and normalization when endpoints is true. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Handles small graphs. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Handles empty candidate sets. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Avoids infinite loops in Louvain. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Escapes quotes and backslashes in Pajek string output. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Fixes the cost function. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Fixes node connectivity and node cuts for directed graphs. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Handles insufficient degree Pearson samples. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Adds support for Python 3.15. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Preserves all attributes in dispatch conversions. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Fixes an AttributeError when calling next() directly. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Handles dim >= len(G). (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Fixes layouts with an empty list of fixed nodes. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Fixes spring energy layout behavior with zero iterations. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Preserves string positions when converting to a graphviz AGraph. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Fixes handling of isolated subgraph nodes. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Writes dynamic GEXF boolean attribute values using xsd:boolean true/false. (3.7) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.7)
- Fixes handling of a list for node_shape when drawing nodes. (3.6.1) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6.1)
- Allows graph subclasses to have additional arguments. (3.6.1) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6.1)
- Updates the computation to use k directly. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Backend names are validated as Python identifiers. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Pins the last value to 1.0 to address floating-point errors. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Adds a check for isolated nodes. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Makes the functions consistent with their definitions. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Fixes scaling when k is less than the number of nodes. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Allows graphs with nonstandard node labels. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Adds input validation and clarifies its behavior. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Fixes handling of self-loops. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
- Improves the error message for the removed function. (3.6) — [release notes](https://github.com/networkx/networkx/releases/tag/networkx-3.6)
