pygtk2 to pygobject/introspection

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

pygtk2 to pygobject/introspection

Giuseppe Penone
Did anybody notice that the function

gtk_clipboard_set_with_data ()

is missing from the bindings?

<method name="set_with_data"
              c:identifier="gtk_clipboard_set_with_data"
              introspectable="0">

This is not a binding, this is a disaster.

_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: pygtk2 to pygobject/introspection

Tomeu Vizoso-3
On Thu, Jun 30, 2011 at 12:56, Giuseppe Penone <[hidden email]> wrote:

> Did anybody notice that the function
>
> gtk_clipboard_set_with_data ()
>
> is missing from the bindings?
>
> <method name="set_with_data"
>               c:identifier="gtk_clipboard_set_with_data"
>               introspectable="0">
>
> This is not a binding, this is a disaster.

These bindings are developed by the community, which means things get
done only if people step up and help each other.

If things aren't as stable as they could is because most of the PyGTK
users have stayed aside and pretended there were someone maintaining
the old bindings. For years.

I'm sorry if you have just discovered that PyGObject is developed by
application authors just like you, who happen to have decided to give
back a bit to the community.

Regards,

Tomeu

> _______________________________________________
> pygtk mailing list   [hidden email]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: pygtk2 to pygobject/introspection

Giuseppe Penone
I understand that the bindings are developed from people like me,
in the free time, but understand that like me there are many other people that spend a lot of time trying to
port their code and finally they have to give up because many functions
are not implemented in the porting.

If it would be clear that it was full of non introspectable functions
(up and working in gtk3 as well as pygtk2, absent in the bindings)

I would rather spend the time to rewrite the code of my apps directly in gtk3.

Anyway I'm sorry if I offended somebody, I apologise.
Regards,
Giuseppe.



On Thu, Jun 30, 2011 at 13:18, Tomeu Vizoso <[hidden email]> wrote:
On Thu, Jun 30, 2011 at 12:56, Giuseppe Penone <[hidden email]> wrote:
> Did anybody notice that the function
>
> gtk_clipboard_set_with_data ()
>
> is missing from the bindings?
>
> <method name="set_with_data"
>               c:identifier="gtk_clipboard_set_with_data"
>               introspectable="0">
>
> This is not a binding, this is a disaster.

These bindings are developed by the community, which means things get
done only if people step up and help each other.

If things aren't as stable as they could is because most of the PyGTK
users have stayed aside and pretended there were someone maintaining
the old bindings. For years.

I'm sorry if you have just discovered that PyGObject is developed by
application authors just like you, who happen to have decided to give
back a bit to the community.

Regards,

Tomeu

> _______________________________________________
> pygtk mailing list   [hidden email]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>


_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: pygtk2 to pygobject/introspection

Tomeu Vizoso-3
On Thu, Jun 30, 2011 at 13:23, Giuseppe Penone <[hidden email]> wrote:
> I understand that the bindings are developed from people like me,
> in the free time, but understand that like me there are many other people
> that spend a lot of time trying to
> port their code and finally they have to give up because many functions
> are not implemented in the porting.

The point is that once someone contributes a fix, the rest will have
it fixed. As you say, PyGTK is used by a lot of people, and if just a
small part of them had joined the effort when it was clear it was
needed, we would have reached maturity for GNOME 3 or even earlier.

Also, PyGObject+introspection won't be stable until a critical mass of
application authors port their apps and contribute fixes. Telling
people to wait because it's not ready yet would be the same as saying
them to switch to another language or toolkit.

> If it would be clear that it was full of non introspectable functions
> (up and working in gtk3 as well as pygtk2, absent in the bindings)
>
> I would rather spend the time to rewrite the code of my apps directly in
> gtk3.

Gtk+ certainly has a bigger community of contributors on which you can
piggy back, but sooner or later you will find that in order to get the
most of it you have to become a contributor.

Besides practical benefits, it's the right thing to share the work
with whom you share the wealth.

I think this should have been clear already to anybody who decides to
use community-developed software.

Regards,

Tomeu

