networkx 3.6rc0#

We’re happy to announce the release of networkx 3.6rc0!

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).

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).

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).

  • Improving shortest paths docs when there is no path between source and target (#8327).

  • Adding floating point considerations to tutorial (#8324).

  • Adding Dijkstra’s algo specific doc (#8286).

  • Minor documentation build improvements (#8329).

  • Clarify the meaning of the cutoff parameter in some path-finding functions (#7487).

  • Switch to the NumFOCUS Code of Conduct (#8320).

Maintenance#

  • Rm extraneous print from nx.display (#8084).

  • Remove structuralholes.py from needs_(num|sci)py (#8088).

  • Refactor image comparison tests (#8097).

  • Update deploy-docs yml to use Python 3.12 when deploying the docs (#8102).

  • Fix typo in extra name (#8103).

  • MAINT: Support PEP 639 for license metadata (#8100).

  • Use scipy.sparse array versions where applicable (#8080).

  • pass numpy seed by value not index (#8116).

  • Maintenance for broadcasting.py (#8082).

  • Bump the actions group across 1 directory with 6 updates (#8085).

  • Revert dict comprehensions -> dict.fromkeys accidentally introduced in #8017 (#8018).

  • refactor: improve generate_adjlist (#8146).

  • MAINT: Weekly cron job to run dispatch test with an extensive matrix (#8154).

  • Add benchmarks for multisrc_dijkstra over many small graphs (#8164).

  • test: clean up k_factor tests (#8140).

  • Use pytest.raises as a context (#8170).

  • Testing sentinel-node trick (#8171).

  • chore: make benchmarking and release requirements extras in pyproject.toml (#8172).

  • Add benchmarks for is_regular (#8173).

  • MAINT: use matrix_power from scipy.sparse in number_of_walks (#8197).

  • MAINT: remove try except for tomllib in generate_requirements (#8198).

  • MAINT: Ignore graph hashing warnings in tests (#8205).

  • STY: Variable rename proposal in bidirectional_dijkstra (#8210).

  • MAINT: Rm print from threshold_graph (#8212).

  • feat(api): update non-tree check in _tree_center and move to tree subpackage (#8174).

  • TST: add seed for random_cograph test (#8228).

  • Update links for broken testing badge in README (#8234).

  • Clarifying @_dispatchable(name= (#8168).

  • MAINT/TST: increase non-slow coverage in k_components (#8239).

  • MAINT/TST: clean up tests for degree_seq (#8257).

  • Use CircleCI for coverage workflow (#8178).

  • Bump the actions group across 1 directory with 5 updates (#8261).

  • BUG/MAINT: fix edge betweenness centrality scaling when k<N and merge all b.c. rescale helper functions (#8256).

  • DOC/MAINT: Use itertools.pairwise in pairwise and add docstring (#8201).

  • Optimizing is_connected (#8266).

  • Rm outdated codecov badge from README (#8272).

  • CI: Move slow tests from coverage to dedicated run (#8273).

  • Move coverage configuration to pyproject.toml (#8287).

  • Making weakly connected logic consistent with connected logic (#8285).

  • Bump scientific-python/circleci-artifacts-redirector-action from 1.2.0 to 1.3.1 in the actions group (#8309).

  • CI: Add nicer rendering of env contents (#8301).

  • CI: Install ffmpeg in circleci docs pipeline (#8291).

  • Add/bump Python 3.14 to testing matrices (#8319).

  • Rm 3D layout and animation from greedy_color example (#8315).

  • MAINT: Remove unused sphinx extensions from conf.py (#8314).

  • optimize _single_shortest_path function (#6337).

  • Add autoflake and pyupgrade as manual pre-commit hooks (#7870).

  • ignore autoflake and pyupgrade changes (#8333).

  • Revert “ignore autoflake and pyupgrade changes” (#8334).

Other#

  • TST: improve coverage for generators/deg_seq.py (#8226).

  • TST: test max_iter in asyn_fluidc (#8224).

  • MAINT: clean up tests for steiner_tree (#8259).

  • TST: add non-slow coverage for random graph generators (#8252).

  • TST: Add a nonslow test for all_node_cuts with shortest augmenting path flow function (#8230).

  • TST/MAINT: add non-slow coverage for random generators (#8233).

  • TST: add coverage for isomorphvf2 (#8251).

  • TST: ensure determinism in nx_pylab drawing tests (#8232).

  • TST: add random_k_out_graph to tests to hit try except path (#8231).

  • TST: add coverage for some branches in internet_as_graphs.py (#8225).

  • TST: test topo_sort skips visited nodes in goldberg_radzik (#8279).

Contributors#

38 authors added to this release (alphabetically):

24 reviewers added to this release (alphabetically):

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