diff options
author | Mridul Seth <seth.mridul@gmail.com> | 2022-06-15 23:06:07 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-15 22:06:07 +0300 |
commit | e92dd05610420c9847c006dd9cf144e89b33bcf2 (patch) | |
tree | 7986eaad013dc6baea96610991d2e9832ec812ba /networkx/utils | |
parent | fb6221b1c5f341ae7a74b8a78be29c0320f264cf (diff) | |
download | networkx-e92dd05610420c9847c006dd9cf144e89b33bcf2.tar.gz |
Remove deprecated function make_str (#5739)
* Remove deprecated function make_str
* [skip ci] rm from reference guide.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Diffstat (limited to 'networkx/utils')
-rw-r--r-- | networkx/utils/misc.py | 12 | ||||
-rw-r--r-- | networkx/utils/tests/test_misc.py | 15 |
2 files changed, 0 insertions, 27 deletions
diff --git a/networkx/utils/misc.py b/networkx/utils/misc.py index 7b55ca31..edf8f61d 100644 --- a/networkx/utils/misc.py +++ b/networkx/utils/misc.py @@ -28,7 +28,6 @@ __all__ = [ "flatten", "make_list_of_ints", "is_list_of_ints", - "make_str", "generate_unique_node", "default_opener", "dict_to_numpy_array", @@ -154,17 +153,6 @@ def is_list_of_ints(intlist): return True -def make_str(x): - """Returns the string representation of t. - - .. deprecated:: 2.6 - This is deprecated and will be removed in NetworkX v3.0. - """ - msg = "make_str is deprecated and will be removed in 3.0. Use str instead." - warnings.warn(msg, DeprecationWarning) - return str(x) - - def generate_unique_node(): """Generate a unique node label. diff --git a/networkx/utils/tests/test_misc.py b/networkx/utils/tests/test_misc.py index 96ab5452..dd3c35f2 100644 --- a/networkx/utils/tests/test_misc.py +++ b/networkx/utils/tests/test_misc.py @@ -15,7 +15,6 @@ from networkx.utils import ( groups, iterable, make_list_of_ints, - make_str, pairwise, powerlaw_sequence, to_tuple, @@ -92,20 +91,6 @@ def test_random_number_distribution(): z = discrete_sequence(20, distribution=[0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3]) -def test_make_str_with_bytes(): - x = "qualité" - y = make_str(x) - assert isinstance(y, str) - assert len(y) == 7 - - -def test_make_str_with_unicode(): - x = "qualité" - y = make_str(x) - assert isinstance(y, str) - assert len(y) == 7 - - class TestNumpyArray: @classmethod def setup_class(cls): |