def get_unused_port_ipv6():
 (port, s) = get_unused_port_and_socket_ipv6()
 s.close()
 return port

def get_unused_port_ipv6 ( ) : ( port , s ) = get_unused_port_and_socket_ipv6 ( ) s . close ( ) return port
returns an unused port on localhost on ipv6 .