> Anyway I'm sorry if I offended somebody, I apologise.
> Regards,
> Giuseppe.
>
>
>
> On Thu, Jun 30, 2011 at 13:18, Tomeu Vizoso <[hidden email]> wrote:
>>
>> On Thu, Jun 30, 2011 at 12:56, Giuseppe Penone <[hidden email]> wrote:
>> > Did anybody notice that the function
>> >
>> > gtk_clipboard_set_with_data ()
>> >
>> > is missing from the bindings?
>> >
>> > <method name="set_with_data"
>> >               c:identifier="gtk_clipboard_set_with_data"
>> >               introspectable="0">
>> >
>> > This is not a binding, this is a disaster.
>>
>> These bindings are developed by the community, which means things get
>> done only if people step up and help each other.
>>
>> If things aren't as stable as they could is because most of the PyGTK
>> users have stayed aside and pretended there were someone maintaining
>> the old bindings. For years.
>>
>> I'm sorry if you have just discovered that PyGObject is developed by
>> application authors just like you, who happen to have decided to give
>> back a bit to the community.
>>
>> Regards,
>>
>> Tomeu
>>
>> > _______________________________________________
>> > pygtk mailing list   [hidden email]
>> > http://www.daa.com.au/mailman/listinfo/pygtk
>> > Read the PyGTK FAQ: http://faq.pygtk.org/
>> >
>
>
_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: pygtk2 to pygobject/introspection

Dieter Verfaillie-2
In reply to this post by Giuseppe Penone
Quoting "Giuseppe Penone" <[hidden email]>:
> Did anybody notice that the function
> GTK_CLIPBOARD_SET_WITH_DATA ()
> is missing from the bindings?
>
> <method name="set_with_data"
>               c:identifier="gtk_clipboard_set_with_data"
>               introspectable="0">

If you start looking into the .gir files, you'll notice loads
of stuff is marked as non-introspectable. And not only in GTK+...

PyGTK used to have the same problem (loads of stuff was present
in the .defs file where no wrapper could be automatically generated).
It did have the advantage of being able to provide overrides written
in C. History has proven that to be time consuming, tedious and
generally unthankful work, so PyGTK maintenance eventually slowed
down almost to a complete stop (many thanks to those who continued
anyway!).

 From what I remember reading on various places, with the gi-enabled
PyGObject it was decided to:
- write overrides in Python (in the hopes of attracting more
   contributors, which seems to slowly start paying of)
- fix the underlying libraries (like GTK+ in this case) by
   requesting/contributing bindable API
instead of pretending everything to be just fine and continue writing
glue overrides in C.

Getting these fixes in, reeducating C library authors to provide
bindable API (or fix it yourself and contribute the patch) and
generally making PyGObject+gi as pleasant to use as PyGTK used to
be is going to take time though. Lot's of time. This does *not*
mean we PyGTK users should sit still and wait to port our
software to PyGObject+gi. That would only slow development down
yet again.

In short, don't be afraid to get your hands dirty :)

mvg,
Dieter


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: pygtk2 to pygobject/introspection

Timo List
On 30-06-11 14:12, Dieter Verfaillie wrote:
>
> In short, don't be afraid to get your hands dirty :)
In response to this, I'm actually willing to help out, but...
What skills are needed? Should I have some specific knowledge?
And if I can help, where should I start?

Cheers,
Timo

>
> mvg,
> Dieter
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> _______________________________________________
> pygtk mailing list   [hidden email]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/

_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: pygtk2 to pygobject/introspection

Giuseppe Penone
+1: provide us a tutorial so that we can learn how to add missing binded functions ourself and then provide the patch.


On Thu, Jun 30, 2011 at 20:19, Timo <[hidden email]> wrote:
On 30-06-11 14:12, Dieter Verfaillie wrote:

In short, don't be afraid to get your hands dirty :)
In response to this, I'm actually willing to help out, but...
What skills are needed? Should I have some specific knowledge?
And if I can help, where should I start?

Cheers,
Timo


mvg,
Dieter


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: pygtk2 to pygobject/introspection

Dieter Verfaillie-2
In reply to this post by Timo List
On 30/06/2011 20:19, Timo wrote:
> On 30-06-11 14:12, Dieter Verfaillie wrote:
>> In short, don't be afraid to get your hands dirty :)
> In response to this, I'm actually willing to help out, but...

Hard questions to answer. So, I've been using PyGTK for years and
decided to do something about the situation of PyGTK on Windows
at the end of last year. I think that piece of work was reasonably
well received and that motivated me enough to try and get the gi
stack working, also on Windows. That said, I consider myself nothing
more than a user, but have decided to contribute what and when I
can as long as it is fun to do so. So from that point of view,
here goes:

> What skills are needed?

Depends on what you want to achieve, really. I'd say any kind of
help is going to be more than welcome. Be it helping people
on this or other lists, documentation (a real sore point with the
new introspected bindings), demos/examples, fixing bugs, new features,
making things work on currently unsupported platforms, tools that
can help with any of the above, etc.

Any of those requires a different skill-set, but you don't have
to be "the world's expert" on any specific topic to be able to
help. Observe and learn as you go, that's what I'm doing ;)

The most basic skill would be to know how to submit a patch for
review, I guess. That's documented here:
https://live.gnome.org/GnomeLove/SubmittingPatches

> Should I have some specific knowledge?

