r47190 - clarify that this should be str, not bytes
hawkowl-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org Sat, 9 Apr 2016 00:41:36 -0600 (MDT)
| Newsgroups | gmane.comp.python.twisted.commits |
|---|---|
| Message-ID | <[email protected]> |
Author: hawkowl
Date: Sat Apr 9 00:41:31 2016
New Revision: 47190
Modified:
branches/t-names-authority-py3-8259-2/twisted/names/secondary.py
branches/t-names-authority-py3-8259-2/twisted/names/test/test_names.py
Log:
clarify that this should be str, not bytes
Modified: branches/t-names-authority-py3-8259-2/twisted/names/secondary.py
==============================================================================
--- branches/t-names-authority-py3-8259-2/twisted/names/secondary.py (original)
+++ branches/t-names-authority-py3-8259-2/twisted/names/secondary.py Sat Apr 9 00:41:31 2016
@@ -25,9 +25,11 @@
"""
@param primary: The IP address of the server from which to perform
zone transfers.
+ @type primary: L{str}
@param domains: A sequence of domain names for which to perform
zone transfers.
+ @type domains: L{list} of L{bytes}
"""
self.primary = primary
self.domains = [SecondaryAuthority(primary, d) for d in domains]
@@ -45,7 +47,7 @@
C{int} giving a port number. Together, these define where zone
transfers will be attempted from.
- @param domain: A C{str} giving the domain to transfer.
+ @param domain: A C{bytes} giving the domain to transfer.
@return: A new instance of L{SecondaryAuthorityService}.
"""
@@ -100,6 +102,11 @@
_reactor = None
def __init__(self, primaryIP, domain):
+ """
+ @param domain: The domain for which this will be the secondary
+ authority.
+ @type domain: L{bytes}
+ """
# Yep. Skip over FileAuthority.__init__. This is a hack until we have
# a good composition-based API for the complicated DNS record lookup
# logic we want to share.
@@ -112,7 +119,7 @@
def fromServerAddressAndDomain(cls, serverAddress, domain):
"""
Construct a new L{SecondaryAuthority} from a tuple giving a server
- address and a C{str} giving the name of a domain for which this is an
+ address and a C{bytes} giving the name of a domain for which this is an
authority.
@param serverAddress: A two-tuple, the first element of which is a
@@ -120,7 +127,7 @@
C{int} giving a port number. Together, these define where zone
transfers will be attempted from.
- @param domain: A C{str} giving the domain to transfer.
+ @param domain: A C{bytes} giving the domain to transfer.
@return: A new instance of L{SecondaryAuthority}.
"""
Modified: branches/t-names-authority-py3-8259-2/twisted/names/test/test_names.py
==============================================================================
--- branches/t-names-authority-py3-8259-2/twisted/names/test/test_names.py (original)
+++ branches/t-names-authority-py3-8259-2/twisted/names/test/test_names.py Sat Apr 9 00:41:31 2016
@@ -997,7 +997,7 @@
with the I{A} records the authority has cached from the primary.
"""
secondary = SecondaryAuthority.fromServerAddressAndDomain(
- (b'192.168.1.2', 1234), b'example.com')
+ ('192.168.1.2', 1234), b'example.com')
secondary._reactor = reactor = MemoryReactorClock()
secondary.transfer()