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

Simon McVittie smcv at debian.org
Sat Feb 24 14:55:27 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 3a32a7d9d21f4317bcc1567c0f3b47965e17e3cd
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