Index: twisted/names/test/test_rootresolve.py
===================================================================
--- twisted/names/test/test_rootresolve.py	(revision 33940)
+++ twisted/names/test/test_rootresolve.py	(working copy)
@@ -17,8 +17,7 @@
 from twisted.internet.task import Clock
 from twisted.internet.address import IPv4Address
 from twisted.internet.interfaces import IReactorUDP, IUDPTransport
-from twisted.names.root import Resolver, lookupNameservers, lookupAddress
-from twisted.names.root import extractAuthority, discoverAuthority, retry
+from twisted.names.root import Resolver
 from twisted.names.dns import IN, HS, A, NS, CNAME, OK, ENAME, Record_CNAME
 from twisted.names.dns import Query, Message, RRHeader, Record_A, Record_NS
 from twisted.names.error import DNSNameError, ResolverError
@@ -558,29 +557,7 @@
         return gatherResults([failD, succeedD])
 
 
-    def test_discoveredAuthorityDeprecated(self):
-        """
-        Calling L{Resolver.discoveredAuthority} produces a deprecation warning.
-        """
-        resolver = Resolver([])
-        d = resolver.discoveredAuthority('127.0.0.1', 'example.com', IN, A, (0,))
 
-        warnings = self.flushWarnings([
-                self.test_discoveredAuthorityDeprecated])
-        self.assertEqual(warnings[0]['category'], DeprecationWarning)
-        self.assertEqual(
-            warnings[0]['message'],
-            'twisted.names.root.Resolver.discoveredAuthority is deprecated since '
-            'Twisted 10.0.  Use twisted.names.client.Resolver directly, instead.')
-        self.assertEqual(len(warnings), 1)
-
-        # This will time out quickly, but we need to wait for it because there
-        # are resources associated with.
-        d.addErrback(lambda ignored: None)
-        return d
-
-
-
 class StubDNSDatagramProtocol:
     """
     A do-nothing stand-in for L{DNSDatagramProtocol} which can be used to avoid
@@ -598,108 +575,3 @@
         'Resolver object for retry logic.'))
 
 
-class DiscoveryToolsTests(TestCase):
-    """
-    Tests for the free functions in L{twisted.names.root} which help out with
-    authority discovery.  Since these are mostly deprecated, these are mostly
-    deprecation tests.
-    """
-    def test_lookupNameserversDeprecated(self):
-        """
-        Calling L{root.lookupNameservers} produces a deprecation warning.
-        """
-        # Don't care about the return value, since it will never have a result,
-        # since StubDNSDatagramProtocol doesn't actually work.
-        lookupNameservers('example.com', '127.0.0.1', StubDNSDatagramProtocol())
-
-        warnings = self.flushWarnings([
-                self.test_lookupNameserversDeprecated])
-        self.assertEqual(warnings[0]['category'], DeprecationWarning)
-        self.assertEqual(
-            warnings[0]['message'],
-            'twisted.names.root.lookupNameservers is deprecated since Twisted '
-            '10.0.  Use twisted.names.root.Resolver.lookupNameservers '
-            'instead.')
-        self.assertEqual(len(warnings), 1)
-    test_lookupNameserversDeprecated.suppress = [_retrySuppression]
-
-
-    def test_lookupAddressDeprecated(self):
-        """
-        Calling L{root.lookupAddress} produces a deprecation warning.
-        """
-        # Don't care about the return value, since it will never have a result,
-        # since StubDNSDatagramProtocol doesn't actually work.
-        lookupAddress('example.com', '127.0.0.1', StubDNSDatagramProtocol())
-
-        warnings = self.flushWarnings([
-                self.test_lookupAddressDeprecated])
-        self.assertEqual(warnings[0]['category'], DeprecationWarning)
-        self.assertEqual(
-            warnings[0]['message'],
-            'twisted.names.root.lookupAddress is deprecated since Twisted '
-            '10.0.  Use twisted.names.root.Resolver.lookupAddress '
-            'instead.')
-        self.assertEqual(len(warnings), 1)
-    test_lookupAddressDeprecated.suppress = [_retrySuppression]
-
-
-    def test_extractAuthorityDeprecated(self):
-        """
-        Calling L{root.extractAuthority} produces a deprecation warning.
-        """
-        extractAuthority(Message(), {})
-
-        warnings = self.flushWarnings([
-                self.test_extractAuthorityDeprecated])
-        self.assertEqual(warnings[0]['category'], DeprecationWarning)
-        self.assertEqual(
-            warnings[0]['message'],
-            'twisted.names.root.extractAuthority is deprecated since Twisted '
-            '10.0.  Please inspect the Message object directly.')
-        self.assertEqual(len(warnings), 1)
-
-
-    def test_discoverAuthorityDeprecated(self):
-        """
-        Calling L{root.discoverAuthority} produces a deprecation warning.
-        """
-        discoverAuthority(
-            'example.com', ['10.0.0.1'], p=StubDNSDatagramProtocol())
-
-        warnings = self.flushWarnings([
-                self.test_discoverAuthorityDeprecated])
-        self.assertEqual(warnings[0]['category'], DeprecationWarning)
-        self.assertEqual(
-            warnings[0]['message'],
-            'twisted.names.root.discoverAuthority is deprecated since Twisted '
-            '10.0.  Use twisted.names.root.Resolver.lookupNameservers '
-            'instead.')
-        self.assertEqual(len(warnings), 1)
-
-    # discoverAuthority is implemented in terms of deprecated functions,
-    # too.  Ignore those.
-    test_discoverAuthorityDeprecated.suppress = [
-        util.suppress(
-            category=DeprecationWarning,
-            message=(
-                'twisted.names.root.lookupNameservers is deprecated since '
-                'Twisted 10.0.  Use '
-                'twisted.names.root.Resolver.lookupNameservers instead.')),
-        _retrySuppression]
-
-
-    def test_retryDeprecated(self):
-        """
-        Calling L{root.retry} produces a deprecation warning.
-        """
-        retry([0], StubDNSDatagramProtocol())
-
-        warnings = self.flushWarnings([
-                self.test_retryDeprecated])
-        self.assertEqual(warnings[0]['category'], DeprecationWarning)
-        self.assertEqual(
-            warnings[0]['message'],
-            'twisted.names.root.retry is deprecated since Twisted '
-            '10.0.  Use a Resolver object for retry logic.')
-        self.assertEqual(len(warnings), 1)
Index: twisted/names/root.py
===================================================================
--- twisted/names/root.py	(revision 33940)
+++ twisted/names/root.py	(working copy)
@@ -20,33 +20,7 @@
 from twisted.names import dns, common, error
 
 
-def retry(t, p, *args):
-    """
-    Issue a query one or more times.
 
