Permalink
Browse files

Release v1.3

  • Loading branch information...
2 parents 0f9041e + c31202a commit ac8eb6e29797f25ccf05b0776bd1ae2129d8f323 @jodal jodal committed Jun 11, 2011
Showing with 442 additions and 1,009 deletions.
  1. +3 −0 .gitignore
  2. +0 −1 MANIFEST.in
  3. +4 −1 README.rst
  4. +15 −0 docs/_templates/layout.html
  5. +2 −3 docs/api/albumbrowse.rst
  6. +2 −3 docs/api/artistbrowse.rst
  7. +2 −3 docs/api/index.rst
  8. +2 −3 docs/api/session.rst
  9. +14 −0 docs/changes.rst
  10. +9 −4 docs/conf.py
  11. +15 −12 docs/introduction.rst
  12. +5 −6 docs/managers/index.rst
  13. +1 −17 examples/jukebox.py
  14. +6 −2 setup.cfg
  15. +7 −1 setup.py
  16. +1 −0 spotify/__init__.py
  17. +0 −16 spotify/alsahelper.py
  18. +20 −33 spotify/manager/container.py
  19. +43 −57 spotify/manager/playlist.py
  20. +86 −78 spotify/manager/session.py
  21. +0 −16 spotify/osshelper.py
  22. +8 −24 src/album.c
  23. +0 −17 src/album.h
  24. +0 −17 src/albumbrowser.c
  25. +0 −17 src/albumbrowser.h
  26. +5 −22 src/artist.c
  27. +0 −17 src/artist.h
  28. +0 −17 src/artistbrowser.c
  29. +0 −17 src/artistbrowser.h
  30. +0 −17 src/image.c
  31. +0 −17 src/image.h
  32. +0 −17 src/link.c
  33. +0 −17 src/link.h
  34. +17 −27 src/mockmodule.c
  35. +1 −18 src/module.c
  36. +2 −18 src/playlist.c
  37. +0 −17 src/playlist.h
  38. +0 −17 src/playlistcontainer.c
  39. +0 −17 src/playlistcontainer.h
  40. +0 −17 src/pyspotify.c
  41. +2 −17 src/pyspotify.h
  42. +3 −20 src/search.c
  43. +0 −17 src/search.h
  44. +112 −110 src/session.c
  45. +0 −17 src/session.h
  46. +2 −19 src/track.c
  47. +0 −17 src/track.h
  48. +10 −0 tests/__init__.py
  49. +3 −17 tests/test_album.py
  50. +2 −16 tests/test_albumbrowser.py
  51. +4 −15 tests/test_artist.py
  52. +2 −16 tests/test_artistbrowser.py
  53. +0 −15 tests/test_containermanager.py
  54. +0 −16 tests/test_globals.py
  55. +0 −16 tests/test_link.py
  56. +5 −15 tests/test_playlist.py
  57. +0 −15 tests/test_playlistmanager.py
  58. +0 −16 tests/test_search.py
  59. +24 −15 tests/test_session.py
  60. +3 −17 tests/test_track.py
