Skip to content

Port Mopidy to Python 3 #779

@jodal

Description

@jodal

Python 3 is the future of Python, it is widely available on the environments Mopidy is deployed on, and I'm quite interested in being able to use asyncio, which requires Python 3.3+. There's nothing outside the Mopidy project blocking us from moving to Python 3.

This is the master bug to track our way towards running Mopidy on Python 3.

  • Dependencies:
    • Pykka supports Python 2.6+, 3.2+.
    • Tornado supports Python 2.6+, 3.2+.
    • GStreamer:
  • Move code style towards being Python 2+3 compatible:
    • flake8 warning clean code.
    • Drop support for all Python versions older than 2.7.
    • Use from __future__ import unicode_literals everywhere and mark binary strings with b'foo'.
    • Selectively fix portability issues identified by the 2to3 tool.
  • Development support:
    • Use tox to run tests, so we can easily add Python 3 testing in parallel with Python 2.7.
  • Mopidy-Spotify:
    • Implement new libspotify binding, pyspotify 2, which supports Python 2.7, 3.2+.
    • Reimplement Mopidy-Spotify on top of pyspotify 2.
  • Mopidy-MPRIS:
    • python-indicate bindings to libindicate can be replaced with PyGI.
    • python-dbus can maybe be replaced by GDBus through PyGI.
  • Extension ecosystem:
    • Use tox as test runner in cookiecutter-mopidy-ext to be ready to start running tests on Python 3 too.
    • Send pull requests/create issues for Python 2+3 support in all extensions when Mopidy itself works on Python 2+3.
  • Once ~all extensions supports Python 2+3, drop Python 2 support in Mopidy.
  • Remove Python 2isms.
  • Enjoy new Python 3 features, like asyncio.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions