Release v2.2.2

This commit is contained in:
Stein Magnus Jodal 2018-12-29 17:06:58 +01:00
commit e9f8245e32
10 changed files with 28 additions and 17 deletions

View File

@ -1,10 +1,12 @@
sudo: required dist: xenial
dist: trusty
language: python language: python
python: python:
- "2.7_with_system_site_packages" - "2.7"
virtualenv:
system_site_packages: true
env: env:
- TOX_ENV=py27 - TOX_ENV=py27

View File

@ -8,8 +8,11 @@ include LICENSE
include MANIFEST.in include MANIFEST.in
include tox.ini include tox.ini
recursive-include .github *
recursive-include docs * recursive-include docs *
prune docs/_build prune docs/_build
prune docs/.doctrees
recursive-include extra * recursive-include extra *

View File

@ -4,11 +4,15 @@ Changelog
This changelog is used to track all major changes to Mopidy. This changelog is used to track all major changes to Mopidy.
v2.2.2 (UNRELEASED)
v2.2.2 (2018-12-29)
=================== ===================
Bug fix release. Bug fix release.
- HTTP: Fix hang on exit due to change in Tornado v5.0 IOLoop. (Fixes:
:issue:`1715`, PR: :issue:`1716`)
- Files: Fix crash due to mix of text and bytes in paths that come from - Files: Fix crash due to mix of text and bytes in paths that come from
``$XDG_CONFIG_HOME/user-dirs.dirs``. (Fixes: :issue:`1676`, :issue:`1725`) ``$XDG_CONFIG_HOME/user-dirs.dirs``. (Fixes: :issue:`1676`, :issue:`1725`)

View File

@ -14,4 +14,4 @@ if not (2, 7) <= sys.version_info < (3,):
warnings.filterwarnings('ignore', 'could not open display') warnings.filterwarnings('ignore', 'could not open display')
__version__ = '2.2.1' __version__ = '2.2.2'

View File

@ -100,20 +100,21 @@ class HttpServer(threading.Thread):
self.app = None self.app = None
self.server = None self.server = None
self.io_loop = None
def run(self): def run(self):
self.app = tornado.web.Application(self._get_request_handlers()) self.app = tornado.web.Application(self._get_request_handlers())
self.server = tornado.httpserver.HTTPServer(self.app) self.server = tornado.httpserver.HTTPServer(self.app)
self.server.add_sockets(self.sockets) self.server.add_sockets(self.sockets)
tornado.ioloop.IOLoop.instance().start() self.io_loop = tornado.ioloop.IOLoop.current()
self.io_loop.start()
logger.debug('Stopped HTTP server') logger.debug('Stopped HTTP server')
def stop(self): def stop(self):
logger.debug('Stopping HTTP server') logger.debug('Stopping HTTP server')
tornado.ioloop.IOLoop.instance().add_callback( self.io_loop.add_callback(self.io_loop.stop)
tornado.ioloop.IOLoop.instance().stop)
def _get_request_handlers(self): def _get_request_handlers(self):
request_handlers = [] request_handlers = []

View File

@ -38,7 +38,7 @@ def load_protocol_modules():
def INT(value): # noqa: N802 def INT(value): # noqa: N802
"""Converts a value that matches [+-]?\d+ into and integer.""" r"""Converts a value that matches [+-]?\d+ into and integer."""
if value is None: if value is None:
raise ValueError('None is not a valid integer') raise ValueError('None is not a valid integer')
# TODO: check for whitespace via value != value.strip()? # TODO: check for whitespace via value != value.strip()?
@ -46,7 +46,7 @@ def INT(value): # noqa: N802
def UINT(value): # noqa: N802 def UINT(value): # noqa: N802
"""Converts a value that matches \d+ into an integer.""" r"""Converts a value that matches \d+ into an integer."""
if value is None: if value is None:
raise ValueError('None is not a valid integer') raise ValueError('None is not a valid integer')
if not value.isdigit(): if not value.isdigit():

View File

@ -3,7 +3,8 @@ application-import-names = mopidy,tests
exclude = .git,.tox,build,js,tmp exclude = .git,.tox,build,js,tmp
# Ignored flake8 warnings: # Ignored flake8 warnings:
# - E402 module level import not at top of file # - E402 module level import not at top of file
ignore = E402 # - W504 line break after binary operator
ignore = E402, W504
[wheel] [wheel]
universal = 1 universal = 1

View File

@ -42,7 +42,7 @@ def watcher(task, *args, **kwargs):
task(*args, **kwargs) task(*args, **kwargs)
try: try:
run( run(
'inotifywait -q -e create -e modify -e delete ' r'inotifywait -q -e create -e modify -e delete '
'--exclude ".*\.(pyc|sw.)" -r docs/ mopidy/ tests/') r'--exclude ".*\.(pyc|sw.)" -r docs/ mopidy/ tests/')
except KeyboardInterrupt: except KeyboardInterrupt:
sys.exit() sys.exit()

View File

@ -23,7 +23,7 @@ class IsA(object):
try: try:
return isinstance(rhs, self.klass) return isinstance(rhs, self.klass)
except TypeError: except TypeError:
return type(rhs) == type(self.klass) # flake8: noqa return type(rhs) == type(self.klass) # noqa
def __ne__(self, rhs): def __ne__(self, rhs):
return not self.__eq__(rhs) return not self.__eq__(rhs)

View File

@ -161,7 +161,7 @@ class IssueGH69RegressionTest(protocol.BaseTestCase):
class IssueGH113RegressionTest(protocol.BaseTestCase): class IssueGH113RegressionTest(protocol.BaseTestCase):
""" r"""
The issue: https://github.com/mopidy/mopidy/issues/113 The issue: https://github.com/mopidy/mopidy/issues/113
How to reproduce: How to reproduce:
@ -174,11 +174,11 @@ class IssueGH113RegressionTest(protocol.BaseTestCase):
def test(self): def test(self):
self.core.playlists.create( self.core.playlists.create(
u'all lart spotify:track:\w\{22\} pastes') r'all lart spotify:track:\w\{22\} pastes')
self.send_request('lsinfo "/"') self.send_request('lsinfo "/"')
self.assertInResponse( self.assertInResponse(
u'playlist: all lart spotify:track:\w\{22\} pastes') r'playlist: all lart spotify:track:\w\{22\} pastes')
self.send_request( self.send_request(
r'listplaylistinfo "all lart spotify:track:\\w\\{22\\} pastes"') r'listplaylistinfo "all lart spotify:track:\\w\\{22\\} pastes"')