Martin Panter added the comment: I tried the original revision 433606e9546c code in Python 2.7 (which still allows mixed tabs and spaces), and it behaves the same as the current version. Thus I suspect revision 9e2b94a3b5dc did not change any behaviour.
What is your use case? Why can’t you just pass the address without square brackets: >>> con = HTTPConnection("fe80::26a9:37ff:fe00:f764", 15482) >>> (con.host, con.port) ('fe80::26a9:37ff:fe00:f764', 15482) How do you come by an IPv6 address in square brackets, but with the port number separate? You can use urlsplit() to extract the “hostname” and “port” attributes from a URL, but in that case “hostname” does not include the square brackets: >>> urlsplit("//[fe80::26a9:37ff:fe00:f764]:15482").hostname 'fe80::26a9:37ff:fe00:f764' ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28539> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com