From caa60f33f5815d5da63b255450d14e1fff03714b Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Thu, 29 Mar 2018 10:01:03 +0200 Subject: [PATCH 1/5] Update copyright year --- docs/authors.rst | 2 +- docs/conf.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/authors.rst b/docs/authors.rst index 29d570e3..985db751 100644 --- a/docs/authors.rst +++ b/docs/authors.rst @@ -4,7 +4,7 @@ Authors ******* -Mopidy is copyright 2009-2017 Stein Magnus Jodal and contributors. Mopidy is +Mopidy is copyright 2009-2018 Stein Magnus Jodal and contributors. Mopidy is licensed under the `Apache License, Version 2.0 `_. diff --git a/docs/conf.py b/docs/conf.py index 20bed432..6eee42b2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -73,14 +73,14 @@ source_suffix = '.rst' master_doc = 'index' project = 'Mopidy' -copyright = '2009-2017, Stein Magnus Jodal and contributors' +copyright = '2009-2018, Stein Magnus Jodal and contributors' from mopidy.internal.versioning import get_version release = get_version() version = '.'.join(release.split('.')[:2]) # To make the build reproducible, avoid using today's date in the manpages -today = '2017' +today = '2018' exclude_trees = ['_build'] From 99d8a2124e7de1fa9ca74dc64f3dc9c75ea23d7d Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Thu, 29 Mar 2018 10:21:50 +0200 Subject: [PATCH 2/5] Fix new flake8 warnings --- mopidy/__main__.py | 2 +- mopidy/core/actor.py | 1 - mopidy/local/json.py | 1 - mopidy/m3u/playlists.py | 4 ++-- tests/core/test_actor.py | 2 +- tests/core/test_mixer.py | 1 + 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/mopidy/__main__.py b/mopidy/__main__.py index 7963900e..7cb5ab9f 100644 --- a/mopidy/__main__.py +++ b/mopidy/__main__.py @@ -15,7 +15,7 @@ try: except ImportError: pass -import pykka.debug +import pykka.debug # noqa: I100 from mopidy import commands, config as config_lib, ext from mopidy.internal import encoding, log, path, process, versioning diff --git a/mopidy/core/actor.py b/mopidy/core/actor.py index 03efd6a8..ad9acba9 100644 --- a/mopidy/core/actor.py +++ b/mopidy/core/actor.py @@ -8,7 +8,6 @@ import os import pykka import mopidy - from mopidy import audio, backend, mixer from mopidy.audio import PlaybackState from mopidy.core.history import HistoryController diff --git a/mopidy/local/json.py b/mopidy/local/json.py index 2e39b68b..7e26b6db 100644 --- a/mopidy/local/json.py +++ b/mopidy/local/json.py @@ -7,7 +7,6 @@ import re import sys import mopidy - from mopidy import compat, local, models from mopidy.internal import storage as internal_storage from mopidy.internal import timer diff --git a/mopidy/m3u/playlists.py b/mopidy/m3u/playlists.py index 28be28d9..fe83f663 100644 --- a/mopidy/m3u/playlists.py +++ b/mopidy/m3u/playlists.py @@ -34,7 +34,7 @@ def replace(path, mode='w+b', encoding=None, errors=None): (fd, tempname) = tempfile.mkstemp(dir=os.path.dirname(path)) try: fp = io.open(fd, mode, encoding=encoding, errors=errors) - except: + except Exception: os.remove(tempname) os.close(fd) raise @@ -43,7 +43,7 @@ def replace(path, mode='w+b', encoding=None, errors=None): fp.flush() os.fsync(fd) os.rename(tempname, path) - except: + except Exception: os.remove(tempname) raise finally: diff --git a/tests/core/test_actor.py b/tests/core/test_actor.py index c5da74d1..66e7ee9c 100644 --- a/tests/core/test_actor.py +++ b/tests/core/test_actor.py @@ -10,10 +10,10 @@ import mock import pykka import mopidy - from mopidy.core import Core from mopidy.internal import models, storage, versioning from mopidy.models import Track + from tests import dummy_mixer diff --git a/tests/core/test_mixer.py b/tests/core/test_mixer.py index 996b7c23..38ff091d 100644 --- a/tests/core/test_mixer.py +++ b/tests/core/test_mixer.py @@ -8,6 +8,7 @@ import pykka from mopidy import core, mixer from mopidy.internal.models import MixerState + from tests import dummy_mixer From efdf6704b8fd5646f5f9d335eb161fdfa3910ecf Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Thu, 29 Mar 2018 10:24:41 +0200 Subject: [PATCH 3/5] Ignore new pytest cache dir --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d5d8194c..c4a7825c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ .coverage .idea .noseids +.pytest_cache/ .tox MANIFEST build/ From 1f09ef6b843ec1c34f40b96e67060f4128041a34 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Thu, 29 Mar 2018 11:08:38 +0200 Subject: [PATCH 4/5] tests: Use pytest<3.3 to avoid breaking changes --- dev-requirements.txt | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 809a0038..512421e7 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -13,7 +13,7 @@ mock responses # Test runners -pytest +pytest<3.3.0 pytest-capturelog pytest-cov pytest-xdist diff --git a/tox.ini b/tox.ini index d5bed67d..6b4a05ed 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ commands = {posargs} deps = mock - pytest + pytest<3.3.0 pytest-capturelog pytest-cov pytest-xdist From 86e5e7d34729e0cb644e46d68af5c18348c94585 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Thu, 29 Mar 2018 15:59:40 +0200 Subject: [PATCH 5/5] Require Tornado < 5 Tornado 5 requires Python >= 2.7.9 because of improvements made to the `ssl` module in that version. Mopidy probably works with Tornado 5, but to keep tests running with Python 2.7.6 on Travis CI we don't support Tornado 5 for now. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d41c943d..0b96d025 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ setup( 'Pykka >= 1.1', 'requests >= 2.0', 'setuptools', - 'tornado >= 3.2', + 'tornado >= 3.2, < 5', # Tornado 5 requires Python >= 2.7.9 ], extras_require={'http': []}, entry_points={