I’ve been tracking down some crashers and refcount issues as well as cleaning up the Python 3 support. Next release will also remove all of the file conflicts associated with PyGObject-2.28 parallel installs. We also have support for compiling under windows using MinGW thanks to Dieter Verfaillie. If you have a bug you care about now is the time to ping me in #python on irc.gnome.org.[read this post in: ar de es fr it ja ko pt ru zh-CN ]
September 13, 2011
August 18, 2011
Want to become famous for a small amount of work? Want to have people thanking you for saving their project? Well then step right up and write a tutorial about Introspection. Ok, perhaps you won’t become famous and I might be the only person to thank you but here is a challenge for those who like to get their hands dirty in some of the more esoteric abilities of a piece of code.
As of now we have mostly been talking about introspection as a way to hook up existing GObject libraries to scripting languages but one of the most powerful features of Introspection is the ability to write your own C libraries inside your scripting project. You may wish to do this for speed, or perhaps there is a feature that is not yet directly bindable via introspection. While it is trivial to write one of these small libraries the devil is in the details and having a tutorial around would help people to dive in and play around. What I am looking for:
- Setup – show how to setup a makefile or even a setup.py file to compile a simple library, gir and typelib files. Make sure the build env installs all the files to the correct locations and even has a way to test changes without installing
- The C example 1 – show how to implement a simple function that takes simple input and returns output
- The C example 2 – show how to implement different types of functions including multiple output functions and memory managed types
- The C example 3 – show how to implement a gobject class with properties and other gobject features
- The Vala examples – show how to do the above in Vala
- Advanced topics could include callbacks
I’m pretty sure there may already be some Vala examples running around but the point of these tutorials would be to teach a scripter who is somewhat familiar with compiled languages how they could add lower level functionality to their project with out too much pain. Are you up for the challenge? Feel free to add a subpage to the PyGObject wiki.[read this post in: ar de es fr it ja ko pt ru zh-CN ]
August 15, 2011
One of the big topics of during the GObject Introspection Hackfest in Berlin has been generating documents directly from the .gir files. While we are far from having complete documents for every supported language binding but thanks to Tomeu Vizoso, Shaun McCance, Laszlo Pandy and Colin Walters with myself holding up rear after my work on the PyGObject 3.0 pre-release, we have a working framework. Examples of the first output are available on my peoples page and you can get more information on the project page.
I would like to thank the Gnome Foundation for sponsoring travel and hotel as well as space during the Desktop Summit; Openisums for supplying us with space after the Summit was over; Nemein for the excellent Fondue dinner; Collabora for the Africana food that I had to miss due to the equally excellent cocktail party at Kat and Dave’s place; and KDE for the yummy Vietnamese lunch.
Much has been sewn and much has been grown, but now it is time to go. Another successful hackfest is in the books and now the hard work of building on our achievements begins. But first, some beer.[read this post in: ar de es fr it ja ko pt ru zh-CN ]
August 14, 2011
I am pleased to announce version 2.90.1 of the Python bindings for GObject. This is an unstable release of what will eventually become PyGObject 3.0. PyGObject 3.0 is the first release that is completely based off of Introspection. To support legacy static bindings like PyGtk this release is parallel installable with PyGObject 2.28 provided introspection is turned off in the older module.
The new release is available from ftp.gnome.org:
What are the highlight of changes since PyGObject 2.28?
- New rewritten invoker is twice as fast and easier to extend and debug
- Complete break from static bindings so we may improve the core without breaking legacy APIs
- Better type handling
- Parallel installable with PyGObject 2.28 for legacy binding support (2.28 must be compiled with –disable-introspection)
- Fixed object array handling
- Added more overrides for PyGTK API emulation
- Support for function calling using keyword arguments
- GObject and GLib symbols can now have overrides
- All static bit removed or made private
- GVariants now work from callback returns
Do I need to port my apps from PyGObject 2.28 to PyGObject 3.0?
We tried to keep the API as close to what we were recommending for 2.28 however since 2.28 straddled both the static and dynamic APIs there are a few things to keep in mind when running under 3.0:
- don’t import pygtk – this was for static bindings only and while it may have been harmless in 2.28 it will cause conflicts in 3.0
- import gobject must be ported as from gi.repository import GObject – this was the recommended way of importing GObject but some code may still have used import gobject. Having both will cause applications to fail because it will load the older 2.28 bindings alongside the 3.0 bindings.
- import glib must now be ported as from gi.repository import GLib – this is a new requirement and prevents the issues discussed above
- use the gi.require_version API (e.g. gi.require_version(’Gtk’, ‘3.0′)) – This is more of a recommendation as we will be outputting warnings in the future. Due to the rapid development of certain libraries like the upcoming Gtk-4.0, it is best to specify the major version of the library you wish to target instead of relying on PyGObject to select the latest one available on the system. This also gives helpful errors if the correct version is not installed on the user’s system.
GObject is a object system used by GTK+, GStreamer and other libraries.
PyGObject provides a convenient wrapper for use in Python programs when accessing GObject libraries.
Like the GObject library itself PyGObject is licensed under the GNU LGPL, so is suitable for use in both free software and proprietary applications. It is already in use in many applications ranging from small single purpose scripts up to large full featured applications.
PyGObject now dynamically accesses any GObject libraries that uses GObject Introspection. It replaces the need for separate modules such as PyGTK, GIO and python-gnome to build a full GNOME 3.0 application. Once new functionality is added to gobject library it is instantly available as a Python API without the need for intermediate Python glue.
Introspection/Python 2 bindings requires gobject-introspection >= 0.9.5 and py2cairo >=1.10.0
Introspection/Python 3 bindings requires gobject-introspection >= 0.9.5, pycairo >=1.10.0 and Python >= 3.1
John (J5) Palmieri
GNOME Foundation member
August 9, 2011
And I am very tasty. Though I missed the main portion of the Desktop Summit I will be in Berlin early tomorrow (Wednesday) morning. I should be in time for the Introspection BOF provided I don’t get lost. I trust that taking the TXL bus to the Staatsoper stop will prove to be uneventful.[read this post in: ar de es fr it ja ko pt ru zh-CN ]
August 3, 2011
Due to my cousin’s wedding this weekend I will be missing the talks section of the Desktop Summit but will be in Berlin during the BOFs to attend the GObject Introspection hackfest.[read this post in: ar de es fr it ja ko pt ru zh-CN ]
July 18, 2011
Tomeu finished up his review this weekend and gave me the green light to merge my long awaited invoke-rewrite branch. Besides being twice as fast as the previous invoke implementation, this branch cleaned up the code into discreet layers and modules which should make it safer and easier to debug as well as profile and add more speed improvements. I have also beefed up memory cleanup in the case that a call fails and the parameters have yet to be marshalled to python objects.
This rewrite is the basis for the future PyGObject 3 release. PyGObject 3 will permanently remove the static bindings but be parallel installable with PyGObject 2 provided that introspection is turned off in the PyGObject 2 build. While this may cause a small amount of pain for packagers, this will provide a smooth upgrade path for developers with little to no expected change to their current PyGObject Introspection projects.
As soon as we can make the two parallel installable we will do a release, update the JHBuild module sets and get the word out that unstable distros should switch to using the new setup. We are committed to stabilizing PyGObject 3 for the GNOME 3.2 release.[read this post in: ar de es fr it ja ko pt ru zh-CN ]
July 12, 2011
Well I closed a week ago and while the bones are really well preserve for a house from the 1920’s, the internals needs a bit of updating.
Day 1 – Carpet
I started by pulling up the 80’s wall to wall carpeting in the living and dining rooms that absolutely had to go. The sad news is that there is only sub-floor under the linoleum in the kitchen and if there one thing I hate more than bland wall to wall carpeting, it is linoleum.
The good news is that the hard wood under the carpet was virtually unmarked and stunning.
Day 2 – Demo
As I said the house is pretty old and so its its flow. The living room leads into the formal dining room which is then leads into a small closed off kitchen.
Well, I didn’t buy this place because I fell in love with how it looked inside. I fell in love with the potential it represented. What that entailed was knocking down walls.
The whole closet separating the kitchen from the dining room is coming down. The only downside is I had to remove a great piece of built in cabinetry but it basically took up one whole wall in the dining room.
My brother Frank and soon to be former roommate Adam, helped me take it out without too much damage. I plan to reuse it in the future wine room down in the basement.
It is definitely a work in progress but I am having fun doing it.ar de es fr it ja ko pt ru zh-CN ]
June 3, 2011
I figured instead of just complaining I would offer some practical fixes which would avoid the issue of disfranchising in the future.
First let’s examine why this is is an issue. In order to become a member of the Foundation one must prove they have worked on significant pieces of GNOME and have two references to back them up. A lot of people I know balk at even going through this first step because as far as they can see there is little benefit to becoming a member. I try to remind them that voting is an important benefit. During my tenure as a Foundation Board member we saw this as an issue and tried to promote Foundation participation by those in the GNOME Community. Among other things we required people receiving funding from the foundation to apply for membership at some point in the future. However the problem still remains that being a member constitutes a voting ballot once a year (1 and a half years during my tenure due to realigning election years) and little else (there is the occasional smaller ballot). A foundation member also has to renew their membership once every two years. So if a member has to think about Foundation process once a year and membership process once every two years it is easy for membership to laps until a member finds themselves in the quandary I now find myself in. To further exacerbate the situation it is a known issue by the membership and election committees that spam filters eat their e-mails and that the only reminders sent out are the exact same e-mails.
So how do we fix this?
Long Term Solutions
1.) Make registration an in person event to compliment the reminder e-mails – one of the things Foundation Members tend to do every year is go to one of the many events the Foundation sponsors. If there is a registration system their names should be flagged and they given the opportunity to renew their membership if it is set to expire in less than a year. This should be an offline form that is processed at a later date as we all know how bad conference networking can be. This can be a stipulation to organizers for receiving funding from the Board.
2.) Remind people when they are interacting with the Foundation process – Since voting happens every year, why not warn people when they vote that they will not be eligible for the next years vote unless they reregister at some point during the year?
Short Term Solution
All those who were denied a vote and who voted in last years elections should be allowed to reregister for this vote and given a ballot.[read this post in: ar de es fr it ja ko pt ru zh-CN ]
June 2, 2011
Having not received a ballot for this years elections I went into my spam folder to see if it had been caught there. Instead I found a renewal notification for my foundation membership. The policy for members to renew their membership every two years is not a bad one but I was just informed that I can not be renewed until after the elections and as such can not cast any vote in this cycle. That is a bad policy. For someone who is in good standing with the Foundation, having worked on its behalf and even have been a board member myself, I feel I have a right to vote in this election.
The policy to not allow renewal at the ballot box has in effect disenfranchised me. Most bodies of democracy I know allow registering at the ballot box for those who have a record of having been previously registered and can prove they are who they say they are. We aren’t talking about someone voting who has not participated in a vote before and would require excessive vetting before gaining that right.
What really gets me steamed about the situation is that due to being caught in a spam filter the only other way I could know that I was removed from the Foundation’s member list was to realize that I never received a voting ballot in which case I am not even give a chance to re-register before voting cuts it off.
UPDATE: I have been notified by the membership committee that many people failed to re-register and are unable to vote this cycle. If this isn’t a sign of a broken system then people are ignoring the issue. I could see if this was an isolated incident but since there is a small number of people who are eligible to vote I wonder what the ratio is of people who were denied a vote due to this procedural issue. I bet it is statistically significant. How can a vote be legitimate when a significant portion of the community is denied their vote? It is grounds for a challenge during the ratification stage.[read this post in: ar de es fr it ja ko pt ru zh-CN ]