[Sugar-devel] Port to TelepathyGLib
James Cameron
quozl at laptop.org
Wed May 16 17:41:04 EDT 2018
Thanks for working on this.
As you may have seen in my post in the last hour, forks of software
dilute maintainership, and everyone is worse off.
As part of porting to Python 3, we need to port to TelepathyGLib as
well. This is because there is no maintained static binding of
Telepathy for Python 3.
If we were to bundle Telepathy inside Sugar, we would most likely lose
automatic maintenance of Telepathy. Downstream distribution packagers
know about this risk, and often give upstream projects a nudge about
it. An example is the Rsvg static binding that, while it was quite
trivial, became a hot topic and eventually caused our GTK+ 2 toolkit
to be dropped from Debian and Ubuntu, despite other GTK+ 2
applications remaining.
We may face other ports as well. We're yet to uncover them, and may
only uncover them by trying to run the code. I'm hoping we don't have
to port from static binding for D-Bus, but I won't know until we test
the code.
Don't worry about the 72 results of search;
1. many of those activities don't work now, so there would be no
significant gain from porting them,
2. some activities are not in https://github.com/sugarlabs/
3. best to concentrate on the "Fructose" set of demonstration
activities,
Thanks for demonstrating the port complexity in the toolkit
https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/389/commits/a6f2cdaca58bc737d825365afd7bd3d7f12c530c
Perhaps the patterns of change can be expressed as a sed(1) script and
added to your sugar-docs Port to Python 3 checklist? This will help
people like me who have activities to maintain.
On Thu, May 17, 2018 at 12:17:19AM +0530, Rahul Bothra wrote:
> Hi,
>
> I started understanding how Telepathy and DBus work, and porting our code to
> use their PyGI bindings instead of static bindings, and it looks like a big
> task.
> Also, GitHub search gives 72 results [1]https://github.com/search?p=5&q=
> org%3Asugarlabs+%22from+telepathy%22&type=Code&utf8=%E2%9C%93 for instances of
> telepathy
>
> Instead, Should we pack the static binding port of Telepathy inside
> Sugar-Toolkit. The only change that will then have to be made will be:
> "from telepathy.foo import bar" will have to be changed to "from
> sugar3.telepathy.foo import bar"
>
> Please suggest if there can be any disadvantages in following this approach ?
> (Sorry, if it is obvious)
>
> Regards
> Rahul Bothra (Pro-Panda)
>
> On Wed, May 16, 2018 at 3:56 AM, James Cameron <[2]quozl at laptop.org> wrote:
>
> On Tue, May 15, 2018 at 11:02:49PM +0530, Rahul Bothra wrote:
> > - Rahul will also contact upstream(s) of Telepathy to ask their
> > plans of a Python 3.x Telepathy version
>
> Telepathy upstream suggested using PyGObject API, available for both
> Python 2 and Python 3.
>
> [3]https://lazka.github.io/pgi-docs/#TelepathyGLib-0.12
>
> On Ubuntu 18.04 install package gir1.2-telepathyglib-0.12 and then
> this test passes;
>
> $ python2
> >>> from gi.repository import TelepathyGLib
>
> $ python3
> >>> from gi.repository import TelepathyGLib
>
> For the moment, development can happen with your static binding port
> of Telepathy, but we should not plan to rely on it, because
> downstreams already have a Python 3 Telepathy in the form of
> TelepathyGLib.
>
> So we must port.
>
> [4]https://github.com/orgs/sugarlabs/projects updated with new "Port to
> TelepathyGLib"
> [5]https://github.com/orgs/sugarlabs/projects/4
>
> <quote>
> Change from
>
> from telepathy.foo import bar
>
> to
>
> import gi
> gi.require_version('TelepathyGLib', '0.12')
> from gi.repository import TelepathyGLib
>
> Prerequisite for Port to Python 3.
> </quote>
>
> --
> James Cameron
> [6]http://quozl.netrek.org/
> _______________________________________________
> Sugar-devel mailing list
> [7]Sugar-devel at lists.sugarlabs.org
> [8]http://lists.sugarlabs.org/listinfo/sugar-devel
>
> References:
>
> [1] https://github.com/search?p=5&q=org%3Asugarlabs+%22from+telepathy%22&type=Code&utf8=%E2%9C%93
> [2] mailto:quozl at laptop.org
> [3] https://lazka.github.io/pgi-docs/#TelepathyGLib-0.12
> [4] https://github.com/orgs/sugarlabs/projects
> [5] https://github.com/orgs/sugarlabs/projects/4
> [6] http://quozl.netrek.org/
> [7] mailto:Sugar-devel at lists.sugarlabs.org
> [8] http://lists.sugarlabs.org/listinfo/sugar-devel
--
James Cameron
http://quozl.netrek.org/
More information about the Sugar-devel
mailing list