Expand Up
@@ -48,7 +48,7 @@
ServerFactory ,
)
from twisted .internet .ssl import ClientContextFactory
from twisted .names .dns import Query
from twisted .names .dns import Query , RRHeader
from twisted .protocols .tls import TLSMemoryBIOProtocol
from twisted .python .runtime import platform
Expand Down
Expand Up
@@ -104,7 +104,7 @@ def getDestination() -> IAddress:
class IResolverSimple (Interface ):
def getHostByName (name : str , timeout : Sequence [int ]) -> "Deferred" :
def getHostByName (name : str , timeout : Sequence [int ]) -> "Deferred[str] " :
"""
Resolve the domain name C{name} into an IP address.
Expand Down
Expand Up
@@ -221,7 +221,9 @@ def resolveHostName(
class IResolver (IResolverSimple ):
def query (query : "Query" , timeout : Sequence [int ]) -> "Deferred" :
def query (
query : "Query" , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Dispatch C{query} to the method which can handle its type.
Expand All
@@ -239,7 +241,9 @@ def query(query: "Query", timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupAddress (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupAddress (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an A record lookup.
Expand All
@@ -256,7 +260,9 @@ def lookupAddress(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupAddress6 (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupAddress6 (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an A6 record lookup.
Expand All
@@ -273,7 +279,9 @@ def lookupAddress6(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupIPV6Address (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupIPV6Address (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an AAAA record lookup.
Expand All
@@ -290,7 +298,9 @@ def lookupIPV6Address(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupMailExchange (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupMailExchange (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an MX record lookup.
Expand All
@@ -307,7 +317,9 @@ def lookupMailExchange(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupNameservers (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupNameservers (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an NS record lookup.
Expand All
@@ -324,7 +336,9 @@ def lookupNameservers(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupCanonicalName (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupCanonicalName (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform a CNAME record lookup.
Expand All
@@ -341,7 +355,9 @@ def lookupCanonicalName(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupMailBox (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupMailBox (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an MB record lookup.
Expand All
@@ -358,7 +374,9 @@ def lookupMailBox(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupMailGroup (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupMailGroup (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an MG record lookup.
Expand All
@@ -375,7 +393,9 @@ def lookupMailGroup(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupMailRename (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupMailRename (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an MR record lookup.
Expand All
@@ -392,7 +412,9 @@ def lookupMailRename(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupPointer (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupPointer (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform a PTR record lookup.
Expand All
@@ -409,7 +431,9 @@ def lookupPointer(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupAuthority (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupAuthority (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an SOA record lookup.
Expand All
@@ -426,7 +450,9 @@ def lookupAuthority(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupNull (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupNull (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform a NULL record lookup.
Expand All
@@ -443,7 +469,9 @@ def lookupNull(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupWellKnownServices (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupWellKnownServices (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform a WKS record lookup.
Expand All
@@ -460,7 +488,9 @@ def lookupWellKnownServices(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupHostInfo (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupHostInfo (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform a HINFO record lookup.
Expand All
@@ -477,7 +507,9 @@ def lookupHostInfo(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupMailboxInfo (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupMailboxInfo (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an MINFO record lookup.
Expand All
@@ -494,7 +526,9 @@ def lookupMailboxInfo(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupText (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupText (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform a TXT record lookup.
Expand All
@@ -511,7 +545,9 @@ def lookupText(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupResponsibility (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupResponsibility (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an RP record lookup.
Expand All
@@ -528,7 +564,9 @@ def lookupResponsibility(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupAFSDatabase (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupAFSDatabase (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an AFSDB record lookup.
Expand All
@@ -545,7 +583,9 @@ def lookupAFSDatabase(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupService (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupService (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an SRV record lookup.
Expand All
@@ -562,7 +602,9 @@ def lookupService(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupAllRecords (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupAllRecords (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an ALL_RECORD lookup.
Expand All
@@ -579,7 +621,9 @@ def lookupAllRecords(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupSenderPolicy (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupSenderPolicy (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform a SPF record lookup.
Expand All
@@ -596,7 +640,9 @@ def lookupSenderPolicy(name: str, timeout: Sequence[int]) -> "Deferred":
C{NotImplementedError}.
"""
def lookupNamingAuthorityPointer (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupNamingAuthorityPointer (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform a NAPTR record lookup.
Expand All
@@ -613,7 +659,9 @@ def lookupNamingAuthorityPointer(name: str, timeout: Sequence[int]) -> "Deferred
C{NotImplementedError}.
"""
def lookupZone (name : str , timeout : Sequence [int ]) -> "Deferred" :
def lookupZone (
name : str , timeout : Sequence [int ]
) -> "Deferred[Tuple[RRHeader, RRHeader, RRHeader]]" :
"""
Perform an AXFR record lookup.
Expand Down
Expand Up
@@ -1287,7 +1335,7 @@ class IReactorCore(Interface):
"I{during shutdown} and C{False} the rest of the time."
)
def resolve (name : str , timeout : Sequence [int ]) -> "Deferred" :
def resolve (name : str , timeout : Sequence [int ]) -> "Deferred[str] " :
"""
Return a L{twisted.internet.defer.Deferred} that will resolve
a hostname.
Expand Down
Expand Up
@@ -2559,15 +2607,15 @@ def setTTL(ttl: int) -> None:
Set time to live on multicast packets.
"""
def joinGroup (addr : str , interface : str ) -> "Deferred" :
def joinGroup (addr : str , interface : str ) -> "Deferred[None] " :
"""
Join a multicast group. Returns L{Deferred} of success or failure.
If an error occurs, the returned L{Deferred} will fail with
L{error.MulticastJoinError}.
"""
def leaveGroup (addr : str , interface : str ) -> "Deferred" :
def leaveGroup (addr : str , interface : str ) -> "Deferred[None] " :
"""
Leave multicast group, return L{Deferred} of success.
"""
Expand All
@@ -2581,7 +2629,7 @@ class IStreamClientEndpoint(Interface):
@since: 10.1
"""
def connect (protocolFactory : IProtocolFactory ) -> "Deferred" :
def connect (protocolFactory : IProtocolFactory ) -> "Deferred[IProtocol] " :
"""
Connect the C{protocolFactory} to the location specified by this
L{IStreamClientEndpoint} provider.
Expand All
@@ -2602,7 +2650,7 @@ class IStreamServerEndpoint(Interface):
@since: 10.1
"""
def listen (protocolFactory : IProtocolFactory ) -> "Deferred" :
def listen (protocolFactory : IProtocolFactory ) -> "Deferred[IListeningPort] " :
"""
Listen with C{protocolFactory} at the location specified by this
L{IStreamServerEndpoint} provider.
Expand Down