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.2 support #15

Closed
tkem opened this issue Nov 23, 2014 · 2 comments
Closed

Python 3.2 support #15

tkem opened this issue Nov 23, 2014 · 2 comments

Comments

@tkem
Copy link
Contributor

tkem commented Nov 23, 2014

ipaddress was introduced in Python 3.3, so a backport to Python 3.2, which is still widely used, would be nice.

The first problem I ran into when trying to use this module unter Python 3.2 is that it uses the u'string' notation for Unicode strings, which was originally available in 2.x only, and was re-introduced in Python 3.3 (I think).

So to make this work under all Python versions, I suggest to add

from __future__ import unicode_literals

and change all unicode string literals to playin string literals, i.e. u'foo' -> 'foo'. Byte strings can still be specified as b'bar', since that's supported under all relevant Python versions.

If there's interest in porting this module to Python 3.2, I can give it a try myself and provide a pull request eventually.

@phihag
Copy link
Owner

phihag commented Nov 23, 2014

Yes, that sounds like a great idea!

@tkem tkem mentioned this issue Nov 23, 2014
@phihag
Copy link
Owner

phihag commented Nov 26, 2014

ipaddress 1.0.7 and newer now support 3.2.

@phihag phihag closed this as completed Nov 26, 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

2 participants