Yes, gnome-music is ported again, and this time, it’s to Python.
We ported GNOME Music because we can’t debug, we can’t profile it, there’s not enough documentation, we can’t use threads, no coding style checker, and some other things we can’t do with GJS.
All of the active developers and code contributors present when we talked about the port has experience working with Python (I’m the least experienced in Python though), and everyone in that said time agreed to port to it.
We started the port around July 12. We set up a repository for the port in GitHub (https://github.com/gnome-prototypes-team/gnome-music) then everyone created a pull request once they are finished working on something.
Vadim Rutkovsky added a service hook to Travis CI to make sure the code follows the coding style. Eslam Mostafa started the porting of some of the sources, then others started porting the remaining files afterwards. I worked on the porting of albumArtCache (partially), query and grilo modules.
I haven’t slept during the time between July 12 and July 13, because of answering some problem sets (school work) and porting to Python. That’s the first time I went to school without any sleep XD. Fortunately, I only have one class during Saturdays, but I wasn’t able to go to my part time job.
Most of the fixing on the ported code are done by Vadim and Seif Lotfy, then when gnome-music finally runs again, the students joined us too and started porting their bug fixes to Python.
Then finally, on July 24, Ignacio Casal Quinteiro merged our work to GNOME’s Git repository.
The result? GNOME Music is now more stable and faster! We used profilers to find the parts where a lot of memory and/or time is being wasted. The code now is easier to read too.
The only problems I encountered (and I could remember :D) while porting to Python is that the lambda’s are one liners only and GDBus in PyGObject doesn’t support DBus servers yet. I used python3-dbus (or also known as dbus-python, etc.) to be able to port MPRIS, and separated the methods to a new module.
Of course, Vala is still my favorite programming language :P.
Thanks to Vadim Rutkovsky, Seif Lotfy and Guillaume Quintard for teaching me a lot of things about Python and cleaning up the mess I made :D.
Anyway, this post is getting too long, I’ll just blog the other things next time! 😀
Finally, this post got published, it waited for a month to be published…