--- a/eric6/E5Network/__init__.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/E5Network/__init__.py Tue Mar 02 17:17:09 2021 +0100 @@ -33,7 +33,10 @@ @rtype bool """ h = QHostAddress(address) - return not h.isNull() and h.protocol() == QAbstractSocket.IPv4Protocol + return ( + not h.isNull() and + h.protocol() == QAbstractSocket.NetworkLayerProtocol.IPv4Protocol + ) def isValidIPv6Address(address): @@ -46,4 +49,7 @@ @rtype bool """ h = QHostAddress(address) - return not h.isNull() and h.protocol() == QAbstractSocket.IPv6Protocol + return ( + not h.isNull() and + h.protocol() == QAbstractSocket.NetworkLayerProtocol.IPv6Protocol + )