From 4c3ae05df53a7e8bdcfdc8aaef34ce5974476de4 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Wed, 17 Aug 2022 18:18:58 +0300 Subject: Bump nodelink args deprecation expiration to v3.2 (#5933) * Bump deprecation expiration for nodelink params to v3.2. * Fixup warnings filter. --- doc/developer/deprecations.rst | 7 +++---- networkx/conftest.py | 2 +- networkx/readwrite/json_graph/node_link.py | 12 ++++++------ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/doc/developer/deprecations.rst b/doc/developer/deprecations.rst index 6871dfca..db984054 100644 --- a/doc/developer/deprecations.rst +++ b/doc/developer/deprecations.rst @@ -117,12 +117,11 @@ Version 3.0 * In ``algorithms/matching.py``, remove parameter ``maxcardinality`` from ``min_weight_matching``. * In ``drawing/nx_pydot.py``, change PendingDeprecationWarning to DeprecationWarning. -Version 3.1 -~~~~~~~~~~~ -* In ``readwrite/json_graph/node_link.py`` remove the ``attrs` keyword code - and docstring in ``node_link_data`` and ``node_link_graph``. Also the associated tests. Version 3.2 ~~~~~~~~~~~ * In ``generators/directed.py`` remove the ``create_using`` keyword argument for the ``scale_free_graph`` function. +* Remove pydot functionality ``drawing/nx_pydot.py``, if pydot is still not being maintained. See #5723 +* In ``readwrite/json_graph/node_link.py`` remove the ``attrs` keyword code + and docstring in ``node_link_data`` and ``node_link_graph``. Also the associated tests. diff --git a/networkx/conftest.py b/networkx/conftest.py index 7480a5c8..03065302 100644 --- a/networkx/conftest.py +++ b/networkx/conftest.py @@ -246,7 +246,7 @@ def set_warnings(): warnings.filterwarnings( "ignore", category=DeprecationWarning, - message="signature change for node_link functions", + message="\n\nThe `attrs` keyword argument of node_link", ) diff --git a/networkx/readwrite/json_graph/node_link.py b/networkx/readwrite/json_graph/node_link.py index a9a20705..7005107d 100644 --- a/networkx/readwrite/json_graph/node_link.py +++ b/networkx/readwrite/json_graph/node_link.py @@ -57,7 +57,7 @@ def node_link_data( .. deprecated:: 2.8.6 The `attrs` keyword argument will be replaced with `source`, `target`, `name`, - `key` and `link`. in networkx 3.1 + `key` and `link`. in networkx 3.2 If the `attrs` keyword and the new keywords are both used in a single function call (not recommended) the `attrs` keyword argument will take precedence. @@ -134,7 +134,7 @@ def node_link_data( msg = ( "\n\nThe `attrs` keyword argument of node_link_data is deprecated\n" - "and will be removed in networkx 3.1. It is replaced with explicit\n" + "and will be removed in networkx 3.2. It is replaced with explicit\n" "keyword arguments: `source`, `target`, `name`, `key` and `link`.\n" "To make this warning go away, and ensure usage is forward\n" "compatible, replace `attrs` with the keywords. " @@ -142,7 +142,7 @@ def node_link_data( " >>> node_link_data(G, attrs={'target': 'foo', 'name': 'bar'})\n\n" "should instead be written as\n\n" " >>> node_link_data(G, target='foo', name='bar')\n\n" - "in networkx 3.1.\n" + "in networkx 3.2.\n" "The default values of the keywords will not change.\n" ) warnings.warn(msg, DeprecationWarning, stacklevel=2) @@ -215,7 +215,7 @@ def node_link_graph( .. deprecated:: 2.8.6 The `attrs` keyword argument will be replaced with the individual keywords: `source`, `target`, `name`, - `key` and `link`. in networkx 3.1. + `key` and `link`. in networkx 3.2. If the `attrs` keyword and the new keywords are both used in a single function call (not recommended) the `attrs` keyword argument will take precedence. @@ -280,7 +280,7 @@ def node_link_graph( msg = ( "\n\nThe `attrs` keyword argument of node_link_graph is deprecated\n" - "and will be removed in networkx 3.1. It is replaced with explicit\n" + "and will be removed in networkx 3.2. It is replaced with explicit\n" "keyword arguments: `source`, `target`, `name`, `key` and `link`.\n" "To make this warning go away, and ensure usage is forward\n" "compatible, replace `attrs` with the keywords. " @@ -288,7 +288,7 @@ def node_link_graph( " >>> node_link_graph(data, attrs={'target': 'foo', 'name': 'bar'})\n\n" "should instead be written as\n\n" " >>> node_link_graph(data, target='foo', name='bar')\n\n" - "in networkx 3.1.\n" + "in networkx 3.2.\n" "The default values of the keywords will not change.\n" ) warnings.warn(msg, DeprecationWarning, stacklevel=2) -- cgit v1.2.1