SpamExperts / pyzor

Pyzor is a Python implementation of a spam-blocking networked system that use spam signatures to identify them.
GNU General Public License v2.0
139 stars 31 forks source link

deprecation warning with python 3.11 #164

Open hannob opened 1 year ago

hannob commented 1 year ago

Version information

Git snapshot.

Steps to replicate

  1. run "pyzor ping" with PYTHONWARNINGS=d variable set.

Actual result

It shows a deprecation warning about the warn method of the logger and a warning about an unclosed socket:

$ PYTHONWARNINGS=d pyzor ping
/usr/lib/python3.11/site-packages/pyzor/config.py:170: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
  log.warn("No accounts are setup.  All commands will be executed by "
/usr/lib/python3.11/site-packages/pyzor/client.py:258: ResourceWarning: unclosed <socket.socket fd=3, family=2, type=2, proto=17, laddr=('0.0.0.0', 44911)>
  response = self.routine(*args, **kwargs)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
public.pyzor.org:24441  (200, 'OK')

Expected result

No warnings.

Other notes