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 790127 - disclistboxwidget: fix deprecation warning for constructor
disclistboxwidget: fix deprecation warning for constructor
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2017-11-09 15:39 UTC by Jean Felder
Modified: 2017-12-27 17:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
disclistboxwidget: fix deprecation warning for constructor (871 bytes, patch)
2017-11-09 15:39 UTC, Jean Felder
reviewed Details | Review

Description Jean Felder 2017-11-09 15:39:16 UTC
this fixes the following warning message: 
/home/jean/tmp/jhbuild/install/lib/python3.5/site-packages/gnomemusic/widgets/disclistboxwidget.py:156: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "homogeneous" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  super().__init__(self)
Comment 1 Jean Felder 2017-11-09 15:39:20 UTC
Created attachment 363297 [details] [review]
disclistboxwidget: fix deprecation warning for constructor
Comment 2 Marinus Schraal 2017-12-12 15:59:05 UTC
Review of attachment 363297 [details] [review]:

super() is the python way to call a superclass. So I'm not sure this is the right solution.
Comment 3 Jean Felder 2017-12-12 21:18:48 UTC
I agree with you.
I've used this approach because it's used all over the source code and it removes the warning.
I do not know what the right approach is.
Comment 4 Marinus Schraal 2017-12-12 23:14:25 UTC
I think super().__init__() should do the trick. What baffles me why only this class gives a warning and other similar classes don't.

Music uses a lot of different coding conventions which built up over time. The goal is to unify it in the propery way.
Comment 5 Marinus Schraal 2017-12-27 17:34:29 UTC
I committed 9c47531f8eed35 based on your patch, thanks for your contribution.

This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.