-    This function is deprecated.  Use one of the resolver classes for retry
-    logic, or implement it yourself.
-    """
-    warnings.warn(
-        "twisted.names.root.retry is deprecated since Twisted 10.0.  Use a "
-        "Resolver object for retry logic.", category=DeprecationWarning,
-        stacklevel=2)
-
-    assert t, "Timeout is required"
-    t = list(t)
-    def errback(failure):
-        failure.trap(defer.TimeoutError)
-        if not t:
-            return failure
-        return p.query(timeout=t.pop(0), *args
-            ).addErrback(errback
-            )
-    return p.query(timeout=t.pop(0), *args
-        ).addErrback(errback
-        )
-
-
-
 class _DummyController:
     """
     A do-nothing DNS controller.  This is useful when all messages received
@@ -280,132 +254,7 @@
                     "Stuck at response without answers or delegation"))
 
 
-    def discoveredAuthority(self, auth, name, cls, type, timeout):
-        warnings.warn(
-            'twisted.names.root.Resolver.discoveredAuthority is deprecated since '
-            'Twisted 10.0.  Use twisted.names.client.Resolver directly, instead.',
-            category=DeprecationWarning, stacklevel=2)
-        from twisted.names import client
-        q = dns.Query(name, type, cls)
-        r = client.Resolver(servers=[(auth, dns.PORT)])
-        d = r.queryUDP([q], timeout)
-        d.addCallback(r.filterAnswers)
-        return d
 
