python-musicpd.git
14 years agosetup.py: incrementing version number to 0.2.0 v0.2.0
J. Alexander Treuman [Thu, 3 Apr 2008 18:52:41 +0000 (14:52 -0400)]
setup.py: incrementing version number to 0.2.0

14 years agompd.py: catch all exceptions raised by _hello()
J. Alexander Treuman [Thu, 3 Apr 2008 04:23:36 +0000 (00:23 -0400)]
mpd.py: catch all exceptions raised by _hello()

I normally consider it bad form to catch all exceptions, since it can
result in lost KeyboardInterrupts.  But in this case we re-raise the
exception after cleaning up, so it's ok.

While _hello() itself only raises socket.error or an MPDError subclass, a
KeyboardInterrupt would previously go uncaught.  Since the connection was
never cleaned up, it could be left in an unusable state.  So just
disconnect on all exceptions instead.

14 years agoTODO.txt: removing pre- and post-release sections
J. Alexander Treuman [Thu, 3 Apr 2008 03:55:07 +0000 (23:55 -0400)]
TODO.txt: removing pre- and post-release sections

14 years agompd.py: changing exception raising to comply with the Python Style Guide
J. Alexander Treuman [Sun, 23 Mar 2008 21:20:46 +0000 (17:20 -0400)]
mpd.py: changing exception raising to comply with the Python Style Guide

14 years agompd.py: strip trailing \n from MPD's hello line for a nicer error message
J. Alexander Treuman [Sun, 23 Mar 2008 21:10:41 +0000 (17:10 -0400)]
mpd.py: strip trailing \n from MPD's hello line for a nicer error message

14 years agompd.py: reset to disconnected state if _hello() fails in connect()
J. Alexander Treuman [Sun, 23 Mar 2008 21:07:55 +0000 (17:07 -0400)]
mpd.py: reset to disconnected state if _hello() fails in connect()

14 years agoTODO.txt: removing completed TODO item
J. Alexander Treuman [Sun, 23 Mar 2008 20:51:48 +0000 (16:51 -0400)]
TODO.txt: removing completed TODO item

14 years agoCHANGES.txt: document change in previous commit
J. Alexander Treuman [Sun, 23 Mar 2008 20:50:49 +0000 (16:50 -0400)]
CHANGES.txt: document change in previous commit

14 years agompd.py: loop over addresses returned by getaddrinfo to connect to
J. Alexander Treuman [Sun, 23 Mar 2008 20:47:06 +0000 (16:47 -0400)]
mpd.py: loop over addresses returned by getaddrinfo to connect to

This allows us to support IPv6 and multi-homed hostnames.  getaddrinfo is
called with the same flags as libmpdclient uses, making address resolution
consistent between the two.

14 years agoCHANGES.txt: document change in previous commit
J. Alexander Treuman [Sun, 23 Mar 2008 20:05:53 +0000 (16:05 -0400)]
CHANGES.txt: document change in previous commit

14 years agompd.py: raise ConnectionError if connect() is called when already connected
J. Alexander Treuman [Sun, 23 Mar 2008 20:01:31 +0000 (16:01 -0400)]
mpd.py: raise ConnectionError if connect() is called when already connected

14 years agompd.py: use a separate file object for reading and writing sockets
J. Alexander Treuman [Sun, 23 Mar 2008 19:57:37 +0000 (15:57 -0400)]
mpd.py: use a separate file object for reading and writing sockets

This is to make it easier to read command output from a file instead of a
socket.  Useful for testing and benchmarking.

14 years agompd.py: raise ConnectionError when trying to use an unconnected socket
J. Alexander Treuman [Sun, 23 Mar 2008 19:50:48 +0000 (15:50 -0400)]
mpd.py: raise ConnectionError when trying to use an unconnected socket

ConnectionError will now be raised when trying to read from/write to a
socket before calling connect() or after calling disconnect().  In the past
it would try to complete the operation on the unconnected socket, resulting
in a socket.error exception.

14 years agoTODO.txt: cleaning up and splitting into pre- and post-release sections
J. Alexander Treuman [Sun, 23 Mar 2008 04:27:29 +0000 (00:27 -0400)]
TODO.txt: cleaning up and splitting into pre- and post-release sections

14 years agoTODO.txt: changing header for consistency
J. Alexander Treuman [Sun, 23 Mar 2008 04:22:12 +0000 (00:22 -0400)]
TODO.txt: changing header for consistency

14 years agoadding CHANGES.txt
J. Alexander Treuman [Sun, 23 Mar 2008 04:21:19 +0000 (00:21 -0400)]
adding CHANGES.txt

14 years agoTODO.txt: removing completed TODO item
J. Alexander Treuman [Sun, 23 Mar 2008 03:18:48 +0000 (23:18 -0400)]
TODO.txt: removing completed TODO item

14 years agompd.py: raise ConnectionError on EOF
J. Alexander Treuman [Sun, 23 Mar 2008 03:16:31 +0000 (23:16 -0400)]
mpd.py: raise ConnectionError on EOF

