#220 Use Python 3 for plugins

Unstable
open
nobody
None
5
2013-06-01
2013-04-30
No

Sooner or later, all Python code should be moved to Python 3. It has many benifits, most notably unicode strings. It makes sense for a Python code base that isn't already large to use Python 3 from the beginning.

Here is a patch to change Liferea plugins to Python 3, and to enable that loader instead of the Python 2 one. Fixing the plugins involved: fixing the indentation so that it only uses spaces, not tabs; changing print statement to the Python 3 print function. See commit messages for more info.

I've tested the Media Player and it works just as well as before. Unfortunately, I haven't been able to really test the Gnome Keyring plugin, since I don't use either Gnome Keyring or use any password protected feeds, but it loads well. I'd be happy to take a look if there are regressions.

Don't know what you prefer, either apply the attached patch (applies against commit 3e0b2e162a12dfa0194b9fe84a1e395513bf9c21) or do

git pull https://github.com/skagedal/liferea.git python3

This is a branch with three new commits, browse here.

1 Attachments

Discussion

  • Allright, a new patch set.

    I've reconsidered this. While Python 3 is available on most modern systems, I discovered that libpeas added the "python3" loader rather recently. It doesn't really make sense to make installation more difficult for users of one year old distributions for no user visible gain.

    But it does make sense to fix the indentation and to prepare the code for a future Python 3 switch. These changes should be harmless.

    I've split it as two patches; this makes changes easier to follow since the indentation patch touches a lot of code. Applies after the GStreamer patch for the media player, which I think is more urgent.

     
    Last edit: Simon Kågedal Reimer 2013-06-01
  •  
    Last edit: Simon Kågedal Reimer 2013-06-01