xpra icon
Bug tracker and wiki

Opened 3 months ago

Closed 3 months ago

#2177 closed task (fixed)

runtime python warnings

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 2.5
Component: core Version: 2.4.x
Keywords: Cc:

Description

Similar to #2155 but this is for runtime warnings exposed using:

PYTHONWARNINGS=all xpra ...

Change History (1)

comment:1 Changed 3 months ago by Antoine Martin

Resolution: fixed
Status: newclosed
  • r21881 file leak fixed (harmless)
  • r21882 stop calling threads_init() everywhere unnecessarily
  • r21883 gobject and gtk warnings
  • r21884 child-reaper (not effective..)

Server-side, the python2 server runs without any warnings.
With python3:

  • some paramiko deprecation warnings (looks trivial):
    /usr/lib/python3.7/site-packages/paramiko/hostkeys.py:23: \
        DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    
  • python-uinput warning (looks trivial):
    /usr/lib64/python3.7/site-packages/uinput/__init__.py:86: \
        DeprecationWarning: SO is deprecated, use EXT_SUFFIX
      _libsuinput_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "_libsuinput" + sysconfig.get_config_var("SO")))
    
  • lots of python-dbus warnings
  • not sure what this is:
    (Xpra:29448): Gtk-CRITICAL **: 11:09:59.055: gtk_widget_realize: assertion 'widget->priv->anchored || GTK_IS_INVISIBLE (widget)' failed
    

just preceding:

2019-02-26 11:12:23,916 ignoring TEMP window 0x400008
2019-02-26 11:12:23,916 ignoring TEMP window 0x40000b
2019-02-26 11:12:23,916 ignoring TEMP window 0x40000e

Client side:

  • dumb warning messages not showing what import is causing the actual warning:
    /usr/lib64/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
      return f(*args, **kwds)
    
  • GTK wants us to stop using screens - meh:
    /usr/lib64/python3.7/site-packages/xpra/platform/xposix/gl_context.py:79: \
        DeprecationWarning: Gdk.Screen.get_number is deprecated
      xvinfo = GLX.glXChooseVisual(self.xdisplay, screen.get_number(), attrs)
    
  • GTK wants us to listen for specific input devices - meh:
    /usr/lib64/python3.7/site-packages/xpra/client/gtk_base/gtk_client_base.py:674: \
        DeprecationWarning: Gdk.Window.get_pointer is deprecated
      modifiers_mask = self.get_root_window().get_pointer()[-1]
    
  • GTK is still trying to alienate developers by removing some very useful features:
    /usr/lib64/python3.7/site-packages/xpra/gtk_common/gtk_util.py:1266: \
        DeprecationWarning: Gtk.ImageMenuItem.set_image is deprecated
      menu_item.set_image(image)
    /usr/lib64/python3.7/site-packages/xpra/gtk_common/gtk_util.py:1271: \
        DeprecationWarning: Gtk.ImageMenuItem.set_always_show_image is deprecated
      menu_item.set_always_show_image(True)
    
  • GTK has no replacement for the statusicon they want to remove, so it spews out lots of totally unhelpful warnings there too
  • GTK doesn't want us to use set_wmclass - we can always switch to the native API if we have to:
    /usr/lib64/python3.7/site-packages/xpra/client/gtk_base/gtk_client_window_base.py:882: \
        DeprecationWarning: Gtk.Window.set_wmclass is deprecated
      self.set_wmclass(wmclass_name, wmclass_class)
    
  • can't remember where this is from, but I think we still need it:
    /usr/lib64/python3.7/site-packages/gi/overrides/GdkPixbuf.py:45: \
       PyGIDeprecationWarning: destroy_fn_data argument deprecated
      warnings.warn(w)
    

This will do for now, and probably good enough until GTK4 - hopefully we can avoid moving to that.

Note: See TracTickets for help on using tickets.