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
138 stars 31 forks source link

Python3 compatibility: 'dict' object has no attribute 'iteritems' #155

Open Cknight70 opened 1 year ago

Cknight70 commented 1 year ago

Version information

Pyzor 1.0.0 Python 3.10.9

Steps to replicate

  1. Download with pip installation instructions in https://www.pyzor.org/en/latest/installation.html pip install pyzor
  2. type pyzor digest < ~/Desktop/raw\ message.txt in console
  3. should give digest

Actual result

Traceback (most recent call last):
  File "/usr/bin/pyzor", line 408, in <module>
    main()
  File "/usr/bin/pyzor", line 131, in main
    config, options, args = load_configuration()
  File "/usr/bin/pyzor", line 113, in load_configuration
    for key, value in defaults.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

Expected result

Should give digest so I can request my automated registration message to be whitelisted

Other notes

Wtower commented 1 year ago

As mentioned in the comment

https://github.com/SpamExperts/pyzor/issues/145#issuecomment-1376230337

this seems to work:

pip3 install https://github.com/SpamExperts/pyzor/archive/refs/heads/master.zip
psdewar commented 8 months ago

This worked but I'm getting "Digest does not match message." even though I'm just copying and pasting the result into the required input on https://app.pyzor.org/whitelist/

grumpybozo commented 3 months ago

It seems to me that the original reported problem is primarily due to the fact that PyPI is still providing v1.0.0 for pip, which does not work with Python 3 due to (at least) use of xrange and dict.iteritems. Installing from the bleeding-edge head of the master branch gets marked as v1.1.1.