1

I used to use the pieces of code below to obtain the target zone object in the previous dnspython version.

name_server = 'oo.abc.com.'
dns_zone = 'xx.abc.com' 
zone = dns.zone.from_xfr(dns.query.xfr(name_server, dns_zone))

But dns.query.xfr() is deprecated in dnspython 2.1

It looks like I need to use dns.query.inbound_xfr() instead. But the second argument txn_manager is a dns.zone.Zone object. I don't know how to assign this Zone object.

Is there anyone who can tell me how can I get the result zone that I get in the previous version?

Neil Yuki
  • 11
  • 2

1 Answers1

0

I tried using

dns.zone.Zone(dns_zone)

and it doesn't work. Except from the documentation, there is no trace in the sources of xfr being deprecated even in 2.2: I assume when it will be, the example will be updated

Nicola
  • 81
  • 3