DeprecationWarning: site-package/rq/job.py


It says: …/site-package/rq/job/.py:610: DeprecationWarning: distutils Version classes are deprecated. Use packageing.Version instead.
The warn roll again and again. How to get rid of it ?

the code invoke the warning is:
if self.get_redis_server_version() >= StrictVersion(“4.0.0”)

My redis version is 4.1.4

Check here

Thanks!The problem solved after run the command:

bench pip install --upgrade rq

But new warn appear,

My system redis version is 4.1.4,but the frappe evn version is still 3.5.3. So I also upgrad the redis ,hope it works .
Maybe the requestment.txt is outdated.

1 Like

its only the deprecation warning…

It doesn’t have much affect on the working of ERPNext except for the pesky warnings… just upgrade your bench, frappe and erpnext

2 Likes

So, what would be the complete set of commands that one should execute to be completely free of those warnings? (if I may ask, please)

You can run the following command to upgrade rq, redis to get rid of the warnings.

$ bench pip install --upgrade rq redis
3 Likes

That’s great! Thanx.

I still have a warnings infestation on bench start:

/home/erpadm/frappe-bench-ERPLS/env/lib/python3.8/site-packages/past/builtins/misc.py:45: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
from imp import reload
/home/erpadm/frappe-bench-ERPLS/env/lib/python3.8/site-packages/bleach_whitelist/bleach_whitelist.py:3: DeprecationWarning: bleach-whitelist has been renamed bleach-allowlist. It will not receive further updates under the old name. See https://pypi.org/project/bleach-allowlist
warnings.warn(

I am guessing I would need to patch the source to fix those. Fortunately, I only see them once, on start up.

The others were a much more serious issue for me. It is terribly unprofessional, in my opinion, to just “live with” spurious logs and repeatedly poke through hundreds of useless lines to find something that might be important.