[Twisted-Python] IPv6 comparison handling

Maciej Wasilak wasilak at gmail.com
Sun Apr 24 13:21:41 MDT 2016


Hello,

In my UDP Twisted based library there is a problem with IPv6 addresses
representation. Addresses are compared as simple strings, and it
sometimes causes mismatches:

"fe80::aaaa:bbff:fecc:dddd" should be equal to
"fe80:0000:0000:0000:aaaa:bbff:fecc:dddd"

I've noticed that Python 3 has nice new module "ipaddress" exactly for
this kind of problems, and it has been backported to Python 2.7.
Before I add it as a new dependency I wanted to ask if maybe Twisted
has some other suggested solution for this problem?

Best Regards
Maciej Wasilak



More information about the Twisted-Python mailing list