Annoying redis deprecation warning polluting logs

Every two minutes this warning text appears eight times:

01:30:02 schedule.1 | /home/erp/LCS_bench/env/lib/python3.8/site-packages/rq/job.py:610: 
              DeprecationWarning: distutils Version classes are deprecated. 
              Use packaging.version instead.
01:30:02 schedule.1 |   if self.get_redis_server_version() >= StrictVersion("4.0.0"):

How can I upgrade to the correct version?
How could I suppress the warning?

Hi Martin,

This looks like an package problem with Python RQ, well outside of our control.

Here’s a link to their Discord server, if you want to chat with Python RQ folks.

Hi Brian!

Thanks for the suggestion, but I appear to have nailed it. :astonished:

I just now tried:

bench pip install --upgrade rq

It replied:

erp@erp:~/LCS_bench$ bench pip install --upgrade rq
Requirement already satisfied: rq in ./env/lib/python3.8/site-packages (1.8.1)
Collecting rq
  Downloading rq-1.10.1-py2.py3-none-any.whl (70 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.4/70.4 KB 1.3 MB/s eta 0:00:00
Requirement already satisfied: click>=5.0.0 in ./env/lib/python3.8/site-packages (from rq) (7.1.2)
Requirement already satisfied: redis>=3.5.0 in ./env/lib/python3.8/site-packages (from rq) (3.5.3)
Installing collected packages: rq
  Attempting uninstall: rq
    Found existing installation: rq 1.8.1
    Uninstalling rq-1.8.1:
      Successfully uninstalled rq-1.8.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
frappe 13.19.0 requires rq~=1.8.0, but you have rq 1.10.1 which is incompatible.
Successfully installed rq-1.10.1

… Despite the complaint, it seems to have worked and I’ve seen no dire consequences so far.

3 Likes