You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3 does not support the iteritems() for the dict object:
$ cat p.py
d = {'x':10, 'y':20}
for k, v in d.iteritems():
print(k,v)
$ python2 -V
Python 2.7.6
$ python2 p.py
('y', 20)
('x', 10)
$ python3 -V
Python 3.4.0
$ python3 p.py
Traceback (most recent call last):
File "p.py", line 2, in <module>
for k, v in d.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
So if you want libtaxii to work with Python 3, these calls have to be replaced or made possible by using six. If achieving Python 3 compatibility is deliberately avoided for now, then you can disregard this report. (I couldn't find any explicit mention about this).
libtaxii-master$ find -name '*.py' -exec grep -Hn iteritems {} \;
./libtaxii/messages_10.py:410: for k, v in self.extended_headers.iteritems():
./libtaxii/messages_10.py:428: for k, v in self.extended_headers.iteritems():
./libtaxii/messages_10.py:498: for k, v in d['extended_headers'].iteritems():
./libtaxii/common.py:311: for k, v in self_value.iteritems():
./libtaxii/taxii_default_query.py:708: for k, v in self.parameters.iteritems():
./libtaxii/clients.py:215: for k, v in headers.iteritems():
./libtaxii/__init__.py:83: header_dict = http_response.info().dict.iteritems()
./libtaxii/messages_11.py:1073: for k, v in self.extended_headers.iteritems():
./libtaxii/messages_11.py:1088: for k, v in self.extended_headers.iteritems():
./libtaxii/messages_11.py:1145: for k, v in d['extended_headers'].iteritems():
./libtaxii/messages_11.py:2970: for sd_name, rules in detail_rules.iteritems():
./libtaxii/messages_11.py:2993: for k, v in self.status_detail.iteritems():
./libtaxii/messages_11.py:3022: for k, v in self.status_detail.iteritems():
The text was updated successfully, but these errors were encountered:
I think working with Python 3 is a nice to have, at least for now. If these are the only things preventing Python 3 compatibility, then I think these changes are no brainers to make. Otherwise, I'd be interested in what the full scope of changes required are for Python 3 compatibility.
Python 3 does not support the
iteritems()
for the dict object:So if you want libtaxii to work with Python 3, these calls have to be replaced or made possible by using
six
. If achieving Python 3 compatibility is deliberately avoided for now, then you can disregard this report. (I couldn't find any explicit mention about this).The text was updated successfully, but these errors were encountered: