Add Python 3 support

Issue #2856 resolved
Marshall Greenblatt created an issue

Python 2 is end-of-life and CEF scripts should be updated to work with both Python 2 and Python 3 (minimum version 3.4).

For reference, see http://python-future.org/compatible_idioms.html, python-modernize and 2to3.

Official response

  • Marshall Greenblatt reporter

    All CEF scripts have now been updated for Python 3 support. The bat/sh scripts won’t be switched to Python 3 until Chromium has completely transitioned to Python 3, at which point there will be no remaining dependencies on Python 2.

    Spotify build 79.1.24+g1dbdf7b+chromium-79.0.3945.117 and newer have been generated by running automate-git.py with Python 3.

Comments (44)

  1. Marshall Greenblatt reporter

    To install and run python-modernize on Windows using Chromium’s version of python3 bundled with depot_tools:

    # Install
    python3 -m pip install modernize
    
    # Run
    python3 -m modernize --no-six -w file.py
    

  2. Marshall Greenblatt reporter

    All CEF scripts have now been updated for Python 3 support. The bat/sh scripts won’t be switched to Python 3 until Chromium has completely transitioned to Python 3, at which point there will be no remaining dependencies on Python 2.

    Spotify build 79.1.24+g1dbdf7b+chromium-79.0.3945.117 and newer have been generated by running automate-git.py with Python 3.

  3. Marshall Greenblatt reporter

    Binary distributions built with Python 3 now appear correct as of version 79.1.27+gd2449e5+chromium-79.0.3945.117.

  4. Log in to comment