thefactory/marathon-python

Failed to import marathon in python3

Closed this issue · 4 comments

in a python3 environment I can't import marathon:
$ python
Python 3.6.2 (default, Aug 11 2017, 11:59:59)
[GCC 7.1.1 20170622 (Red Hat 7.1.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.

import marathon
Traceback (most recent call last):
File "", line 1, in
File "/home/fedora/magnum/.tox/py36/lib/python3.6/site-packages/marathon/init.py", line 3, in
from .client import MarathonClient
File "/home/fedora/magnum/.tox/py36/lib/python3.6/site-packages/marathon/client.py", line 16, in
from .models.events import EventFactory, MarathonEvent
File "/home/fedora/magnum/.tox/py36/lib/python3.6/site-packages/marathon/models/events.py", line 150, in
class EventFactory:
File "/home/fedora/magnum/.tox/py36/lib/python3.6/site-packages/marathon/models/events.py", line 190, in EventFactory
class_to_event = dict((v, k) for k, v in event_to_class.iteritems())
AttributeError: 'dict' object has no attribute 'iteritems'

Here is the solution :)
c74a4fb#diff-7341e3285185c7c5ea407e0bc3f9b7ecL190

Can you do a point release for this fix?

:( I guess that means the travis coverage isn't sufficient to test this on python3.

@fengyehong would you like to fix this for python3? If not I'll have to revert your change.

Oh wait, I misunderstood, the fix is already in master.

Got it, I'll make a point release at your request.

It's not a code coverage issue.
Travis log shows python3 tests didn't ran, maybe something wrong with the configuration