Tuesday, June 29, 2010

New PyGObject release: 2.21.4

Just made a new release of PyGObject, this is the first one that includes introspection support after merging PyGI. That means that you can now call GObject-based libraries from Python without requiring specific Python bindings, just the .typelib files that should be already packaged along the shared library.

Next challenge: Python 3.x support.

Announcement follows:

Hi,

I am pleased to announce version 2.21.4 of the Python bindings for GObject.

The new release is available from ftp.gnome.org as and its mirrors as
soon as its synced correctly:

http://download.gnome.org/sources/pygobject/2.21/

What's new since PyGObject 2.21.3?

- Build the cairo shim as a python module so the _gi module
stops linking to it (Tomeu Vizoso)
- add drawing area demo (John (J5) Palmieri)
- sort the demo list (John (J5) Palmieri)
- rename iter to treeiter so we aren't using a python reserved
word (John (J5) Palmieri)
- Fixup for change in buffer API (John (J5) Palmieri)
- add ListStore, TreeStore and TreeViewColumn APIs (John (J5) Palmieri)
- Add unit test for add_actions user data. (Ignacio Casal Quinteiro)
- Pass user_data param when adding actions (Paolo Borelli)
- add an exception type to the try/except block (John (J5) Palmieri)
- return PyList instead of PyTuple for array, return empty
list for NULL arrays (John (J5) Palmieri)
- Fix 'make distcheck' (Tomeu Vizoso)
- Allow building pygobject without introspection support by
providing --disable-introspection to configure. (Tomeu Vizoso)
- Make sure that sys.argv is a list and not a sequence. (Tomeu Vizoso)
- Force loading the GObject typelib so we have available the
wrappers for base classes such as GInitiallyUnowned. (Tomeu Vizoso)
- we shouldn't g_array_free NULL pointers (John (J5) Palmieri)
- remove unneeded TextIter creation in the tests (John (J5) Palmieri)
- add override for TextBuffer (John (J5) Palmieri)
- fix up some build issues (John (J5) Palmieri)
- make the overrides file git friendly by appending to __all__
after each override (John (J5) Palmieri)
- Override Dialog constructor and add_buttons method (Paolo Borelli)
- Merge PyGI (Johan Dahlin)

Note to packagers:

The configure option --enable-pygi has been removed and we build now
introspection support by default. It's not recommend for distros, but
if needed, you can build PyGObject without requiring
gobject-introspection by passing --disable-introspection. When built
with introspection support (the default) we require pycairo as a build
dependency. We now install one more python module _gi_cairo.so that
links to libcairo and depends on pycairo and that should be packaged
separately.

Blurb:

GObject is an object system library used by GTK+ and GStreamer.

PyGObject provides a convenient wrapper for the GObject library for use
in Python programs, and takes care of many of the boring details such as
managing memory and type casting. When combined with PyGTK, and
gnome-python, it can be used to write full featured Gnome applications.

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 requires glib >= 2.22.4 and Python >= 2.3.5 to build.
GIO bindings require glib >= 2.22.4.

Please remember that this is an unstable release and shouldn't be used
in production.

Regards,

The PyGObject team

Monday, June 28, 2010

PyGI has been merged into PyGObject

Last week the people hacking on introspection support for PyGObject decided to merge (again) PyGI into PyGObject.

As soon as the patches in this bug get reviewed and pushed, I will be making a new release of PyGObject that will include introspection support.

For packagers, this means that PyGI packages can be dropped and that future releases of PyGObject will depend on introspection. The release notes will contain more specific information for packagers.

The 'pygi' component in bugzilla has been closed for new bugs and we are using component 'introspection' in the product 'pygobject'.

Similarly, the #pygi channel at GIMPNet has been changed to invite-only and we have registered the #python channel for all matters related to the internals of Python on GNOME. For user questions, please keep using #pygtk also on GIMPNet.

We need help updating the wiki to reduce the confusion caused by the brief but tribulated life of PyGI, at least we are certain that it has finally found its permanent home.

We hope that users of Python on GNOME will appreciate what introspection brings to our platform and also that from now on it will be more accessible to everybody.

Saturday, June 19, 2010

Proposed GNOME goal: Port your PyGTK to the new PyGI bindings

Javier Jardón has proposed this goal, which hopefully will make more prominent the convenience of starting to port your app from the old APIs as soon as possible.

If we fail to get a solid Python story in GNOME 3.0, it will be much more painful to do the porting in subsequent GNOME 3.x releases.

We still need many more people starting to port their apps and filing bugs (even better with patches!). And before you think it's too soon, read this bugzilla comment:

My app is a complex pygtk
program and with some, small change now is running with pygi,
i have errors in parts like "event.type == gtk.gdk.KEY_PRESS " or
actionGroup = gtk.ActionGroup("Actions")

but is running fast almost perfectly.

So we aren't perfect yet, but we're already useful and fast.

As an aside, I have heard through the grapevine that during GUADEC 2010 several people will meet to hack on introspection and PyGI. So if you want to have some of the PyGI hackers in the same room when you port your app, keep an eye on this and J5's blog for updates.

Thanks to Collabora for sponsoring my presence in GUADEC and to all the people who are working to make it possible.

Friday, June 11, 2010

New PyGObject unstable release: 2.21.2

PyGObject has seen a new release, see the announcement below.

I have started lending a hand to Gian Mario with the release but we are still very short-handed. If you care about Python and GNOME and know a bit of C and Python, please consider helping with patch reviews and general patch herding:

https://bugzilla.gnome.org/page.cgi?id=patchreport.html&product=pygobject&patch-status=none


