[Pkg-mpd-commits] [python-mpd] 29/91: deprecate send_ and fetch_ variants of commands

Simon McVittie smcv at debian.org
Sat Feb 24 14:55:30 UTC 2018


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository python-mpd.

commit f3864acbfcaa0c67507d3fa01fe0118b2cf19dc5
Author: Jörg Thalheim <joerg at higgsboson.tk>
Date:   Sat Sep 10 18:09:35 2016 +0200

    deprecate send_ and fetch_ variants of commands
---
 mpd/base.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/mpd/base.py b/mpd/base.py
index dd2d142..ed87d1a 100644
--- a/mpd/base.py
+++ b/mpd/base.py
@@ -411,6 +411,8 @@ class MPDClient(MPDClientBase):
         self._wfile = _NotConnected()
 
     def _send(self, command, args, retval):
+        warnings.warn("The 'send_%s' is deprecated in favor of asynchronous api" % command, DeprecationWarning)
+
         if self._command_list is not None:
             raise CommandListError(
                 "Cannot use send_{} in a command list".format(command))
@@ -419,6 +421,8 @@ class MPDClient(MPDClientBase):
             self._pending.append(command)
 
     def _fetch(self, command, args, retval):
+        warnings.warn("The 'fetch_%s' is deprecated in favor of asynchronous api" % command, DeprecationWarning)
+
         if self._command_list is not None:
             raise CommandListError(
                 "Cannot use fetch_{} in a command list".format(command))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git



More information about the Pkg-mpd-commits mailing list