#NEWLINE# @ classmethod #NEWLINE# def from_uri( cls , uri , entry ) : #NEWLINE# #INDENT# result = urlsplit ( uri ) #NEWLINE# if ( result . scheme == 'https' ) : #NEWLINE# #INDENT# POTENTIAL_HTTPS_PORTS . add ( int ( ( result . port or 443 ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# POTENTIAL_HTTP_PORTS . add ( int ( ( result . port or 80 ) ) ) #NEWLINE# #UNINDENT# return cls ( result . username , uri . password , result . hostname , result . port , result . path , result . query , result . fragment , result . scheme , entry )