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

packed is a bytearray on some platforms and str on others #28

Closed
oschwald opened this issue Jan 11, 2017 · 2 comments
Closed

packed is a bytearray on some platforms and str on others #28

oschwald opened this issue Jan 11, 2017 · 2 comments

Comments

@oschwald
Copy link

See maxmind/GeoIP2-python#41

On Ubuntu using 2.7.13, type(ipaddress.ip_address(u'128.101.101.101').packed) returns <type 'str'>, but the user in that issue is reporting receiving <type 'bytearray'> on macOS 10.12.2.

@oschwald oschwald changed the title packed returns bytearray on some platforms and str on others packed is a bytearray on some platforms and str on others Jan 11, 2017
@phihag
Copy link
Owner

phihag commented Jan 11, 2017

I strongly suspect the original poster is using py2-ipaddress instead of this backport. I regard py2-ipaddress as dangerous and defective for the reasons outlined here. I have commented in maxmind/GeoIP2-python#41 and asked for confirmation.

@oschwald
Copy link
Author

Thanks for following up. After testing py2-ipaddress myself, I suspect you are right. I'll close this issue and reopen if the original reporter provides contrary evidence.

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