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 788701 - Fix deprecated warning for GObject constructor(s)
Fix deprecated warning for GObject constructor(s)
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
3.26.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2017-10-09 09:49 UTC by Felipe Borges
Modified: 2017-12-27 17:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix of GObject deprecation warning (24.71 KB, patch)
2017-10-30 10:51 UTC, Phil Dawson
none Details | Review
Patch for bug 788701 (1.31 KB, patch)
2017-10-30 15:02 UTC, Phil Dawson
none Details | Review
Revised patch (801 bytes, patch)
2017-10-30 16:50 UTC, Phil Dawson
none Details | Review
Revised patch (782 bytes, patch)
2017-10-30 17:09 UTC, Phil Dawson
none Details | Review
Revised patch (782 bytes, patch)
2017-10-30 17:10 UTC, Phil Dawson
needs-work Details | Review

Description Felipe Borges 2017-10-09 09:49:15 UTC
When I run Music I get warnings such:

/home/fborges/jhbuild/install/lib/python3.6/site-packages/gnomemusic/window.py:158: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  self._playlist_notification.label = Gtk.Label('')

This is a oneliner change which is suitable for first-time contributors.

You'll need to:

1. Build and run gnome-music from git master
2. See the deprecation warning
3. Make a patch fixing the issue and attach here (see https://wiki.gnome.org/Git/CommitMessages)
Comment 1 Felipe Borges 2017-10-09 09:49:55 UTC
Please, reserve this sort of bugs for #newcomers to fix.
Comment 2 Phil Dawson 2017-10-30 10:51:47 UTC
Created attachment 362534 [details] [review]
Fix of GObject deprecation warning

Hi, I'm a newcomer here. This patch fixes the deprecation warning.
Comment 3 Felipe Borges 2017-10-30 11:59:23 UTC
Hi, thanks for your contribution!

Your attachment doesn't seem like a patch. See https://wiki.gnome.org/Git/Developers#Contributing_patches
Comment 4 Phil Dawson 2017-10-30 15:02:52 UTC
Created attachment 362551 [details] [review]
Patch for bug 788701

Apologies. Here it is as a patch file.
Comment 5 Felipe Borges 2017-10-30 16:02:16 UTC
Review of attachment 362551 [details] [review]:

Thank you!

We usually prefix the first line of the commit message with the component/module which is touched, in this case "window".

::: gnomemusic/window.py
@@ +157,2 @@
         # Playlist name label
+        self._playlist_notification.label = Gtk.Label(label=None)

We could just omit the argument.

+ self._playlist_notification.label = Gtk.Label()
Comment 6 Phil Dawson 2017-10-30 16:50:38 UTC
Created attachment 362565 [details] [review]
Revised patch

Revision as per your comments
Comment 7 Phil Dawson 2017-10-30 17:09:16 UTC
Created attachment 362567 [details] [review]
Revised patch

oops, I attached the wrong patch in the last post. Here is the correct one.
Comment 8 Phil Dawson 2017-10-30 17:10:05 UTC
Created attachment 362568 [details] [review]
Revised patch

oops, I attached the wrong patch in the last post. Here is the correct one.
Comment 9 Felipe Borges 2017-10-31 11:47:04 UTC
Review of attachment 362568 [details] [review]:

Thank you! That's it. Your code is looking good.

There's some encoding issues in your name in the "From" part of the patch.

Did you edit the .patch file manually or you generated a new one from a "git commit --amend" command?

You shouldn't edit the .patch files manually, you should create a new patch.
Comment 10 Phil Dawson 2017-10-31 12:05:44 UTC
I used the Gitg gui rather than command line git. I generated a new one using the amend commit option which I assume (but don't _know_) should do the same.
Comment 11 Marinus Schraal 2017-12-12 15:43:43 UTC
Review of attachment 362568 [details] [review]:

Looks alright to me.

If you can remove the comment as well, that would be cool.

Also -as Felipe said- the From: field is garbled. To correct this you probably want to --amend with the --author option (see git help).

Regarding the git comment: lowercase the 'window', it refers to an actual file. Maybe in the extended comment you can add what warning got fixed. See https://wiki.gnome.org/Git/CommitMessages .

::: gnomemusic/window.py
@@ +155,3 @@
             remove_notification_timeout(self)
 
         # Playlist name label

While at it, you may remove this spurious comment.
Comment 12 Marinus Schraal 2017-12-27 17:38:14 UTC
I committed 1aa98d90077 based on your patch, thanks for your contribution.

Next time try to be more interactive and update your patch based on the feedback. The patch as it was provided was broken and could not even be applied, while the fix was fine.

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.