After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 712197 - Merge code from _gobject.so and _glib.so into _gi.so
Merge code from _gobject.so and _glib.so into _gi.so
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks: 701843 709700
 
 
Reported: 2013-11-13 04:16 UTC by Simon Feltman
Modified: 2014-01-14 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Merge gobject static code into the gi module (22.87 KB, patch)
2013-11-13 07:12 UTC, Simon Feltman
none Details | Review
Move gobject sub-module Python files into the main gi package (13.33 KB, patch)
2013-11-13 07:13 UTC, Simon Feltman
none Details | Review
Merge gobject static code into the gi module (22.84 KB, patch)
2014-01-09 03:39 UTC, Simon Feltman
committed Details | Review
Move gobject sub-module Python files into the main gi package (39.78 KB, patch)
2014-01-09 03:40 UTC, Simon Feltman
committed Details | Review
Merge static PyGLib module into PyGI (17.10 KB, patch)
2014-01-09 03:40 UTC, Simon Feltman
committed Details | Review
Move Python glib options module into gi package (4.73 KB, patch)
2014-01-09 03:40 UTC, Simon Feltman
committed Details | Review

Description Simon Feltman 2013-11-13 04:16:13 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.
Comment 1 Simon Feltman 2013-11-13 07:12:58 UTC
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"
Comment 2 Simon Feltman 2013-11-13 07:13:08 UTC
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.
Comment 3 Simon Feltman 2014-01-09 03:39:45 UTC
Created attachment 265812 [details] [review]
Merge gobject static code into the gi module

Rebased
Comment 4 Simon Feltman 2014-01-09 03:40:09 UTC
Created attachment 265813 [details] [review]
Move gobject sub-module Python files into the main gi package
Comment 5 Simon Feltman 2014-01-09 03:40:17 UTC
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.
Comment 6 Simon Feltman 2014-01-09 03:40:20 UTC
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.
Comment 7 Simon Feltman 2014-01-09 03:42:22 UTC
Changes are changes are also visible on github:
https://github.com/sfeltman/pygobject/compare/GNOME:master...712197
Comment 8 Martin Pitt 2014-01-14 08:08:34 UTC
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 9 Martin Pitt 2014-01-14 08:12:21 UTC
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!
Comment 10 Martin Pitt 2014-01-14 08:14:24 UTC
Review of attachment 265814 [details] [review]:

Looks good to me, thanks!
Comment 11 Martin Pitt 2014-01-14 08:15:07 UTC
Review of attachment 265815 [details] [review]:

LGTM.
Comment 12 Simon Feltman 2014-01-14 18:33:54 UTC
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
Comment 13 Simon Feltman 2014-01-14 18:40:58 UTC
(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!