NetworkX v3.6.1 Release Notes

Release Date: 2025-12-08 // 6 months ago
  • networkx 3.6.1

    🚀 We're happy to announce the release of networkx 3.6.1!

    API Changes

    • ➕ Add spectral bipartition community finding and greedy bipartition using node swaps (#8347).

    ✨ Enhancements

    • Nodelists for from_biadjacency_matrix (#7993).
    • ➕ Add spectral bipartition community finding and greedy bipartition using node swaps (#8347).
    • Fix draw_networkx_nodes with list node_shape and add regression test (#8363).

    🐛 Bug Fixes

    • 🛠 Fix: allow graph subclasses to have additional arguments (#8369).

    📚 Documentation

    • DOC: Improve benchmarking readme (#8358).
    • 🚀 DOC: More details re: RC releases in the release process devdocs (#8346).
    • DOC: clarify difference between G.nodes/G.nodes() and G.edges/G.edges() in tutorial (#8300).
    • ✅ DOC: Add blurb to contributor guide about drawing tests (#8370).
    • 📄 DOC: Fix underline lens in docstrings (#8371).
    • ✅ Rolling back shortest paths links (#8373).

    🚧 Maintenance

    • MAINT: Replace string literal with comment (#8359).
    • ⬆️ Bump actions/checkout from 5 to 6 in the actions group (#8360).
    • 📌 pin python 3.14 to be version 3.14.0 until dataclasses are fixed (#8365).
    • Blocklist Python 3.14.1 (#8372).

    Other

    • ✅ TST: add tests for unsupported graph types in MST algorithms (#8353).
    • ✅ TST: clean up isomorphism tests (#8364).

    Contributors

    🚀 10 authors added to this release (alphabetically):

    🚀 9 reviewers added to this release (alphabetically):

    These lists are automatically generated, and may not be complete or may contain
    duplicates.


Previous changes from v3.6

  • networkx 3.6

    🚀 We're happy to announce the release of networkx 3.6!

    🆕 New Features

    • ENH: add normalize option for subgraph_centrality and its _exp version (#8340).

    API Changes

    • Replace random_lobster with random_lobster_graph (#8067).
    • Replace maybe_regular_expander with maybe_regular_expander_graph (#8050).
    • Rm networkx.algorithms.threshold.swap_d (#8213).
    • Expire deprecation of compute_v_structures (#8281).
    • Rm unused dissuade_hubs kwarg from forceatlas2 (#8293).
    • 🗄 Expire deprecation of link kwarg in node_link fns (#8282).
    • 🗄 DEP: Deprecate metric_closure (#8304).

    ✨ Enhancements

    • 👌 Improve error message for removed random_tree function (#8105).
    • ⚡️ Update approx current_flow betweenness to use k directly (#8007).
    • ⚡️ Proposal: update semantics for nonisomorphic trees with order 0 or 1 (#8083).
    • SCC benchmarks and use of G._adj in Tarjan algorithm (#8064).
    • 🐎 Performance improvement and tests for edges_equal (#8077).
    • optimise is_reachable() (#8112).
    • Optimise harmonic centrality (#8158).
    • feat(drawing): add missing connection styles in draw_networkx_edge_labels and display (#8108).
    • ⚡️ Optimizing Dijkstra's paths to target (~50x faster for graphs with multiple-hops shortest path) (#8023).
    • ➕ Add all_triangles generator yielding all unique triangles in a graph (#8135).
    • 🔨 refactor: simplify k_factor (#8139).
    • feat: add directed star graph (#8151).
    • Faster intersection_array computation for checking distance-regularity (#7181).
    • enh: short-circuit in is_regular for directed graphs (#8138).
    • Avoid re-exploring nodes in Kosaraju's SCC algorithm (#8056).
    • ✅ trust rank implementation and testing (#8165).
    • Add hyper_wiener_index function (#8184).
    • Bidirectional dijkstra optimization: from 1.1x to 25x faster (#8206).
    • Implement the algorithm to find the centroid(s) of a tree (#8089).
    • Set length threshold in FR and use np.clip (#8145).
    • ➕ Add panther++ (#4400).
    • maint: use nx.circulant_graph to generate Harary graphs (#8189).
    • ENH: add directed kwarg to edges_equal (#8192).
    • ⚡️ Optimizing Dijkstra's path construction for all targets case (#8218).
    • 🔨 ENH: adds ISMAGS support for directed and multigraph with tests and refactor (#8274).
    • Dispatch classes such as nx.Graph(backend=...) (#7760).
    • ENH: Add is_perfect_graph using SPGT (follow-up to #8111) (#8318).
    • ➕ Add benchmark suite for shortest path algorithms on weighted graphs (#8059).
    • ➕ Adding Generalized Petersen Graph (#8147).
    • ENH: add normalize option for subgraph_centrality and its _exp version (#8340).
    • FEAT: Add a describe method for some basic info about graphs (#8338).

    🐛 Bug Fixes

    • ➕ Add Python 3.14 to testing matrix (#8096).
    • 🛠 Fix round-trip to and from pygraphviz.AGraph setting spurious graph attributes (#8121).
    • ➕ Add input validation to non_randomness() and clarify its behavior (#8057).
    • Ensure that backend names are valid Python identifiers (#8160).
    • 🛠 fix: resolve failure to pickle.loads(pickle.dumps(PlanarEmbedding())) (#8186).
    • ➕ Add GEXF 1.3 to the recognized GEXF versions (#8196).
    • BUG: Raise on directed graphs in nx.find_cliques_recursive (#8211).
    • fix optimize_edit_paths handling of self-loops (#8207).
    • BUG: add check for isolated nodes in degree_sequence_tree (#8235).
    • Mehlorn Steiner Tree (#8052).
    • 🐛 BUG/MAINT: fix edge betweenness centrality scaling when k<N and merge all b.c. rescale helper functions (#8256).
    • 🛠 Fix node attributes on lattice graphs (#8311).
    • 🐛 BUG: allow graphs with nonstandard node labels in FISTA (#8332).
    • 👉 Make dominance functions consistent with definitions (#8061).
    • 📌 Pin last value to 1.0 in cumulative_distribution to address floating-point errors (#8342).

    📚 Documentation

    • Fix min_weight_matching (#8062).
    • 🚀 Update deploy-docs yml to use Python 3.12 when deploying the docs (#8102).
    • 📄 DOC: Add missing params to bfs_layout docstring (#8086).
    • ➕ Add input validation to non_randomness() and clarify its behavior (#8057).
    • 📄 doc: improve docstring for hypercube_graph (#8012).
    • 👌 Improved documentation for boundary_expansion function (#7905).
    • 📄 DOC: Add docstring example count number of unique triangles (#8144).
    • Add function bfs_labeled_edges to docs (#8149).
    • 🛠 Fix issues with urls in HITS reference docs (#8156).
    • 📄 Correct the docs for display() keyword node_pos (#8153).
    • ➕ Adding Notes on Multi-Target Shortest Path Queries (#8169).
    • 3d facebook plot example (#6893).
    • ✅ trust rank implementation and testing (#8165).
    • 👌 Improve docs for all_neighbors() (#8166).
    • ➕ Adding shortest-paths documentation (#8187).
    • ➕ Add Linux Foundation health score badge to README (#8219).
    • DOC: Add docstring for number_of_cliques (#8216).
    • DOC: add docstring for degree_sequence_tree (#8236).
    • DOC: Add examples to contracted_nodes (#7856).
    • 📄 DOC: fix wrong reference in leiden docs (#8277).
    • 🛠 Fix over-indentation of list in chordless_cycles docstring (#8288).
    • ➕ Add iplotx to network drawing documentation (#8289).
    • 🛠 Fix sphinx build errors (#8303).
    • 🚚 DOC: Move deprecation procedure from contributing->dev guide (#8308).
    • DOC: add gallery example for metric_closure (#8306).
    • 👀 Cross-link Platonic graphs in See Also section (#8307).
    • ➕ Add seealso crosslinks between lattice graphs (#8310).
    • CI,DOC: Only run one parallel betweenness example (#8305).
    • 📄 DOC: rework betweenness centrality docstrings (#8264).
    • Rm 3D layout and animation from greedy_color example (#8315).
    • DOC: Clarify node and edge removal behavior in tutorial (#8321).
    • 📄 Improving connected module docs (#8267).
    • 📄 Docs: add nx-neptune backend documentation ([#8258](https://git...