GNOME Bugzilla – Bug 712197
Merge code from _gobject.so and _glib.so into _gi.so
Last modified: 2014-01-14 18:40:58 UTC
The separation of _gobject.so built from sources found in gi/_gobject is a historical artifact which is no longer needed (gobject can no longer be used outside of pygi). Merging the code bases into a single .so will drastically improve the ability to share and refactor marshaling and other code without having to add functions to the to the gi and gobject API tables. Adding new internal functions to the API tables is bad because they show up as public due to the need for exposing them in pygobject.h which is still distributed as an API header for the project.
Created attachment 259717 [details] [review] Merge gobject static code into the gi module Remove gi._gobject._gobject as a separately compiled static module and move all the files into gi._gi. Remove dead module initialization macros from "pyglib-python-compat.h"
Created attachment 259718 [details] [review] Move gobject sub-module Python files into the main gi package This moves the signalhelper, propertyhelper, and constants Python modules from gi/_gobject into gi. Keep gi/_gobject/__init__.py around because it is still needed to maintain the "_PyGObject_API" exposed by pygobject.h. This allows external modules compiled with prior versions of PyGObject to continue working with newer versions.
Created attachment 265812 [details] [review] Merge gobject static code into the gi module Rebased
Created attachment 265813 [details] [review] Move gobject sub-module Python files into the main gi package
Created attachment 265814 [details] [review] Merge static PyGLib module into PyGI Remove gi._glib._glib as a separately compiled module. Move all C files into pygobject/gi. Remove compilation and use of libpyglib-gi-2.0-python.so as a shared dependency since we do not distribute header files for it. Remove unused threading macros.
Created attachment 265815 [details] [review] Move Python glib options module into gi package Move gi/_glib/option.py into gi/_option.py. Remove gi/_glib since it is no longer needed.
Changes are changes are also visible on github: https://github.com/sfeltman/pygobject/compare/GNOME:master...712197
Review of attachment 265812 [details] [review]: Many thanks for this, merging our three libraries is indeed a good idea. The "gi._gi._gobject" namespace sticks out like a sore thumb, but I guess you kept this for backwards compatibility with projects that build against pygobject.h? (like libpeas)
Comment on attachment 265813 [details] [review] Move gobject sub-module Python files into the main gi package py3build/gi/overrides/GObject.py | 1 + This bit needs to go, the rest looks good to me. Please commit with dropping this. Thank you!
Review of attachment 265814 [details] [review]: Looks good to me, thanks!
Review of attachment 265815 [details] [review]: LGTM.
Attachment 265812 [details] pushed as d3e8946 - Merge gobject static code into the gi module Attachment 265813 [details] pushed as 2624bd2 - Move gobject sub-module Python files into the main gi package Attachment 265814 [details] pushed as ad565e5 - Merge static PyGLib module into PyGI Attachment 265815 [details] pushed as 8afd7e8 - Move Python glib options module into gi package
(In reply to comment #8) > Review of attachment 265812 [details] [review]: > "gi._gi._gobject" namespace sticks out like a sore thumb, but I guess you kept > this for backwards compatibility with projects that build against pygobject.h? > (like libpeas) Indeed. Programs or libraries compiled using pygobject.h would break if we don't keep this around. We should probably update pygobject.h to use a more reasonable location, but we would still need to keep this py file around for compatibility. (In reply to comment #9) > (From update of attachment 265813 [details] [review]) > py3build/gi/overrides/GObject.py | 1 + > > This bit needs to go, the rest looks good to me. Please commit with dropping > this. Thank you! Nice catch, thanks!