AlexandrePTJ / mopidy-somafm

Provides a backend for playing music from somafm
MIT License
22 stars 9 forks source link

Port mopidy-somafm to Python 3 #32

Closed jodal closed 4 years ago

jodal commented 5 years ago

Hi Alexandre, long time no see!

With the recent Mopidy 3.0 alpha releases, Mopidy is finally ready for Python 3. In other words, we'd like all extensions, especially those packaged in Debian like this one is, to port to Python 3 as soon as possible.

The optimal procedure is:

  1. Depend on Mopidy >= 3.0.0a3.
  2. Set python_requires in setup.py to >= 3.7.
  3. Bump the major part of the version number.
  4. Port to Python 3.7+, drop support for Python 2.7.
  5. Release a release candidate to PyPI, so that one have to use the --pre flag to pip for it to be installed.
  6. Once Mopidy 3.0 final is released, release a final release to PyPI.

Alternatively, if you don't have any time or interest in this, since this extension is quite small and easy to test without paying for any subscriptions I'm open to having the extension transferred to the Mopidy organization, and we'll do the required work and release it. If you wan't to go this way:

  1. Transfer the repo to the mopidy organization.
  2. Give jodal and adamcik owner access in the PyPI collaboration settings.

You'll of course keep your privileges both for pushing to the Git repo and releasing to PyPI.

jodal commented 4 years ago

A third alternative: I can make a PR updating Mopidy-SomaFM to match the latest version of cookiecutter-mopidy-ext and get it running under Python 3. Then all you have to do is to give it a final test and release it to PyPI.

Let me know which way ahead you prefer :-)

AlexandrePTJ commented 4 years ago

I did changes on extension, but looks like Travis needs some updates too. Can you take a look on "migrate_py3" branch ?

jodal commented 4 years ago

It looks like your Travis setup is still running on Ubuntu 16.04 (xenial), which doesn't have python-tornado >= 4.4. We've switched to CircleCI for all the projects in the mopidy GitHub organization, so I don't have any recommendations for how to best configure Travis for Mopidy + Python 3.

I'd recommend switching to CircleCI as the builds are generally faster, and we're in full control of the test environment, as they build on Docker containers. We maintain our own containers (mopidy/ci-python:3.7 and mopidy/ci-python:3.8) with all system dependencies preinstalled, which both speeds up the builds further by not having to install them for every build, and makes it easy to improve the build infrastructure across all the extensions.

You can find ready-made CircleCI configuration in the cookiecutter and the steps required in the CircleCI UI are documented in my Mopidy Extension Upgrade Checklist.

AlexandrePTJ commented 4 years ago

Thanks for everything, it is updated.