SpamExperts/pyzor

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

Opened this issue · 3 comments

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

As mentioned in the comment

#145 (comment)

this seems to work:

pip3 install https://github.com/SpamExperts/pyzor/archive/refs/heads/master.zip

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/

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.