File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 28
28
import sys
29
29
import textwrap
30
30
import traceback
31
+ import warnings
31
32
from difflib import SequenceMatcher
32
33
from typing import TYPE_CHECKING , Any , Callable
33
34
@@ -104,6 +105,21 @@ def _stream_encoding(stream, default="utf-8"):
104
105
return stream .encoding or default
105
106
106
107
108
+ def decargs (arglist ):
109
+ """Given a list of command-line argument bytestrings, attempts to
110
+ decode them to Unicode strings when running under Python 2.
111
+
112
+ .. deprecated:: 2.4.0
113
+ This function will be removed in 3.0.0. Use new_function() instead.
114
+ """
115
+ warnings .warn (
116
+ "decargs() is deprecated and will be removed in version 3.0.0." ,
117
+ DeprecationWarning ,
118
+ stacklevel = 2 ,
119
+ )
120
+ return arglist
121
+
122
+
107
123
def print_ (* strings : str , end : str = "\n " ) -> None :
108
124
"""Like print, but rather than raising an error when a character
109
125
is not in the terminal's encoding's character set, just silently
Original file line number Diff line number Diff line change @@ -86,6 +86,10 @@ For plugin developers:
86
86
* ``beets.autotag.current_metadata `` has been renamed to
87
87
``beets.util.get_most_common_tags ``.
88
88
89
+ Old imports are now deprecated and will be removed in version ``3.0.0 ``.
90
+ * ``beets.ui.decargs `` is deprecated and will be removed in version ``3.0.0 ``.
91
+
92
+
89
93
Other changes:
90
94
91
95
* Refactor: Split responsibilities of Plugins into MetaDataPlugins and general Plugins.
You can’t perform that action at this time.
0 commit comments