Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: users

pyzor: DeprecationWarning: the sha module is deprecated; use the hashlib module instead

 

 

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded


Mark.Martinec+sa at ijs

Nov 5, 2009, 3:00 AM

Post #1 of 3 (164 views)
Permalink
pyzor: DeprecationWarning: the sha module is deprecated; use the hashlib module instead

Warren, this comes from your log (unrelated to the reported problem).
Nevertheless, I'd like to point out the solution for the benefit of
archive and others:

[6137] dbg: pyzor: got response: /usr/lib/python2.6/site-packages/pyzor/
__init__.py:11: DeprecationWarning:
the sha module is deprecated; use the hashlib module instead\n
import sha\n/usr/lib/python2.6/site-packages/pyzor/client.py:12:
DeprecationWarning: the multifile module has been deprecated
since Python 2.5\n import multifile
[6137] dbg: info: leaving helper-app run mode
[6137] dbg: pyzor: failure to parse response "/usr/lib/python2.6/
site-packages/pyzor/__init__.py:11: DeprecationWarning:
the sha module is deprecated; use the hashlib module instead"
[6137] dbg: pyzor: failure to parse response " import sha"
[6137] dbg: pyzor: failure to parse response "/usr/lib/python2.6/
site-packages/pyzor/client.py:12: DeprecationWarning:
the multifile module has been deprecated since Python 2.5"

These warnings make the SpamAssassin's Pyzor plugin inoperative.
Until the pyzor gets updated to switch to a new module,
the current solution is to add an option: -Wignore::DeprecationWarning
to the first line of the 'pyzor' executable, e.g. /usr/local/bin/pyzor

In my case (FreeBSD) that would be:

#!/usr/local/bin/python -Wignore::DeprecationWarning


Mark


wtogami at redhat

Nov 5, 2009, 7:05 AM

Post #2 of 3 (149 views)
Permalink
Re: pyzor: DeprecationWarning: the sha module is deprecated; use the hashlib module instead [In reply to]

On 11/05/2009 06:00 AM, Mark Martinec wrote:
>
> #!/usr/local/bin/python -Wignore::DeprecationWarning
>
>
> Mark

It appears to be broken here with a different error after applying this
patch.

--- pyzor-0.5.0.orig/scripts/pyzor 2009-04-29 16:53:50.000000000 -0400
+++ pyzor-0.5.0/scripts/pyzor 2009-11-05 09:28:20.997618751 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python -Wignore::DeprecationWarning

import os
# set umask

Working RHEL5
=============
pyzor-0.5.0-1.el5
python-2.4.3-27.el5

[12975] dbg: util: executable for pyzor was found at /usr/bin/pyzor
[12975] dbg: pyzor: pyzor is available: /usr/bin/pyzor
[12975] dbg: info: entering helper-app run mode
[12975] dbg: pyzor: opening pipe: /usr/bin/pyzor check <
/tmp/.spamassassin12975PtxGr7tmp
[12979] dbg: util: setuid: ruid=501 euid=501
[12975] dbg: pyzor: [12979] finished successfully
[12975] dbg: pyzor: got response: public.pyzor.org:24441 (200, 'OK') 43 0
[12975] dbg: info: leaving helper-app run mode
[12975] dbg: pyzor: listed: COUNT=43/5 WHITELIST=0

Broken Fedora 12
================
python-2.6.2-2.fc12.x86_64
pyzor-0.5.0-3.fc12.noarch

[3661] dbg: util: current PATH is:
/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/warren/bin
[3661] dbg: util: executable for pyzor was found at /usr/bin/pyzor
[3661] dbg: pyzor: pyzor is available: /usr/bin/pyzor
[3661] dbg: info: entering helper-app run mode
[3661] dbg: pyzor: opening pipe: /usr/bin/pyzor check <
/tmp/.spamassassin3661XwqUhNtmp
[3663] dbg: util: setuid: ruid=500 euid=500
[3661] dbg: pyzor: killed stale helper [3663]
[3661] info: pyzor: [3663] error: TERMINATED, signal 15 (000f)
[3661] dbg: info: leaving helper-app run mode
[3661] dbg: pyzor: check timed out after 3.5 seconds

Warren Togami
wtogami[at]redhat.com


Mark.Martinec+sa at ijs

Nov 5, 2009, 7:40 AM

Post #3 of 3 (150 views)
Permalink
Re: pyzor: DeprecationWarning: the sha module is deprecated; use the hashlib module instead [In reply to]

Warren,

> It appears to be broken here with a different error after applying this
> patch.

> [3661] dbg: pyzor: opening pipe: /usr/bin/pyzor check <
> /tmp/.spamassassin3661XwqUhNtmp
> [3663] dbg: util: setuid: ruid=500 euid=500
> [3661] dbg: pyzor: killed stale helper [3663]
> [3661] info: pyzor: [3663] error: TERMINATED, signal 15 (000f)
> [3661] dbg: info: leaving helper-app run mode
> [3661] dbg: pyzor: check timed out after 3.5 seconds

That's most likely unrelated.
Try the /usr/bin/pyzor check <0.msg from a command line.
Perhaps it does not have its server configured (pyzor discover).

Mark

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.