[Sugar-devel] Migration to Python 3

Sam Parkinson sam.parkinson3 at gmail.com
Sat Jul 16 19:14:26 EDT 2016

On Sun, Jul 17, 2016 at 3:55 AM, Sebastian Silva 
<sebastian at fuentelibre.org> wrote:
> El 29/06/16 a las 14:03, Dave Crossland escribió:
>>  On 29 June 2016 at 14:22, Sebastian Silva 
>> <sebastian at somosazucar.org> wrote:
>>>  Really Sugar Labs doesn't distribute operating system releases, 
>>> it's up to
>>>  distributors.
>>  If 0.112 is 100% Python 3, how would OLPC or others make images that
>>  support running python2 and python3 activities in the same Sugar?
> It's hard to keep up with you but I'll try ;-)
> By default distributions will decide which python to use.
> If an activity is ported they can change the activity.info to use
> python3. Really it shouldn't be a problem.
> Note that python2.7 is supposed to have support till 2020.
> Python3 is a much nicer language especially if you use non-english
> characters since it fully supports utf-8 by default.
> The real issue is what to do about telepathy. I wonder how many use
> cases are covered by it.

Well, the way that we use telepathy in sugar makes me cringe inside.  
It is really the most terrible and verbose api for our use case.  All 
of the telepathy code is like black magic.  I spent a few hours trying 
to figure out how to fix [1], and I got close to nowhere.  The 
telepathy code is very hard to understand.  It's actually like an 
onion.  Every layer you peel back makes you cry more, and we just keep 
layering and layering the abstractions on (eg. CollabWrapper).

I've been working with Abhijit on his GSoC project to use telepathy for 
collaboration for the "projects" in the journal.  Just creating a text 
channel to communicate via has been impossible so far.  Abhijit has 
spend weeks trying to do it, and i have attempted to hack it too.  But 
telepathy is very hard to debug.  And it is really buggy - creating a 
text channel between 2 people results in a segfault in telepathy salut, 
despite what seems to be 100% correct usage of the api.  It's crazy.

But from a porting perspective, telepathy is fine.  Python telepathy is 
made up of 2 things:  a tone of string constants (easy to port) and a 
few wrapper classes that are subclasses of the "dbus" objects.  It is 
pure python - so it should be an easy thing to port.

So I am sorry for constantly conflating these 2 things.  Telepathy is a 
pain to develop with, BUT it will be easy to port to python 3.

Maybe we target a collaboration re-write for next release :P


> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160717/413ae7aa/attachment.html>

More information about the Sugar-devel mailing list