-
-
-def lookupNameservers(host, atServer, p=None):
-    warnings.warn(
-        'twisted.names.root.lookupNameservers is deprecated since Twisted '
-        '10.0.  Use twisted.names.root.Resolver.lookupNameservers instead.',
-        category=DeprecationWarning, stacklevel=2)
-    # print 'Nameserver lookup for', host, 'at', atServer, 'with', p
-    if p is None:
-        p = dns.DNSDatagramProtocol(_DummyController())
-        p.noisy = False
-    return retry(
-        (1, 3, 11, 45),                     # Timeouts
-        p,                                  # Protocol instance
-        (atServer, dns.PORT),               # Server to query
-        [dns.Query(host, dns.NS, dns.IN)]   # Question to ask
-    )
-
-def lookupAddress(host, atServer, p=None):
-    warnings.warn(
-        'twisted.names.root.lookupAddress is deprecated since Twisted '
-        '10.0.  Use twisted.names.root.Resolver.lookupAddress instead.',
-        category=DeprecationWarning, stacklevel=2)
-    # print 'Address lookup for', host, 'at', atServer, 'with', p
-    if p is None:
-        p = dns.DNSDatagramProtocol(_DummyController())
-        p.noisy = False
-    return retry(
-        (1, 3, 11, 45),                     # Timeouts
-        p,                                  # Protocol instance
-        (atServer, dns.PORT),               # Server to query
-        [dns.Query(host, dns.A, dns.IN)]    # Question to ask
-    )
-
-def extractAuthority(msg, cache):
-    warnings.warn(
-        'twisted.names.root.extractAuthority is deprecated since Twisted '
-        '10.0.  Please inspect the Message object directly.',
-        category=DeprecationWarning, stacklevel=2)
-    records = msg.answers + msg.authority + msg.additional
-    nameservers = [r for r in records if r.type == dns.NS]
-
-    # print 'Records for', soFar, ':', records
-    # print 'NS for', soFar, ':', nameservers
-
-    if not nameservers:
-        return None, nameservers
-    if not records:
-        raise IOError("No records")
-    for r in records:
-        if r.type == dns.A:
-            cache[str(r.name)] = r.payload.dottedQuad()
-    for r in records:
-        if r.type == dns.NS:
-            if str(r.payload.name) in cache:
-                return cache[str(r.payload.name)], nameservers
-    for addr in records:
-        if addr.type == dns.A and addr.name == r.name:
-            return addr.payload.dottedQuad(), nameservers
-    return None, nameservers
-
-def discoverAuthority(host, roots, cache=None, p=None):
-    warnings.warn(
-        'twisted.names.root.discoverAuthority is deprecated since Twisted '
-        '10.0.  Use twisted.names.root.Resolver.lookupNameservers instead.',
-        category=DeprecationWarning, stacklevel=4)
-
-    if cache is None:
-        cache = {}
-
-    rootAuths = list(roots)
-
-    parts = host.rstrip('.').split('.')
-    parts.reverse()
-
-    authority = rootAuths.pop()
-
-    soFar = ''
-    for part in parts:
-        soFar = part + '.' + soFar
-        # print '///////',  soFar, authority, p
-        msg = defer.waitForDeferred(lookupNameservers(soFar, authority, p))
-        yield msg
-        msg = msg.getResult()
-
-        newAuth, nameservers = extractAuthority(msg, cache)
-
-        if newAuth is not None:
-            # print "newAuth is not None"
-            authority = newAuth
-        else:
-            if nameservers:
-                r = str(nameservers[0].payload.name)
-                # print 'Recursively discovering authority for', r
-                authority = defer.waitForDeferred(discoverAuthority(r, roots, cache, p))
-                yield authority
-                authority = authority.getResult()
-                # print 'Discovered to be', authority, 'for', r
-##            else:
-##                # print 'Doing address lookup for', soFar, 'at', authority
-##                msg = defer.waitForDeferred(lookupAddress(soFar, authority, p))
-##                yield msg
-##                msg = msg.getResult()
-##                records = msg.answers + msg.authority + msg.additional
-##                addresses = [r for r in records if r.type == dns.A]
-##                if addresses:
-##                    authority = addresses[0].payload.dottedQuad()
-##                else:
-##                    raise IOError("Resolution error")
-    # print "Yielding authority", authority
-    yield authority
-
-discoverAuthority = defer.deferredGenerator(discoverAuthority)
-
 def makePlaceholder(deferred, name):
     def placeholder(*args, **kw):
         deferred.addCallback(lambda r: getattr(r, name)(*args, **kw))
