linuxmint / mintupdate

The Linux Mint Update Manager
324 stars 157 forks source link

Deprecation warning on startup #691

Open kneekoo opened 3 years ago

kneekoo commented 3 years ago

Describe the bug A few deprecation notices, just something for the to do list.

Terminal output

nicu@nas:~$ mintupdate
nicu@nas:~$ /usr/lib/linuxmint/mintUpdate/mintUpdate.py:1274: DeprecationWarning: Gdk.threads_init is deprecated
  Gdk.threads_init()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1422: DeprecationWarning: Gtk.ImageMenuItem.set_image is deprecated
  menuItem3.set_image(image)
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:722: DeprecationWarning: Gdk.threads_enter is deprecated
  Gdk.threads_enter()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:729: DeprecationWarning: Gdk.threads_leave is deprecated
  Gdk.threads_leave()

To Reproduce Start mintUpdate from the terminal.

Expected behavior No warnings.

Distribution: Linux Mint 20.2

Software version: mintUpdate 5.7.8

xenopeek commented 3 years ago

These warnings may become relevant with Linux Mint 21 development cycle, when moving to a newer package base that may have a newer Gdk version. They are not bugs; the program is not doing something differently from what it is designed to do.

kneekoo commented 3 years ago

gdk_threads_init(), gdk-threads-enter(), gdk_threads_leave():

gdk_threads_init/gdk_threads_enter/gdk_threads_leave has been deprecated since version 3.6 and should not be used in newly-written code. All GDK and GTK+ calls should be made from the main thread

What's really weird is that the stable Gtk documentation doesn't mention the deprecation of Gtk.ImageMenuItem.set_image. The only place I found mentioning this is the Vala documentation:

Warning: ImageMenuItem is deprecated since 3.10.

So it will matter in the future, but the they don't say when they'll remove these. Maybe that's because they plan keeping them for longer.

timur-g commented 5 months ago

Still in Mint 21.3.