14 years agoTODO.txt: adding TODO item
J. Alexander Treuman [Wed, 5 Mar 2008 22:29:10 +0000 (17:29 -0500)]
TODO.txt: adding TODO item

14 years agompd.py: making _getitem return None if no item is returned
J. Alexander Treuman [Sat, 1 Mar 2008 20:03:47 +0000 (15:03 -0500)]
mpd.py: making _getitem return None if no item is returned

update and addid should normally always return a single item, so previously
an exception was raised if we got nothing.  However, when used in a
command_list, only the *last* call to update will return an item.  So
return None instead of raising an exception if we get nothing.

14 years agosetup.py: commenting out license/platforms v0.1.0
J. Alexander Treuman [Thu, 28 Feb 2008 00:19:13 +0000 (19:19 -0500)]
setup.py: commenting out license/platforms

The license and platforms fields should be filled out *only* if appropriate
classifiers don't already exist (which in our case, they do).

14 years agoMANIFEST.in: exclude setup.cfg
J. Alexander Treuman [Thu, 28 Feb 2008 00:04:30 +0000 (19:04 -0500)]
MANIFEST.in: exclude setup.cfg

Like MANIFEST.in, setup.cfg is (currently) only used for building
distributions.  So don't include it in the distribution itself.

14 years agompd.py: adding one line description at top of file
J. Alexander Treuman [Wed, 27 Feb 2008 23:59:36 +0000 (18:59 -0500)]
mpd.py: adding one line description at top of file

14 years agoTODO.txt: removing completed TODO item and pre-release section
J. Alexander Treuman [Wed, 27 Feb 2008 23:57:56 +0000 (18:57 -0500)]
TODO.txt: removing completed TODO item and pre-release section

14 years agoadding setup.py, setup.cfg, and MANIFEST.in
J. Alexander Treuman [Wed, 27 Feb 2008 23:56:53 +0000 (18:56 -0500)]
adding setup.py, setup.cfg, and MANIFEST.in

14 years agoTODO.txt: removing a completed TODO item
J. Alexander Treuman [Wed, 27 Feb 2008 23:17:59 +0000 (18:17 -0500)]
TODO.txt: removing a completed TODO item

14 years agoadding README.txt
J. Alexander Treuman [Wed, 27 Feb 2008 23:09:52 +0000 (18:09 -0500)]
adding README.txt

14 years agoTODO.txt: changing a couple TODO items
J. Alexander Treuman [Wed, 27 Feb 2008 21:28:15 +0000 (16:28 -0500)]
TODO.txt: changing a couple TODO items

14 years agoaddding doc/commands.txt to document supported commands
J. Alexander Treuman [Wed, 27 Feb 2008 21:24:45 +0000 (16:24 -0500)]
addding doc/commands.txt to document supported commands

14 years agorenaming TODO to TODO.txt
J. Alexander Treuman [Wed, 27 Feb 2008 21:15:57 +0000 (16:15 -0500)]
renaming TODO to TODO.txt

14 years agoTODO: removing completed TODO item
J. Alexander Treuman [Wed, 27 Feb 2008 21:15:25 +0000 (16:15 -0500)]
TODO: removing completed TODO item

14 years agoadding LICENSE.txt and a copyright notice to mpd.py
J. Alexander Treuman [Wed, 27 Feb 2008 21:12:18 +0000 (16:12 -0500)]
adding LICENSE.txt and a copyright notice to mpd.py

14 years agompd.py: removing shebang line
J. Alexander Treuman [Wed, 27 Feb 2008 21:06:25 +0000 (16:06 -0500)]
mpd.py: removing shebang line

14 years agoTODO: adding pre- and post-release sections, and a few more TODO items
J. Alexander Treuman [Wed, 27 Feb 2008 16:36:50 +0000 (11:36 -0500)]
TODO: adding pre- and post-release sections, and a few more TODO items

14 years agoTODO: adding TODO item
J. Alexander Treuman [Mon, 25 Feb 2008 21:34:29 +0000 (16:34 -0500)]
TODO: adding TODO item

14 years agomoving TODO list to separate TODO file
J. Alexander Treuman [Mon, 25 Feb 2008 20:40:05 +0000 (15:40 -0500)]
moving TODO list to separate TODO file

14 years agoremove argument checking/parsing TODO item
J. Alexander Treuman [Mon, 25 Feb 2008 00:43:53 +0000 (19:43 -0500)]
remove argument checking/parsing TODO item

mpd already does a much better job of validating arguments than we ever
could, so no point in us doing it too.  Parsing arguments is also rather
pointless, as all arguments are coerced to strings before escaping anyway.

14 years agoreturn an empty dict if no object is read
J. Alexander Treuman [Sun, 24 Feb 2008 23:47:32 +0000 (18:47 -0500)]
return an empty dict if no object is read

14 years agoadding command_list support
J. Alexander Treuman [Sun, 24 Feb 2008 22:25:16 +0000 (17:25 -0500)]
adding command_list support

14 years agoinitial commit
J. Alexander Treuman [Sun, 24 Feb 2008 21:19:17 +0000 (16:19 -0500)]
initial commit