Opened 7 years ago

Last modified 7 years ago

#6823 enhancement new

Create an simpler root.Resolver bootstrap mechanism

Reported by: Richard Wall Owned by:
Priority: normal Milestone:
Component: names Keywords:
Cc: Branch:
Author:

Description (last modified by Richard Wall)

In #6095 we've added unittests for twisted.names.root.bootstrap, but in doing so it became clear that the bootstrap API is...unintuitive.

It would be much simpler to have a bootstrap API which simply returned a deferred which fired with an IResolver instance.

Maybe a bit vague. Certainly needs some thought and design before going ahead.

In ticket:6095#comment:12 exarkun wrote:

  1. Let's think about deprecating some stuff here (separate tickets, of course). To completely remove the circular dependency we need to stop providing a default value for the resolverFactory parameter. However, bootstrap itself might be worth deprecating and replacing. Mainly because of the DeferredResolver return type. This should really be a Deferred that fires with an IResolver instead.
  2. I like Tom's idea of having an explicit interface for resolverFactory. I see no problem with doing this as a follow-up ticket.

See also: #6822, #6095, and possibly #6622

Change History (2)

comment:1 Changed 7 years ago by Richard Wall

Description: modified (diff)

comment:2 Changed 7 years ago by Richard Wall

(In [40770]) Merge root-resolver-argument-6095-2: Remove circular dependency between root and client

Authors: borko, rwall Reviewers: tom.prince, exarkun Fixes: #6095 Refs: #6622, #6822, #6823

Partially removed the circular dependency between twisted.names.root and twisted.names.client. #6822 will be the next step in completely removing the dependency.

In doing this, twisted.names.root.Resolver now accepts a resolverFactory argument, which makes it possible to control how root.Resolver performs iterative queries to authoritative nameservers.

Also added test coverage for twisted.names.root.bootstrap.

Also added and updated various API documentation in root.

Note: See TracTickets for help on using tickets.