Since , any program importing vdscli issues a user facing
warnings - for example:
$ vdsClient -s 0 getVdsCaps
client/vdsClient.py:35: DeprecationWarning: vdscli uses xmlrpc. since ovirt
3.6 xmlrpc is deprecated, please use vdsm.jsonrpcvdscli
from vdsm import utils, vdscli, constants
This is *not* the purpose of Python's warnings. They are for
developers, not users.
Unfortunately, we configured the warnings filter in vdscli,
so the application importing this module cannot control
This cause unwanted warnings in vdsClient, hosted-engine
and any other program importing this module.
See bug .
Lately we decided to remove the warnings module from vdsm,
as it is leaking memory - one instance of each warning is
kept in a dict even if you configure warning to ignore all
Francesco sent patch , replacing the warning with
log message to the "devel" logger. This fixes the issue
in vdsm, but does not solve the issue for other tools.
I sent this patch  for vdsClient, but we still need a fix
for vdsm-tool, hosted-engine, and any other program importing
So it seems that using a special logger for deprecation
warnings is not a good solution for library like vdscli,
and we should keep the warning module for this
I sent also this minimal patch  that can be easily
backported to 4.0.
Please review, we should fix this regression quickly.
Devel mailing list