From e8ea414fdf077471f0ae9fa6c262972fcd4d3b01 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 24 Jun 2022 08:20:10 +0800 Subject: [PATCH] Figure.histogram and pygmt.info: Remove parameter 'table', use 'data' instead (#1975) --- pygmt/src/histogram.py | 9 +-------- pygmt/src/info.py | 2 -- pygmt/tests/test_info.py | 17 ----------------- 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/pygmt/src/histogram.py b/pygmt/src/histogram.py index 78ad4d3bef6..302004a29c3 100644 --- a/pygmt/src/histogram.py +++ b/pygmt/src/histogram.py @@ -2,17 +2,10 @@ Histogram - Create a histogram """ from pygmt.clib import Session -from pygmt.helpers import ( - build_arg_string, - deprecate_parameter, - fmt_docstring, - kwargs_to_strings, - use_alias, -) +from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias @fmt_docstring -@deprecate_parameter("table", "data", "v0.5.0", remove_version="v0.7.0") @use_alias( A="horizontal", B="frame", diff --git a/pygmt/src/info.py b/pygmt/src/info.py index b0c69e9a4a5..940ae2d7850 100644 --- a/pygmt/src/info.py +++ b/pygmt/src/info.py @@ -6,7 +6,6 @@ from pygmt.helpers import ( GMTTempFile, build_arg_string, - deprecate_parameter, fmt_docstring, kwargs_to_strings, use_alias, @@ -14,7 +13,6 @@ @fmt_docstring -@deprecate_parameter("table", "data", "v0.5.0", remove_version="v0.7.0") @use_alias( C="per_column", I="spacing", diff --git a/pygmt/tests/test_info.py b/pygmt/tests/test_info.py index c27f8b93856..5bd6c2322bd 100644 --- a/pygmt/tests/test_info.py +++ b/pygmt/tests/test_info.py @@ -31,23 +31,6 @@ def test_info(): assert output == expected_output -def test_info_deprecate_table_to_data(): - """ - Make sure that the old parameter "table" is supported and it reports a - warning. - """ - with pytest.warns(expected_warning=FutureWarning) as record: - output = info(table=POINTS_DATA) # pylint: disable=no-value-for-parameter - expected_output = ( - f"{POINTS_DATA}: N = 20 " - "<11.5309/61.7074> " - "<-2.9289/7.8648> " - "<0.1412/0.9338>\n" - ) - assert output == expected_output - assert len(record) == 1 # check that only one warning was raised - - @pytest.mark.parametrize( "table", [