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

Python 3 Errors #52

Closed
exhuma opened this issue Feb 7, 2014 · 4 comments
Closed

Python 3 Errors #52

exhuma opened this issue Feb 7, 2014 · 4 comments

Comments

@exhuma
Copy link

exhuma commented Feb 7, 2014

Even though it is marketed as such, it is not working properly on Python 3. I get:

AttributeError: 'dict' object has no attribute 'iteritems'

I will address Python 2/3 compatibility in my fork. I will aim for Python 2.7 an Python 3.3.

@exhuma
Copy link
Author

exhuma commented Feb 7, 2014

Hmmm... after diving into the repo, I discovered the python3 branch. That branch makes the iteritems change right on the first commit. So I am wondering why pip did not install the python 3 version... has it not been published yet? I'm a bit curious, as the web-page states that 1.11.1 should be py3 compatible.

@ThomasWaldmann
Copy link
Contributor

excerpt from our setup.py:

if PY2:
    install_requires = ['dnspython', ]
else:
    install_requires = ['dnspython3', ]

@rthalley
Copy link
Owner

rthalley commented Feb 7, 2014

On Feb 7, 2014, at 2:30, exhuma notifications@github.com wrote:

Hmmm... after diving into the repo, I discovered the python3 branch. That branch makes the iteritems change right on the first commit. So I am wondering why pip did not install the python 3 version... has it not been published yet? I'm a bit curious, as the web-page states that 1.11.1 should be py3 compatible

As someone else pointed out, the Python 3 version of dnspython is called dnspython3. Dnspython does a lot of things with strings in Python 2.x where sometimes the strings are text and sometimes they are really what Python 3.x uses bytes for; it was not possible to have a backwards compatible API that worked with both. The are released in parallel with the same version numbers.

@exhuma
Copy link
Author

exhuma commented Feb 7, 2014

I see. I just made the discovery myself :)

Thanks for the reply though... I consider this problem solved.

@exhuma exhuma closed this as completed Feb 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants