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 573753 - DeprecationWarning under python 2.6
DeprecationWarning under python 2.6
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: codegen
2.16.x
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-02 13:26 UTC by James Westby
Modified: 2009-04-14 20:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Patch to not pass type_name to str.__init__() (616 bytes, patch)
2009-03-02 13:27 UTC, James Westby
committed Details | Review

Description James Westby 2009-03-02 13:26:22 UTC
Please describe the problem:
Hi,

Under python2.6 I get

/usr/share/pygobject/2.0/codegen/definitions.py:42: DeprecationWarning: object.__init__() takes no parameters
  str.__init__(self, type_name)

The attached patch should fix this.

Thanks,

James


Steps to reproduce:



Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 James Westby 2009-03-02 13:27:26 UTC
Created attachment 129848 [details] [review]
Patch to not pass type_name to str.__init__()
Comment 2 Paul Pogonyshev 2009-04-14 20:27:54 UTC
Checked to work fine with 2.3 and up, so I committed this.  Looks like string gets initialized in __new__ already.

Sending        ChangeLog
Sending        codegen/definitions.py
Transmitting file data ..
Committed revision 1063.