[Sugar-devel] [GSoC] Porting To Python3

Peter Robinson pbrobinson at gmail.com
Tue May 6 05:57:19 EDT 2014


On Tue, May 6, 2014 at 10:00 AM, Daniel Narvaez <dwnarvaez at gmail.com> wrote:
> Obsoleting the gtk2 was an explicit decision. It's not that we don't care
> but we just don't have enough resources to maintain two toolkits.
>
> Completely breaking the API is really bad. It takes years for the
> applications to switch and many of them never do it. We have seen it with
> activities (and documentation) but, for example, it happened to the gtk
> toolkit itself, with major applications which have not been ported yet.
>
> In the gtk2->gtk3 case I think we was pretty much forced to break. The
> difference between the two GNOME stacks was too large, some gtk2 pieces was
> supposed to go away from distributions (I'm not sure if they did in
> practice), and introspection was a major advantage for our platform.

There were a number of reasons and the development of features that
were needed/wanted at the time was happening in the gtk3 and dependent
libraries space, there was also things like introspection that could
only really come to gst1 and various other advantages (I seem to
remember there's a doc in the wiki somewhere).

It's taken time but there's the ability to remove most of gtk2/gst0.10
and other bits now in Fedora 20 with gnome3. We could do most of that
too with sugar if the one or two core Activities make the jump (Record
and TurtleBlocks I'm looking at you!) and it would reduce our image
size quite a bit.

> Here we don't seem to be in the same situation. I'd expect the differences
> for the toolkit code to *not* be huge. The python2 ecosystem seems to be
> still very much alive. And I don't see the port improving our platform much.

Fedora and I believe a number of other distributions are now planning
the jump to python3 as the default python in the core distro in
upcoming releases. It's taken a while to pick up steam but it's
certainly something that will happen before long. Obviously 2.x will
be around for time to come but it's adding extra deps.

> It's not a clear cut decision of course, but my feeling is that a complete
> API break would hurt more than it helps at this time.

My understanding was that 2.7 was designed to ease the jump to python3
and in recent releases there's been some features added to ensure it's
more the case now so maybe it should be something that we ensure that
the 2.7 guidelines that are designed for transition to 3 are enforced
to ensure less work later.

> I should mention that supporting both python2 and python3 in
> sugar-toolkit-gtk3 won't come for free either because new code will have to
> be compatible with both. We can probably ensure that with unit tests, but
> it's a cost to consider. We could also allow new API to be python3 only and
> plan for a sugar4 toolkit with gtk4 (whenever that gets released).

It's in planning, see the recent Gnome designer gathering in Berlin
from last week.

> Seeing the diff of a quick and dirty port would help a lot to evaluate
> things here.
>
>
> On 6 May 2014 08:00, Sam Parkinson <sam.parkinson3 at gmail.com> wrote:
>>
>>
>> On May 6, 2014 9:47 AM, "Daniel Narvaez" <dwnarvaez at gmail.com> wrote:
>> >
>> > On 1 May 2014 14:42, kunal arora <kunalarora.135 at gmail.com> wrote:
>> >>
>> >> 4)Create a new Sugar-toolkit-gtk3-python3 from the old one and also
>> >> keep the Sugar-toolkit-gtk3 for activities that haven't yet ported to
>> >> Python3 and slowly deprecate it with time as more and more activities shift
>> >> to Python3.
>> >
>> >
>> > This sounds like a maintenance nightmare. Can we make sugar-toolkit-gtk3
>> > work with both python2 and python3 instead?
>>
>> Why would we need to maintain a py2 version; we don't maintain the gtk2
>> toolkit or even care to put it on GitHub.
>
>
>
>
> --
> Daniel Narvaez
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>


More information about the Sugar-devel mailing list