Deprecations#
Policy#
If the behavior of the library has to be changed, a deprecation cycle must be followed to warn users.
A deprecation cycle is not necessary when:
adding a new function, or
adding a new keyword argument to the end of a function signature, or
fixing buggy behavior
A deprecation cycle is necessary for any breaking API change, meaning a change where the function, invoked with the same arguments, would return a different result after the change. This includes:
changing the order of arguments or keyword arguments, or
adding arguments or keyword arguments to a function, or
changing the name of a function, class, method, etc., or
moving a function, class, etc. to a different module, or
changing the default value of a function’s arguments.
Usually, our policy is to put in place a deprecation cycle over two minor releases (e.g., if a deprecation warning appears in 2.3, then the functionality should be removed in 2.5). For major releases we usually require that all deprecations have at least a 1-release deprecation cycle (e.g., if 3.0 occurs after 2.5, then all removed functionality in 3.0 should be deprecated in 2.5).
Note that these 1- and 2-release deprecation cycles for major and minor releases is not a strict rule and in some cases, the developers can agree on a different procedure upon justification (like when we can’t detect the change, or it involves moving or deleting an entire function for example).
Todo#
Make sure to review networkx/conftest.py after removing deprecated code.
Version 3.3#
Remove the
forest_strfunction fromreadwrite/text.py. Replace existing usages withwrite_network_text.
Version 3.4#
Remove the
random_treefunction fromgenerators/trees.py. Replace existing usages withrandom_labeled_tree.Remove the
sort_neighborsinput parameter fromgeneric_bfs_edges.Remove
MultiDiGraph_EdgeKeyclass fromalgorithms/tree/branchings.py.Remove
Edmondsclass fromalgorithms/tree/branchings.py.Remove
normalizedkwarg fromalgorithms.s_metricRemove renamed function
join()inalgorithms/tree/operations.pyand indoc/reference/algorithms/trees.rstRemove
strongly_connected_components_recursivefromalgorithms/components/strongly_connected.py
Version 3.5#
Remove
all_tripletsfromalgorithms/triads.pyRemove
random_triadfromalgorithms/triad.py.Remove
d_separatedfromalgorithms/d_separation.py.Remove
minimal_d_separatorfromalgorithms/d_separation.py.Add
not_implemented_for("multigraph”)decorator tok_core,k_shell,k_crustandk_coronafunctions.Change
single_target_shortest_path_lengthinalgorithms/shortest_path/unweighted.pyto return a dict. See #6527Change
shortest_pathinalgorithms/shortest_path/generic.pyto return a iterator. See #6527Remove
total_spanning_tree_weightfromlinalg/laplacianmatrix.pyRemove
createkeyword argument fromnonisomorphic_treesingenerators/nonisomorphic_trees.