diff --git a/doc/changes.rst b/doc/changes.rst index d770f3f..a7b71cc 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -1,6 +1,13 @@ python-mpd2 Changes List ======================== +Changes in v2.0.1 +----------------- + +* 2.0.0 also dropped use_unicode parameter with no backwards compatibility. + This versions just deprecates the parameter. + + Changes in v2.0.0 ----------------- diff --git a/mpd/base.py b/mpd/base.py index 478826a..fab76fc 100644 --- a/mpd/base.py +++ b/mpd/base.py @@ -26,7 +26,7 @@ # constants ############################################################################### -VERSION = (2, 0, 0) +VERSION = (2, 0, 1) HELLO_PREFIX = "OK MPD " ERROR_PREFIX = "ACK " SUCCESS = "OK" @@ -169,10 +169,27 @@ class MPDClientBase(object): subclasses. """ - def __init__(self): + def __init__(self, use_unicode=None): self.iterate = False + if use_unicode is not None: + warnings.warn( + "use_unicode parameter to ``MPDClientBase`` constructor is " + "deprecated", + DeprecationWarning, + stacklevel=2, + ) self._reset() + @property + def use_unicode(self): + warnings.warn( + "``use_unicode`` is deprecated: python-mpd 2.x always uses " + "Unicode", + DeprecationWarning, + stacklevel=2, + ) + return True + @classmethod def add_command(cls, name, callback): raise NotImplementedError( @@ -469,7 +486,14 @@ class MPDClient(MPDClientBase): MPDClientBase._parse_plugins, ] - def __init__(self): + def __init__(self, use_unicode=None): + if use_unicode is not None: + warnings.warn( + "use_unicode parameter to ``MPDClient`` constructor is " + "deprecated", + DeprecationWarning, + stacklevel=2, + ) super(MPDClient, self).__init__() def _reset(self):