Hi,

I am pleased to announce version 2.21.2 of the Python bindings for GObject.

The new release is available from ftp.gnome.org as and its mirrors
as soon as its synced correctly:

http://download.gnome.org/sources/pygobject/2.21/

What's new since PyGObject 2.21.1?
- Drop sinkfuncs. (Tomeu Vizoso)
- Clear error if we failed the import (Colin Walters)
- Added missing , to keyword list of gio.GFile.set_attribute
(John Ehresman)
- Fix arg conversion in gio.GFile.set_attribute (John Ehresman)
- Set constants under python 2.5 or before (John Ehresman)
- Doc Extractor: Use replacements that make sense for &...;
expressions. (José Alburquerque)
- Add build docs for windows (John Stowers)
- Setup.py cosmetic tidy (John Stowers)
- Fix crash when importing gio (John Stowers)
- Bug 589671 - Dont use generate-constants (John Stowers)
- Bug 589671 - Fix setup.py for windows build (John Stowers)
- Include pygsource.h (John Stowers)
- codegen/docextract_to_xml.py: One more &...; replacement
( ). (José Alburquerque)
- codegen/docextract_to_xml.py: Replace some &..; that cause
errors. (José Alburquerque)
- codegen/docextract_to_xml.py: Handle C++ multi-line comments.
(José Alburquerque)
- codegen/docextract.py: Stop final section processing on first
match. (José Alburquerque)
- Update doc extraction tool to handle GObjectIntrospection
annotations. (José Alburquerque)
- Docs: replace gio.IO_ERROR_* with gio.ERROR_* (Paul Bolle)
- Bug 613341 - pygobject tests seem to require pygtk causing a
circular (Gian Mario)
- Don't raise an error in _pygi_import if pygi support is
disabled (Simon van der Linden)
- Initialize PyGPollFD_Type.fd_obj to NULL (Tomeu Vizoso)
- Bug 605937 - pygobject: Makefile.am sets $TMPDIR, disrupting
distcc (Gian Mario)
- Wrap gio.Cancellable.make_pollfd() and add a test (Gian Mario)
- Make cancellable an optional parameter in many methods (Gian
Mario)

Blurb:

GObject is a object system library used by GTK+ and GStreamer.

PyGObject provides a convenient wrapper for the GObject library for use
in Python programs, and takes care of many of the boring details such as
managing memory and type casting. When combined with PyGTK, PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

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 requires glib >= 2.22.4 and Python >= 2.3.5 to build.
GIO bindings require glib >= 2.22.4.

Please remember that this is an unstable release and shouldn't be used
in production.

Regards,

The PyGObject team

Monday, June 7, 2010

PyGI now in Debian and Ubuntu

Thanks to the Debian GNOME Team, Laurent Bigonville and Canonical's Robert Ancell, PyGI is well on its way to Debian and Ubuntu:

http://packages.debian.org/sid/python-gi
https://launchpad.net/debian/+source/pygi/0.5.1-1

Thanks to everybody involved in this effort, upstream developers appreciate your work!

Friday, June 4, 2010

New PyGI release: 0.6.0

PyGI has seen a new release, follows the announcement:

Hi all,

this new release brings several new features and bug fixes and we feel application authors will have an easier time porting their software to use introspection. To mark this usability milestone we have started the 0.6.x series.

Apart from further feature and stability work, you can expect compatibility with Python 3.x in a future 0.6.x release.

http://ftp.gnome.org/pub/GNOME/sources/pygi/0.6/pygi-0.6.0.tar.gz

This release adds a dependency on gobject-introspection 0.6.14 or newer.

== Changes ==

* Added overrides for better compatibility with the old API:
GtkUIManager and GtkActionGroup
* Improved callback support
* Support for G*Array arguments
* Support for caller-allocates

== Join the effort! ==

Any feedback is welcome and the PyGI community will be happy to assist any porting efforts in the mailing lists mentioned below, in the #pygi IRC channel in Freenode and in GNOME's bugzilla:

Internals development mailing list:
http://mail.gnome.org/mailman/listinfo/python-hackers-list

Application development mailing list:
http://www.daa.com.au/mailman/listinfo/pygtk

Known issues: https://bugzilla.gnome.org/buglist.cgi?product=pygi&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&version=unspecified

Enter a new report: https://bugzilla.gnome.org/enter_bug.cgi?product=pygi

Main wiki page: http://live.gnome.org/PyGI

Regards,

Tomeu

--

John (J5) Palmieri (10)

* support for caller-allocates annotations for structs
* don't import gobject directly in the tests
* fix up Builder override, add new override methods, and add unit tests
* check refcounting of callback userdata in unit tests
* correctly handle floating objects in gtk
* Return an empty list when a NULL GList and GSList is returned
* fix NULL array unit tests and fix crasher when sending None as an array
* don't error out on methods with callbacks as return type
* reset sys.argv to the return value of Gtk.init_check
* add GtkUIManager and GtkActionGroup overrides

Steve Frécinaux (1)

* Fix warning in configure.

Tomeu Vizoso (12)

* Pre-release version bump 0.6.0
* Wrap C arrays in structs as GArrays before converting to Python
* Install pre-commit hook that checks the code changes for style conformance
* Apply consistent whitespace formatting with:
* Prepend gi.repository to the __module__ attribute of wrapper classes.
* Correctly identify at creation time:
* Dont complain if another base has implemented the method
* Improve handling of subclasses without __gtype_name__
* Add support for out args in callbacks
* Add support for GArray args
* GTypeInterface cannot be unrefed
* If None is passed to an interface which takes an object, convert it to NULL