GNOME Bugzilla – Bug 788701
Fix deprecated warning for GObject constructor(s)
Last modified: 2017-12-27 17:38:14 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)
Please, reserve this sort of bugs for #newcomers to fix.
Created attachment 362534 [details] [review] Fix of GObject deprecation warning Hi, I'm a newcomer here. This patch fixes the deprecation warning.
Hi, thanks for your contribution! Your attachment doesn't seem like a patch. See https://wiki.gnome.org/Git/Developers#Contributing_patches
Created attachment 362551 [details] [review] Patch for bug 788701 Apologies. Here it is as a patch file.
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()
Created attachment 362565 [details] [review] Revised patch Revision as per your comments
Created attachment 362567 [details] [review] Revised patch oops, I attached the wrong patch in the last post. Here is the correct one.
Created attachment 362568 [details] [review] Revised patch oops, I attached the wrong patch in the last post. Here is the correct one.
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.
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.
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.
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.