Bug 144301 - unwanted new pygtk2-libglade warning message
unwanted new pygtk2-libglade warning message
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gtk2 (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matthias Clasen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-05 14:18 EST by Jason Vas Dias
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-24 13:12:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jason Vas Dias 2005-01-05 14:18:24 EST
Description of problem:
Having just yum upgraded to latest rawhide of 2005-01-03, upgrading
pygtk2 from 2.4.1-1 to 2.4.1-2, I now get this warning message 
when I load my .glade file:

/usr/sbin/system-config-bind:70: GtkWarning: Mixing deprecated and
non-deprecated GtkToolbar API is not allowed
  self.xml = gtk.glade.XML ( SCB+/+system-config-bind.glade )

This message was not generated in pygtk2-2.4.1-1 .

This message now appears every time the application is run, and 
it is not clear how it can be avoided, aside from rewriting the app
not to use glade at all (which I now wish I'd done from the start!).

I strongly object to this message for these reasons:

1. If something a programmer writes is "not allowed" in an API, 
   the API should not allow it, not complain about it.

2. The information content of the message is insufficient - 
   exactly what "deprecated"/"non-deprecated" parts of the API are
   being mixed ? How I am meant to know how what precisely is
   causing the problem from this message ?

Is there any way I can turn generation of this message off ? 
If so, please tell me how.

If not, please ammend the message to contain details about how
the problem can be fixed - ie. exactly what API components used
by my app should not be used together and which trigger the message
generation .
  
Version-Release number of selected component (if applicable):

pgtk2-2.4.1-2 

How reproducible:

100%

Steps to Reproduce:
1. Run a pygtk2-libglade app (eg. system-config-bind-4.0.0)
  
Actual results:

Annoying message is generated 

Expected results:

No message should be generated, or the message should contain
sufficient information to allow me to rectify the problem 
triggering it.


Additional info:
Comment 1 Jason Vas Dias 2005-01-05 15:06:56 EST
Whoops! I found out it is actually generated by gtk2-2.6.0-1, which got
yum upgraded from 2.4.13-11, in which the message was not generated.

The same comments above still apply - either:
   1. The message should not be generated
or 2. There needs to be a way to disable its generation
or 3. It should contain sufficient information to allow a programmer
      to prevent it being generated.

The offending file is:
./gtk+-2.6.0/gtk/gtktoolbar.c: 79:    "Mixing deprecated and
non-deprecated GtkToolbar API is not allowed"

Moving to gtk+ package.
 
Comment 2 Jason Vas Dias 2005-01-05 15:40:04 EST
Part of this IS a pygtk problem: there should be a way of catching
and handling the gtk.GtkWarning exception, which there does not seem
to be.
I tried:
    try:
        self.xml = gtk.glade.XML ( SCB+'/'+'system-config-bind.glade'
    except gtk.GtkWarning, w:
        pass
This did not work - the warning is still generated unconditionally.

I'm having to resort to:
        sys.stdout = file("/dev/null","w")
        sys.stderr = sys.stdout
        self.xml = gtk.glade.XML(SCB+'/'+'system-config-bind.glade')
        sys.stdout = sys.__stdout__
        sys.stderr = sys.__stderr__
Comment 3 Matthias Clasen 2005-08-24 13:12:27 EDT
We can not include all of the toolbar api docs in that warning message...

Note You need to log in before you can comment on or make changes to this bug.