Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion pygmt/helpers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import subprocess
import sys
import time
import warnings
import webbrowser
from collections.abc import Iterable, Sequence
from typing import Any
Expand Down Expand Up @@ -439,6 +440,10 @@ def build_arg_string(kwdict, confdict=None, infile=None, outfile=None):
strings (e.g. "+proj=longlat +datum=WGS84") will have their spaces removed.
See https://github.com/GenericMappingTools/pygmt/pull/1487 for more info.

.. deprecated:: 0.12.0

Use :func:`build_arg_list` instead.

Parameters
----------
kwdict : dict
Expand Down Expand Up @@ -513,8 +518,13 @@ def build_arg_string(kwdict, confdict=None, infile=None, outfile=None):
... )
input.txt -A0 -B -Crainbow --FORMAT_DATE_MAP="o dd" ->output.txt
"""
gmt_args = []
msg = (
"Utility function `build_arg_string()' is deprecated in v0.12.0 and will be "
"removed in v0.14.0. Uease `build_arg_list()' instead."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK with removing the function in two releases?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, two releases should be fine since it's meant to be an internal function (though people still use it for good reason).

Comment thread
seisman marked this conversation as resolved.
Outdated
)
Comment thread
seisman marked this conversation as resolved.
warnings.warn(msg, category=FutureWarning, stacklevel=2)

gmt_args = []
for key in kwdict:
if len(key) > 2: # raise an exception for unrecognized options
raise GMTInvalidInput(f"Unrecognized parameter '{key}'.")
Expand Down