View
@@ -4,8 +4,11 @@
*.swp
*.wpr
*.wpu
+.coverage
MANIFEST
_build
build
dist
+nosetests.xml
spotify_appkey.key
+cover
View
@@ -1,5 +1,4 @@
include LICENSE *.rst
-include ez_setup.py
recursive-include src *.c *.h
View
@@ -14,7 +14,10 @@ apply for, and receive an API key from Spotify.
Project resources
=================
-- `Documentation <http://pyspotify.mopidy.com/>`_
+- `Documentation for the latest release
+ <http://pyspotify.mopidy.com/docs/master/>`_
+- `Documentation for the development version
+ <http://pyspotify.mopidy.com/docs/develop/>`_
- `Source code <http://github.com/mopidy/pyspotify>`_
- `Issue tracker <http://github.com/mopidy/pyspotify/issues>`_
- `Download development snapshot <http://github.com/mopidy/pyspotify/tarball/develop#egg=pyspotify-dev>`_
@@ -0,0 +1,15 @@
+{% extends "!layout.html" %}
+
+{% block footer %}
+{{ super() }}
+<script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+ try {
+ var pageTracker = _gat._getTracker("UA-15510432-2");
+ pageTracker._trackPageview();
+ } catch(err) {}
+</script>
+{% endblock %}
@@ -2,9 +2,8 @@ Album browsing
**************
.. currentmodule:: spotify
-Album browsers are created by the method
-:meth:`browse_album <Session.browse_album>` of a :class:`Session <Session>`
-object. They are iterable objects.
+Album browsers are created by :meth:`Session.browse_album` object. They are
+iterable objects.
The :class:`AlbumBrowser` class
@@ -2,9 +2,8 @@ Artist browsing
***************
.. currentmodule:: spotify
-Artist browsers are created by the method
-:meth:`browse_artist <Session.browse_artist>` of a :class:`Session <Session>`
-object. They are iterable objects.
+Artist browsers are created by :meth:`Session.browse_artist` object. They are
+iterable objects.
The :class:`ArtistBrowser` class
View
@@ -7,8 +7,8 @@ structured similarly to the `libspotify API documentation
.. module:: spotify
-All the classes and sub-modules of **pyspotify** are contained in the
-:mod:`spotify` parent module.
+All the classes and submodules of pyspotify are contained in the :mod:`spotify`
+parent module.
.. toctree::
@@ -27,4 +27,3 @@ All the classes and sub-modules of **pyspotify** are contained in the
user
toplist
inbox
-
@@ -4,9 +4,8 @@ Session handling
.. currentmodule:: spotify
The session handling is usually done by inheriting the
-:class:`SpotifySessionManager <spotify.managers.SpotifySessionManager>` class
-from the :mod:`manager` module.
-Then the manager's :meth:`connect` method calls the
+:class:`spotify.managers.SpotifySessionManager` class from the :mod:`manager`
+module. Then the manager's :meth:`connect` method calls the
:func:`spotify.connect` function.
.. function:: connect(session_manager)
View
@@ -2,6 +2,20 @@
Changes
=======
+v1.3 (2011-06-11)
+=================
+
+It has only been four days since the v1.2 release, but we would like to get the
+change from bytestrings to unicode objects released before more projects start
+using pyspotify, as this change is really backwards incompatible.
+
+- All strings returned by pyspotify has been changed from UTF-8 encoded
+ bytestrings to unicode objects.
+- Track autolinking enabled for all playlists.
+- Add :attr:`spotify.__version__` which exposes the current pyspotify version.
+ The API version of the libspotify used is already available as
+ :attr:`spotify.api_version`.
+
v1.2 (2011-06-07)
=================
View
@@ -11,7 +11,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+import sys, os, re
import distutils.command.build
from distutils.dist import Distribution
@@ -26,6 +26,11 @@
pyspotify_path = '../' + b.build_platlib
sys.path.insert(0, os.path.abspath(pyspotify_path))
+def get_version():
+ init_py = open('../spotify/__init__.py').read()
+ metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_py))
+ return metadata['version']
+
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
@@ -55,10 +60,10 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
-# The short X.Y version.
-version = '1.2'
# The full version, including alpha/beta/rc tags.
-release = '1.2'
+release = get_version()
+# The short X.Y version.
+version = '.'.join(release.split('.')[:2])
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
View
@@ -58,35 +58,38 @@ Arch Linux package
Install the ``pyspotify-git`` package from the AUR.
-Using Pip
----------
+Using Pip (latest stable release)
+---------------------------------
The ``pip`` program for installing Python packages is usually found is the
-``python-pip`` package of your linux distribution.
+``python-pip`` package of your Linux distribution.
-To install ``pyspotify``, run as root::
+To install ``pyspotify``, run::
- pip install -U pyspotify
+ sudo pip install -U pyspotify
To update an existing installation, simply use the same command.
+Using Pip (latest development version)
+--------------------------------------
+
+To install the very latest git version of pyspotify::
+
+ sudo pip install -U pyspotify==dev
+
Using setuptools (latest git version)
-------------------------------------
You will have first to clone the `git repository <http://github.com/mopidy/pyspotify>`_.
-On Ubuntu or other Debian-based distributions::
-
- python setup.py install --install-layout=deb
-
-On other::
+Then to install it::
- python setup.py install
+ sudo python setup.py install
Trying it out
=============
-Included with pyspotify is a simple program, `examples/jukebox.py`. Run this
+Included with pyspotify is a simple program, ``examples/jukebox.py``. Run this
with your credentials and access to an API key, and it will let you browse and
play from your playlists, conduct searches and play from Spotify URIs.
@@ -3,13 +3,12 @@ Managers
.. module:: spotify.manager
-The role of the *pyspotify* managers is to help the developper by abstracting
-basic operations of the spotify library. They include callbacks that you can
-implement if you wish to be notified of particular spotify events.
+The role of the pyspotify *managers* is to help the developer by abstracting
+basic operations of the Spotify library. They include callbacks that you can
+implement if you wish to be notified of particular Spotify events.
-The one you certainly want to use is the :class:`session manager
-<SpotifySessionManager>`, as it handles all login and other basic session
-operations.
+The one you certainly want to use is the :class:`SpotifySessionManager`, as it
+handles all login and other basic session operations.
.. toctree::
View
@@ -1,20 +1,4 @@
#!/usr/bin/env python
-#
-# $Id$
-#
-# Copyright 2009 Doug Winter
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
import cmd
import readline
@@ -78,7 +62,7 @@ def do_list(self, line):
playlist = self.jukebox.starred
for i, t in enumerate(playlist):
if t.is_loaded():
- print "%3d %s" % (i, t.name())
+ print "%3d %s - %s" % (i, t.artists()[0].name(), t.name())
else:
print "%3d %s" % (i, "loading...")
View
@@ -1,3 +1,7 @@
[nosetests]
-where=tests
-no-path-adjustment=1
+cover-html = 1
+cover-inclusive = 1
+cover-package = spotify
+no-path-adjustment = 1
+where = tests
+with-xunit = 1
View
@@ -2,6 +2,12 @@
from distutils.core import setup, Extension
import os
+import re
+
+def get_version():
+ init_py = open('spotify/__init__.py').read()
+ metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_py))
+ return metadata['version']
def fullsplit(path, result=None):
"""
@@ -77,7 +83,7 @@ def fullsplit(path, result=None):
setup(
name='pyspotify',
- version='1.2',
+ version=get_version(),
description='Python wrapper for libspotify',
long_description=open('README.rst').read(),
author='Doug Winter',
View
@@ -1,3 +1,4 @@
+__version__ = '1.3'
class SpotifyError(Exception):
pass
View
@@ -1,19 +1,3 @@
-# $Id$
-#
-# Copyright 2009 Doug Winter
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
import alsaaudio
class AlsaController(object):
Oops, something went wrong. Retry.

0 comments on commit ac8eb6e

Please sign in to comment.