Pyzor DeprecatedWarning causes spamassassin to fail to parse

Bug #394775 reported by Benoit Grégoire
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
pyzor (Ubuntu)
Fix Released
Undecided
Unassigned
Jaunty
Won't Fix
Undecided
Unassigned

Bug Description

Can be fixed by replacing the first line of /usr/bin/pyzor:

#!/usr/bin/python

with

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

spamassassin will then parse properly.

To verify:

wget http://www200.pair.com/mecham/spam/sample-spam.txt
spamassassin -D pyzor <sample-spam.txt

With the patch above, you should no longuer see errors about failing to parse response.

Revision history for this message
Alessio Treglia (quadrispro) wrote :

Can you show me what message you receive?

Changed in pyzor (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pyzor - 1:0.5.0-0ubuntu2

---------------
pyzor (1:0.5.0-0ubuntu2) karmic; urgency=low

  * debian/rules: Add simple-patchsys support.
  * Add 01-python26_warnings.patch to fix Python 2.6 DeprecationWarning due to
    the use of deprecated sha module (LP: #394775).
  * Bump Standards, no change required.

 -- Alessio Treglia <email address hidden> Sat, 01 Aug 2009 06:29:35 +0200

Changed in pyzor (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Alessio Treglia (quadrispro) wrote :

Still present in Jaunty:

alessio@quadromatic:~$ pyzor
/var/lib/python-support/python2.6/pyzor/__init__.py:11: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import sha
/var/lib/python-support/python2.6/pyzor/client.py:10: DeprecationWarning: the multifile module has been deprecated since Python 2.5
  import multifile

usage: /usr/bin/pyzor [-d] [--homedir dir] command [cmd_opts]
command is one of: check, report, discover, ping, digest, predigest,
                   genkey

Data is read on standard input (stdin).

Revision history for this message
Michael (miiichael) wrote :

Still present in lucid:

michael@cnspc18:~$ pyzor check </tmp/tmp.msg
/usr/lib/pymodules/python2.6/pyzor/client.py:12: DeprecationWarning: the multifile module has been deprecated since Python 2.5
  import multifile
/usr/lib/pymodules/python2.6/pyzor/__init__.py:429: DeprecationWarning: object.__init__() takes no parameters
  super(ThreadId, self).__init__(i)
public.pyzor.org:24441 (200, 'OK') 0 0

michael@cnspc18:~$ dpkg -l python python2.6 python-support pyzor
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-============================-============================-========================================================================
ii python 2.6.5-0ubuntu1 An interactive high-level object-oriented language (default version)
ii python-support 1.0.4ubuntu1 automated rebuilding support for Python modules
ii python2.6 2.6.5-1ubuntu6 An interactive high-level object-oriented language (version 2.6)
ii pyzor 1:0.5.0-0ubuntu2 spam-catcher using a collaborative filtering network

Revision history for this message
Alderinks (stephen-alderink) wrote :

I was able to trace the fix for this through the Fedora bug service.
These fixes are tested with Python2.6

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Closing jaunty task as jaunty is past EOL

Changed in pyzor (Ubuntu Jaunty):
status: New → Won't Fix
Revision history for this message
IKT (ikt) wrote :

I take it this is fixed in maverick and natty?

Can anyone confirm?

Revision history for this message
Benoit Grégoire (benoitg) wrote :

I can confirm it is fixed on Maverick

Revision history for this message
IKT (ikt) wrote :

Cheers

Revision history for this message
Simon Déziel (sdeziel) wrote :

I confirm Michael's comment (#4) as I still see this in Lucid :

$ spamassassin -D pyzor <spam.eml > /dev/null
Oct 12 13:58:28.612 [10736] dbg: pyzor: network tests on, attempting Pyzor
Oct 12 13:58:30.331 [10736] dbg: pyzor: pyzor is available: /usr/bin/pyzor
Oct 12 13:58:30.332 [10736] dbg: pyzor: opening pipe: /usr/bin/pyzor check < /tmp/.spamassassin10736nbifbwtmp
Oct 12 13:58:30.515 [10736] dbg: pyzor: [10737] finished successfully
Oct 12 13:58:30.515 [10736] dbg: pyzor: got response: /usr/lib/pymodules/python2.6/pyzor/client.py:12: DeprecationWarning: the multifile module has been deprecated since Python 2.5\n import multifile\n/usr/lib/pymodules/python2.6/pyzor/__init__.py:429: DeprecationWarning: object.__init__() takes no parameters\n super(ThreadId, self).__init__(i)\npublic.pyzor.org:24441 (200, 'OK') 818 0
Oct 12 13:58:30.516 [10736] dbg: pyzor: failure to parse response "/usr/lib/pymodules/python2.6/pyzor/client.py:12: DeprecationWarning: the multifile module has been deprecated since Python 2.5"
Oct 12 13:58:30.516 [10736] dbg: pyzor: failure to parse response " import multifile"
Oct 12 13:58:30.516 [10736] dbg: pyzor: failure to parse response "/usr/lib/pymodules/python2.6/pyzor/__init__.py:429: DeprecationWarning: object.__init__() takes no parameters"
Oct 12 13:58:30.517 [10736] dbg: pyzor: failure to parse response " super(ThreadId, self).__init__(i)"
Oct 12 13:58:30.517 [10736] dbg: pyzor: listed: COUNT=818/5 WHITELIST=0

The problem is that the only the sha depreciation warning was addressed. There are still 2 more warnings :

$ pyzor ping
/usr/lib/pymodules/python2.6/pyzor/client.py:12: DeprecationWarning: the multifile module has been deprecated since Python 2.5
  import multifile
/usr/lib/pymodules/python2.6/pyzor/__init__.py:429: DeprecationWarning: object.__init__() takes no parameters
  super(ThreadId, self).__init__(i)
public.pyzor.org:24441 (200, 'OK')

Revision history for this message
Simon Déziel (sdeziel) wrote :

Apparently this does not prevent Spamassassin from properly interpret pyzor results. The depreciation warnings are not completely addressed though. When using the workaround suggested in the bug report (add -Wignore::DeprecationWarning) I get this clean debug output :

$ spamassassin -D pyzor <spam.eml > /dev/null
Oct 12 14:12:01.871 [11753] dbg: pyzor: network tests on, attempting Pyzor
Oct 12 14:12:04.645 [11753] dbg: pyzor: pyzor is available: /usr/bin/pyzor
Oct 12 14:12:04.645 [11753] dbg: pyzor: opening pipe: /usr/bin/pyzor check < /tmp/.spamassassin11753rQcVjLtmp
Oct 12 14:12:04.828 [11753] dbg: pyzor: [11754] finished successfully
Oct 12 14:12:04.828 [11753] dbg: pyzor: got response: public.pyzor.org:24441 (200, 'OK') 818 0
Oct 12 14:12:04.829 [11753] dbg: pyzor: listed: COUNT=818/5 WHITELIST=0

This is only a workaround though.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.