That again depends on what you need or want to do.

But don't let the lack of knowledge in a certain area scary you
into not doing anything about it. Just try and should it break,
take a step back, learn and try again!

Heh, for example: my first "autotools" related patch was described
as "interesting" by the hacker then reviewing it. Looking at it
now, 6 months later, I can say: "Yeah, correct, my patch was
completely worthless!". Embarrassing? Sure! Oh-no, it's recorded
for all eternity on bugzilla/mailinglist/whatever! Who cares?
I'm still grateful for the review and in the long run, it wasn't
time that went wasted as I'm more comfortable with Makefile.am's
and what-not to try and help out getting the glib/gi/pygobject
stack working on Windows.

> And if I can help, where should I start?

The question is never *if* someone can help. The hard part is the
*where to start*. A good set of questions to ask yourself, known
as "the scratching an itch technique", could be: Is there something
with the current state of things that bugs you? Have you looked
at why it bugs you? Are you willing to put time into figuring out
how you can make it stop bugging you?

If you've got a yes on each question, you've found the perfect
place to start!

Some examples of things I've noticed or thought about but haven't
had the time yet to get my hands dirty on (being busy trying to get
the gi stack working on Windows):

- Compare PyGobjects [1] with PyGTK's [2] demo directories. There
  are still things missing. Maybe even compare with gtk-demo from
  GTK+. I'm sure we're lagging behind in some of the demo's. This
  might be an excellent area to get started?
- I've played with the idea to check if (ab)using Python's lib2to3
  could be used to create an improved pygi-convert script...
- PyGTK has stellar documentation, but the documentation fragments
  embedded in the .gir files (taken from the C sources and
  also used in the GTK+ reference manual) can be terse at times.
  Can we reuse/rewrite parts of what we have in PyGTK and put it
  in GTK+ before it has bit-rotted beyond being useless? Everybody
  using GTK+ would benefit, not only us PyGObject users!
- Revive the tutorial, PyGObject style. But don't try to be an
  encyclopedia on every widget in existence or risk it being
  abandoned again. And maybe make it easier to contribute to by
  using something Python hackers are more familiar with like
  Sphinx instead of docbook xml?
- Take a look at http://sourceforge.net/projects/girlook and see
  how it can be made easier to use?
- ...

With a little bit of imagination, there's enough that can be done
to fill several lifetimes!

But be careful not to lose motivation when nobody answers a
question, looks at the patch you carefully crafted and attached
to a bug report, etc. Instead, be grateful when someone does
take the time to actually do so. Remember, most (if not all) people
involved with these projects are doing so in their own free time!

mvg,
Dieter

[1] http://git.gnome.org/browse/pygobject/tree/demos/gtk-demo/demos
[2] http://git.gnome.org/browse/pygtk/tree/examples/pygtk-demo/demos
_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: pygtk2 to pygobject/introspection

Just Fill Bugs
In reply to this post by Giuseppe Penone
On 07/01/2011 04:35 AM, Giuseppe Penone wrote:
> +1: provide us a tutorial so that we can learn how to add missing binded
> functions ourself and then provide the patch.
>

Take a look at http://live.gnome.org/GObjectIntrospection/Annotations,
kinda simple.

Then looking at clipboard.c in gtk+ source, seems the
gtk_clipboard_set_with_data was annotated but forcibly
skipped(introspectable = 0), no idea why.

http://git.gnome.org/browse/gtk+/tree/gtk/gtkclipboard.c#n657

_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Reply | Threaded
Open this post in threaded view
|

Re: pygtk2 to pygobject/introspection

Tomeu Vizoso-3
On Fri, Jul 1, 2011 at 05:48, Just Fill Bugs <[hidden email]> wrote:

> On 07/01/2011 04:35 AM, Giuseppe Penone wrote:
>>
>> +1: provide us a tutorial so that we can learn how to add missing binded
>> functions ourself and then provide the patch.
>>
>
> Take a look at http://live.gnome.org/GObjectIntrospection/Annotations, kinda
> simple.
>
> Then looking at clipboard.c in gtk+ source, seems the
> gtk_clipboard_set_with_data was annotated but forcibly
> skipped(introspectable = 0), no idea why.
>
> http://git.gnome.org/browse/gtk+/tree/gtk/gtkclipboard.c#n657

You can see as well the commit log that included that change:

http://git.gnome.org/browse/gtk+/commit/gtk/gtkclipboard.c?id=374e76a19dac87676995356f6daacb10f4bb6e36

And ask Pavel why that method is introspectable and what alternative
there exists. If there isn't, we need to add API to Gtk+ that is
binding-friendly.

Regards,

Tomeu

> _______________________________________________
> pygtk mailing list   [hidden email]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/