Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 dict.iterims not working -> replace with dict.items #39

Open
pstauffer opened this issue Jan 7, 2016 · 2 comments
Open

Python3 dict.iterims not working -> replace with dict.items #39

pstauffer opened this issue Jan 7, 2016 · 2 comments
Labels
Milestone

Comments

@pstauffer
Copy link
Contributor

Python 3 renamed dict.iteritems -> dict.items
Remove dict.iteritems(), dict.iterkeys(), and dict.itervalues().
Instead: use dict.items(), dict.keys(), and dict.values() respectively.

https://wiki.python.org/moin/Python3.0

The command "ls -l ../ansibleci" exited with 0.
0.10s$ python ../ansibleci/test.py
Traceback (most recent call last):
  File "../ansibleci/test.py", line 35, in <module>
    main()
  File "../ansibleci/test.py", line 19, in main
    config = Config(load_defaults=True)
  File "/home/travis/build/pstauffer/ansibleci/ansibleci/config.py", line 35, in __init__
    self.add_module(ansibleci.defaults)
  File "/home/travis/build/pstauffer/ansibleci/ansibleci/config.py", line 65, in add_module
    for key, value in module.__dict__.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
The command "python ../ansibleci/test.py" exited with 1.
@pstauffer pstauffer added the bug label Jan 7, 2016
@pstauffer pstauffer added this to the v1.0 milestone Jan 7, 2016
@domibarton domibarton modified the milestones: future, v1.0 Jan 7, 2016
@domibarton
Copy link
Member

Don't know if we're really Python 3 ready.
We need to check all Python modules we're using first, for example:

  • PyYAML
  • Ansible (future syntax check)

I think we shouldn't make this mandatory for v1.0

@pstauffer
Copy link
Contributor Author

Agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants