NetworkX 3.2#

We’re happy to announce the release of networkx 3.2!

Highlights#

  • Add @nx._dispatch decorator to most algorithms (#6688).

API Changes#

  • Remove topo_order kwarg from is_semiconnected without deprecation (#6651).

  • deprecate Edmonds class (#6785).

  • Make weight part of the API for functions which had default assumptions (#6814).

  • ENH: let users set a default value in get_attr methods (#6887).

  • Rename function join as join_trees (#6908).

  • API: Add a decorator to deprecate positional args (#6905).

  • Expire deprecation for attrs kwarg in node_link module (#6939).

  • Minor touchup to the sort_neighbors deprecation (#6942).

  • Rm deprecated create_using kwarg from scale_free_graph (#6940).

  • Make position part of the API for geometric_edges (#6816).

  • Undeprecate literal_(de)stringizer (#6943).

  • Make new dtype param for incidence_matrix kwarg-only (#6954).

  • Make weight and seed for fast_label_propagation_communities kwarg only (#6955).

  • API: Rm default value from time_delta for cd_index (#6953).

  • Deprecate strongly_connected_components_recursive (#6957).

  • Rm deprecated clique helper functions (#6941).

Enhancements#

  • Update calculation of triangles (#6258).

  • Add single_source_all_shortest_paths and all_pairs_all_shortest_paths (#5959).

  • Add @nx._dispatch decorator to most algorithms (#6688).

  • Move benchmarks inside main repo (#6835).

  • ENH – Replaced for-loops in :function:rescale_layout with numpy vectorized methods (#6879).

  • Fast label propagation algorithm for community detection (#6843).

  • Add time series Visibility Graph generator (#6880).

  • Random trees & forests (#6758).

  • Add support for tuple-nodes to default gml parser (#6950).

  • Add Kemeny’s constant (#6929).

  • Speedup resistance_distance (#6925).

  • Allow graph generators and conversion functions to be dispatched (#6876).

  • adding extendability problem (2nd try) (#4890).

Bug Fixes#

  • Fixing DOT format for to_agraph() (#6474).

  • Remove topo_order kwarg from is_semiconnected without deprecation (#6651).

  • Stabilize test of approximation.connected_components (#6715).

  • Fix minimum_cycle_basis and change to return cycle instead of set (#6788).

  • Refix minimum_cycle_basis and scipy.sparse conversions and add tests (#6789).

  • number_of_walks might use a weighted edge attribute (#6815).

  • GML: added support for reading multi-line values (#6837).

  • Avoid directed_laplacian_matrix causing nans in some cases (#6866).

  • Add test about zero weight cycles and fix goldberg-radzik (#6892).

  • Modify s_metric normalized default so function doesn’t raise (#6841).

  • Error handling for invalid prufer sequence from_prufer_sequence: issue #6420 (#6457).

  • FIX: Better default behaviour for percolation centrality with no node attrs (#6894).

  • FIX: MultiDiGraphs keys got lost in weighted shortest paths (#6963).

  • Handle edge cases in Laplacian centrality (#6938).

  • adding a formula that ignores self-loops at the each level of directed louvain algorithm (#6630).

  • Fix ````is_k_edge_connected```` for case of k=2 (#7024).

Documentation#

  • Fix links in laplacian_centrality and laplacian_matrix (#6623).

  • Add Greedy Coloring Example to Gallery (#6647).

  • Add linting to contributor guide (#6692).

  • Minor fixups to equitable_coloring docstring (#6673).

  • Remove survey banner (#6818).

  • fix: make messages readable (#6860).

  • add docs for source input of dfs_predecessor and dfs_successor (#6867).

  • Clarify that basis generates simple cycles only (#6882).

  • Revert “Clarify that basis generates simple cycles only” (#6885).

  • updating TSP example docs (#6794).

  • MAINT: Point the PR template to pre-commit (#6902).

  • fix doc build errors/warnings (#6907).

  • DOC: stray backtick and double instead of simple backtick (#6917).

  • DOC: Add example for self loop multidigraph in contraction (#6901).

  • Fix sphinx docs rendering of dispatched functions (#6895).

  • added more examples on graphical degree sequence (#5634).

  • Minor touchup to the sort_neighbors deprecation (#6942).

  • Warning comment for float weights in betweenness.py (#5171).

  • DOC: Misc typos (#6959).

  • Fixing typo in effective_size documentation (#6967).

  • fix examples in tournament.py (#6964).

  • Fix a reference (#6977).

  • Add missing parameter to snap_aggregation docstring (#6978).

  • Update developer deprecation todo list (#6985).

  • Add “networkx.plugin_info” entry point and update docstring (#6911).

  • document graph type; add links; rm unused import (#6992).

  • Add GraphBLAS backend to online docs (#6998).

  • Add 3.2rc0 release notes (#6997).

  • Update release process for changelist (#7005).

  • Update contributing guide for changelist workflow (#7004).

  • Fix definition of \(m\) parameter in docstring of modularity function (#6990).

  • updated docs of SA_tsp and TA_tsp (#7013).

  • Update katz_centrality missing default alpha value (#7015).

Maintenance#

  • Replacing codecov Python CLI with gh action (#6635).

  • Bump pyupgrade minimum Python version to 3.9 (#6634).

  • MAINT: minor coverage cleanup (#6674).

  • Rm unreachable code for validating input (#6675).

  • Pin sphinx<7 as temporary fix for doc CI failures (#6680).

  • Example of improving test granularity related to #5092 (#5094).

  • MAINT: Bump scipy version and take advantage of lazy loading (#6704).

  • Drop support for Python 3.8 per SPEC0 (#6733).

  • Update pygraphviz (#6724).

  • Update core dependencies per SPEC0 (#6734).

  • Test on Python 3.12-beta2 (#6737).

  • update the OSMnx example (#6775).

  • Minor fixups to clear up numpy deprecation warnings (#6776).

  • Add label-check workflow (#6797).

  • Use dependabot (#6799).

  • Bump webfactory/ssh-agent from 0.7.0 to 0.8.0 (#6800).

  • Attach milestone to merged PRs (#6802).

  • Add preserve_all_attrs to convert_from_nx to make it concise (#6812).

  • Bump scientific-python/attach-next-milestone-action from f94a5235518d4d34911c41e19d780b8e79d42238 to bc07be829f693829263e57d5e8489f4e57d3d420 (#6830).

  • Relax threshold in test of betweenness_centrality (#6827).

  • Add @nx._dispatch to {single_source,all_pairs}_all_shortest_paths, cd_index (#6832).

  • ci: Add distribution verification checks to nightly wheel upload (#6831).

  • MAINT: fix link to nightly releases wheels (#6845).

  • Don’t test numpy2 nightlies (#6852).

  • MAINT: replace numpy aliases in scipy namespace (#6857).

  • Unpin scipy upperbound for tests (#6727).

  • Temporary work-around for NEP 51 numpy scalar reprs + NX doctests (#6856).

  • Unpin numpy nightly wheels (#6854).

  • fix: make messages readable (#6860).

  • Revert “Pin sphinx<7 as temporary fix for doc CI failures (#6680)” (#6859).

  • Change _dispatch to a class instead of a closure (#6840).

  • Move random_state decorators before @nx._dispatch (#6878).

  • MAINT: Make GEXF and graphml writer work with numpy 2.0 (#6900).

  • Rename function join as join_trees (#6908).

  • add missing join deprecation stuff to release_dev and conftest (#6933).

  • MAINT: move dispatch test workflow as an independent CI job (#6934).

  • MAINT: Use importlib.resources instead of file dunder to access files (#6936).

  • DOC, MAINT: Deduplicate docs instructions (#6937).

  • MAINT: Raise clean error with random_triad for graph with <3 nodes (#6962).

  • Update numpydoc (#6773).

  • MAINT: update pre-commit tools deps (#6965).

  • MAINT: Clean up commented out code in triads (#6961).

  • MAINT: Scipy nightly failing with np alias (#6969).

  • Bump actions/checkout from 3 to 4 (#6970).

  • Add for testing new pydata-sphinx-theme PR (#6982).

  • MAINT: Disable building delaunay geospatial example temporarily (#6981).

  • Revert “MAINT: Disable building delaunay geospatial example temporarily” (#6984).

  • Enhancements change default join trees 6947 (#6948).

  • Update sphinx theme (#6930).

  • Generate requirements files from pyproject.toml (#6987).

  • Use trusted publisher (#6988).

  • Prefer “backend” instead of “plugin” (#6989).

  • CI: Pin scientific-python/upload-nightly-action to 0.2.0 (#6993).

  • Support Python 3.12 (#7009).

  • pip install nx-cugraph from git, not nightly wheels, for docs (#7011).

  • Fix typos (#7012).

Other#

  • Update release process (#6622).

  • Add Lowest Common Ancestor example to Gallery (#6542).

  • Add examples to bipartite centrality.py (#6613).

  • Remove Python 3.8 from CI (#6636).

  • Fix links in eigenvector.py and katz_centrality.py (#6640).

  • Use the correct namespace for girvan_newman examples (#6643).

  • Preserve node order in bipartite_layout (#6644).

  • Make cycle_basis() deterministic (#6654).

  • Added docstrings examples for clique.py (#6576).

  • Fix output of is_chordal for empty graphs (#6563).

  • Allow multiple graphs for @nx._dispatch (#6628).

  • Adding GitHub Links next to Dheeraj’s name in the contributors list (#6670).

  • Adding is_tounament to main namespace (#6498).

  • Use unpacking operator on dicts to prevent constructing intermediate objects (#6040).

  • Added tests to test_correlation.py (#6590).

  • Improve test coverage for neighbor_degree.py (#6589).

  • Added docstring examples for nx_pylab.py (#6616).

  • Improve Test Coverage for current_flow_closeness.py (#6677).

  • try adding circleci artifact secret (#6679).

  • Improve test coverage for reaching.py (#6678).

  • added tests to euler.py (#6608).

  • codespell: pre-commit, config, typos fixed (#6662).

  • Improve test coverage for mst.py (#6540).

  • Handle weights as distance= in testing dispatch (#6671).

  • remove survey banner (#6687).

  • CircleCI: add token for image redirector (#6695).

  • MAINT: Add subgraph_view and reverse_view to nx namespace directly through graphviews (#6689).

  • Added docstring example for dense.py (#6669).

  • MAINT: Add a github action cron job to upload nightly wheels (#6701).

  • MAINT: fix file path in nightly build workflow (#6702).

  • Add example script for shortest path (#6534).

  • Added doctrings for generic_graph_view (#6697).

  • Doc: wrong underline length (#6708).

  • MAINT: cron job to test against nightly deps every week (#6705).

  • simplify stack in dfs (#6366).

  • optimize generic_bfs_edges function (#6359).

  • Optimize _plain_bfs functions (#6340).

  • Added girth computation function (#6633).

  • MAINT: Stop CI from uploading nightly on forks (#6717).

  • Performance improvement for astar_path (#6723).

  • Skip scipy-1.11.0rc1 due to known issue (#6726).

  • Add an optional argument to the incidence_matrix function to provide … (#6725).

  • Graph walks implementation by jfinkels & dtekinoglu (#5908).

  • DOCS: Add walks to algorithms.index (#6736).

  • Add note about using latex formatting in docstring in the contributor guide (#6535).

  • Fix intersection_all method (#6744).

  • Fix Johnson method for unweighted graphs (#6760).

  • MAINT: Ignore SciPy v1.11 in requirements (#6769).

  • Replace deprecated numpy.alltrue method (#6768).

  • keep out scipy 1.11.1 (#6772).

  • Document additional imports required for building the documentation (#6766).

  • modified max_weight_matching to be non-recursive (#6684).

  • Rewrite NXEP 3 (#6648).

  • Refactor edmonds algorithm (#6743).

  • Docstring improvement for nx_pylab.py (#6602).

  • Use pyproject.toml (#6774).

  • Include missing package_data (#6780).

  • [BUG] Patch doc and functionality for is_minimal_d_separator (#6427).

  • Update to the documentation of eigenvector centrality (#6009).

  • Fix typo in contributing page (#6784).

  • Fix empty graph zero division error for louvain (#6791).

  • Vertical chains for network text (#6759).

  • Time dependent module (#6682).

  • Allow user to opt out of edge attributes in from_numpy_array (#6259).

  • modifies ````bfs_edges```` and adds warning to ````generic_bfs_edges```` (#5925).

  • Spelling (#6752).

  • Added test cases for join operation and fixed join operation to handle label_attributes (#6503).

  • Remove serialisation artifacts on adjacency_graph (#6041).

  • Patch view signature (#6267).

  • Doc add nongraphical examples 6944 (#6946).

  • feat: docstring examples for algorithms/operators/all.py (#6974).

Contributors#

70 authors added to this release (alphabetically):

41 reviewers added to this release (alphabetically):

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