After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 686450 - port to python 3
port to python 3
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: general
HEAD
Other Linux
: Normal minor
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks: python3
 
 
Reported: 2012-10-19 09:16 UTC by alex
Modified: 2013-10-13 08:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
python 3 patch (66.13 KB, patch)
2012-10-19 09:16 UTC, alex
none Details | Review
Fixes remaining Python 3 issues (7.23 KB, patch)
2013-09-23 11:17 UTC, Bohuslav "Slavek" Kabrda
committed Details | Review

Description alex 2012-10-19 09:16:11 UTC
Created attachment 226801 [details] [review]
python 3 patch

Slowly rhythmbox should be ported to python 3

I used the official python 2 to python 3 porter for rhythmbox and ran it over the python files. (see patch)

Sadly somehow it's still python 2 (at least the debug shell says so). But this need to be done in a second step.

Ah, and before I forgot it:
I use archlinux where python 3 is default. Executing PYTHON=/usr/bin/python3 before running the autogen.sh script is maybe needed.
Comment 1 Nirbheek Chauhan 2013-03-05 02:26:49 UTC
Do we want to port exclusively to Python3 or support both Python 2 and 3 by running 2to3 during build?
Comment 2 Jonathan Matthew 2013-03-05 23:51:26 UTC
Running 2to3 during build sounds like a terrible idea to me.
Comment 3 Nirbheek Chauhan 2013-03-06 00:05:59 UTC
(In reply to comment #2)
> Running 2to3 during build sounds like a terrible idea to me.

If one wants to support both Python 2 and Python 3, that's the official way to do it: 

"The official way to support both Python 2 and Python 3 is to maintain the code in a version for Python 2 and convert it to Python 3 with the 2to3 tool." ~ http://python3porting.com/2to3.html

Personally, I agree that 2to3 would get ugly really fast, and so RB should just migrate to Python 3. :)
Comment 4 Bohuslav "Slavek" Kabrda 2013-09-23 11:17:37 UTC
Created attachment 255556 [details] [review]
Fixes remaining Python 3 issues

Hi guys,
AFAICS there are still some remaining Python 3 issues, so I fixed them in attached patch. Please note, that they only work with Python 3, not Python 2 (but the previous commits made by others already make Rhythmbox only work with Python 3 anyway, so I guess this is ok).
Comment 5 Jonathan Matthew 2013-10-13 08:52:41 UTC
Thanks for the patch. I took out the zeitgeist bit, since I had more extensive patches for that elsewhere, and pushed the rest as commit a988e23.