Re: What is the significance of pygtk.require('2.0')?



----- "Robert Park" <rbpark exolucere ca> wrote:

> On Thu, Oct 28, 2010 at 1:58 AM, Tomeu Vizoso <tomeu tomeuvizoso net>
> wrote:
> > On Thu, Oct 28, 2010 at 02:29, Robert Park <rbpark exolucere ca>
> wrote:
> >> And in fact, if I remove the 'import pygtk' and 'pygtk.require'
> from
> >> my program, it continutes to operate totally normally.
> >>
> >> Can somebody clarify the meaning of the pygtk import statement and
> >> whether or not it is still relevant while using the
> >> gobject-introspection bindings?
> >
> > If anybody is able to clarify that, please update
> > https://bugzilla.gnome.org/show_bug.cgi?id=621525 .
> >
> > I'm not sure what can be done without screwing current users.
> 
> Well, obviously people who have not yet ported to the introspection
> bindings would continue to use "import pygtk" and continue to use
> pygtk without "getting screwed".
> 
> But, in my limited understanding (as a developer of applications who
> _uses_ bindings but not a _developer_ of bindings), it seems to me
> that "import pygtk" is completely irrelevant and obsoleted by the
> introspection bindings. It seems to me that it can be safely dropped
> from the program without impacting the operation of the program at
> all. Am I wrong? Is there something subtle it does that I'm not aware
> of? What does it do?
> 
> By the look of that bug, it seemed to be relevant at some point in
> time back when pygi was only for gtk, but now that pygi/pygobject
> have
> been merged and cover the whole range of introspection stuffs, it
> just
> seems to be irrelevant.
> 
> (if it matters, I'm using the stock ubuntu maverick packages for
> everything. is it possible that ubuntu has packaged this in such a
> way
> that gi is in the pythonpath by default, but non-ubuntu users will
> require the 'pygtk.require' stuff in order for it to work?)
> 
> -- 
> http://exolucere.ca
> _______________________________________________
> python-hackers-list mailing list
> python-hackers-list gnome org
> http://mail.gnome.org/mailman/listinfo/python-hackers-list


It has to do with setting up paths and dual installs for Gtk 1.0 and 2.0.  Unfortunately on some systems we might end up breaking modules and apps since a lot of static bindings install into that directory.  We still have to support it because pygi will only be for Gtk 3.0 and so there will be a lot of legacy code running around.  As for you needing to add them to new code, I don't think it is necessary though it may be on some systems.  I wonder if we can install into the normal namespace and have links into the pygtk directory for legacy support or even recommend two installs, turning off introspection support for legacy support in order to keep it as stable as possible. In any case paths are important to keep consistent for legacy support since it is hard to know what will break if you move things around.  If we can emulate the old paths while moving the modules out then I say we do it.

--
John (J5) Palmieri
Software Engineer
Red Hat, Inc.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]