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 507174 - Convert from popt to GOption
Convert from popt to GOption
Status: RESOLVED FIXED
Product: gnome-python
Classification: Deprecated
Component: general
2.22.x
Other Linux
: High normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on: 540741
Blocks:
 
 
Reported: 2008-01-04 03:15 UTC by André Klapper
Modified: 2009-04-29 10:46 UTC
See Also:
GNOME target: 2.26.x
GNOME version: 2.23/2.24


Attachments
goption support (11.73 KB, patch)
2008-06-17 20:52 UTC, Tristan Hill
none Details | Review
pygobject changes required to build (1.83 KB, patch)
2008-06-17 20:53 UTC, Tristan Hill
none Details | Review
tweaked patch (11.67 KB, patch)
2008-06-29 13:59 UTC, Gustavo Carneiro
none Details | Review
updated pyobject patch to add a OptionContext._get_context method (1020 bytes, patch)
2008-08-26 06:36 UTC, Tristan Hill
committed Details | Review
gnome-python patch using _get_context method (13.92 KB, patch)
2008-08-26 06:39 UTC, Tristan Hill
committed Details | Review

Description André Klapper 2008-01-04 03:15:26 UTC
see GNOME Goal #1 at http://live.gnome.org/GnomeGoals/PoptGOption .

gnome-python seems to be one of the very last modules still using popt, it would be great to have some efforts to finally get rid of popt for GNOME 2.22.
(also see bug 136953 for some historical reference of popt in gnome-python.)
Comment 1 Gustavo Carneiro 2008-01-04 12:20:44 UTC
I don't think this will get fixed for GNOME 2.22, unless someone contributes a patch real quick.  API/ABI freeze is already next monday, and I'm short on hacking time these days.
Comment 2 André Klapper 2008-06-17 20:29:13 UTC
*ping*
Comment 3 Gustavo Carneiro 2008-06-17 20:42:56 UTC
I'm still short on hacking time; working for a phd tends to have that effect :P
Patches are welcome.
Comment 4 Tristan Hill 2008-06-17 20:52:30 UTC
Created attachment 112936 [details] [review]
goption support

This is an initial patch to add support for goption to gnome.init().

popt support has not been changed.
Comment 5 Tristan Hill 2008-06-17 20:53:36 UTC
Created attachment 112937 [details] [review]
pygobject changes required to build
Comment 6 Gustavo Carneiro 2008-06-29 13:59:05 UTC
Created attachment 113617 [details] [review]
tweaked patch

I did some minor tweaks and cleanups on the patch; otherwise looks good to commit as soon as the needed pygobject changes go in.
Comment 7 Luis Medinas 2008-07-13 16:54:26 UTC
Maybe it's time to get it in trunk to be available on 2.24.
Comment 8 Gustavo Carneiro 2008-07-13 17:43:53 UTC
Sure but it needs pygobject changes to go in first, otherwise it won't compile.
Comment 9 André Klapper 2008-08-02 16:09:48 UTC
This is the last and only module still requiring Popt according to the wiki page. Can we PLEASE get this in for 2.24?
Comment 10 Johan (not receiving bugmail) Dahlin 2008-08-02 21:41:57 UTC
The PyGObject changes are not good. They need to be updated to trunk, since the GOption bindings moved to the glib module.

The struct fields should be considered private and not exported in public headers, that'll need some work before this can go into pygobject.
Comment 11 Tristan Hill 2008-08-26 06:36:23 UTC
Created attachment 117380 [details] [review]
updated pyobject patch to add a OptionContext._get_context method
Comment 12 Tristan Hill 2008-08-26 06:39:39 UTC
Created attachment 117381 [details] [review]
gnome-python patch using _get_context method
Comment 13 André Klapper 2008-09-09 15:54:37 UTC
Can we get a review here and/or this committed?
Gustavo, Johan?

This is the very last module waiting to get ported, and hardcode freeze is on next monday.
Comment 14 Gustavo Carneiro 2008-09-09 16:13:02 UTC
The status is: gnome-python needs pygobject changes; the pygobject patch is not ready to be committed according to the maintainers; I am not willing to commit development resources to this, interested parties please fix the patches.
Comment 15 Christian Kirbach 2008-11-12 23:22:11 UTC
Hi Tristan

thanks for working on a patch. Can you spend some more time on the pygobject changes with help from some gnome-python people? I am sure you will find someone who will support you with some advice. I bet Andre will reserve
a "honourable mention" in one of his posts on planet.gnome.org if you
rid GNOME of libpopt :)

The changes in question seems to be

"The struct fields should be considered private and not exported in public
headers, that'll need some work before this can go into pygobject."

Thanks for your work again.
Comment 16 Luis Menina 2008-12-11 09:43:36 UTC
Any update on this ? This is the last project missing, so completing this task will complete the GNOME Goal.
Comment 17 André Klapper 2009-01-25 19:40:43 UTC
Any update on this ? This is the last project missing, so completing this task
will complete the GNOME Goal.
Comment 18 Tristan Hill 2009-01-25 22:03:32 UTC
> The changes in question seems to be
> 
> "The struct fields should be considered private and not exported in public
> headers, that'll need some work before this can go into pygobject."

In the pygobject patch in comment #11 a getter on the python object was added to avoid using the struct field from gnome-python - I don't know whether this is sufficient.

Also note the patch doesn't remove the popt python wrapper (and hence use of libpopt) they just allow use of the goption parser from gnome-python.  I am unsure whether popt support needs to be retained to not break backward compatibility with gnome-python being a library rather than a program.
Comment 19 Gustavo Carneiro 2009-04-05 14:48:48 UTC
Comment on attachment 113617 [details] [review]
tweaked patch

This patch is obsoleted by "gnome-python patch using _get_context method", right?
Comment 20 Tristan Hill 2009-04-05 15:24:01 UTC
correct
Comment 21 Gustavo Carneiro 2009-04-05 15:24:39 UTC
I committed the pygobject part.  I will commit the gnome-python when I branch gnome-python right after the gnome 2.26.1 release (and after the git migration).  Time to finish this once and for all.
Comment 22 Jesse Zhang 2009-04-29 08:33:05 UTC
Hi, in the commit of this,
http://git.gnome.org/cgit/gnome-python/commit/?id=d62b041db415ff2e072bc55b064f6c3e7696f7af

it seems there is a typo,
+m4_define(pyobject_required_version, 2.15.0)

It should be pygobject, no?
Comment 23 Gustavo Carneiro 2009-04-29 10:46:40 UTC
Yes, thanks for the notice.  I had not tested the autotools build system yet.