1 2005-10-06 Bob Halley <halley@dnspython.org>
3 * dns/name.py: Added the parent() method, which returns the
6 2005-10-01 Bob Halley <halley@dnspython.org>
8 * dns/resolver.py: Added zone_for_name() helper, which returns
9 the name of the zone which contains the specified name.
11 * dns/resolver.py: Added get_default_resolver(), which returns
12 the default resolver, initializing it if necessary.
14 2005-09-29 Bob Halley <halley@dnspython.org>
16 * dns/resolver.py (Resolver._compute_timeout): If time goes
17 backwards a little bit, ignore it.
19 2005-07-31 Bob Halley <halley@dnspython.org>
21 * (Version 1.3.4 released)
23 2005-07-31 Bob Halley <halley@dnspython.org>
25 * dns/message.py (make_response): Trying to respond to a response
26 threw a NameError while trying to throw a FormErr since it used
27 the wrong name for the FormErr exception.
29 * dns/query.py (_connect): We needed to ignore EALREADY too.
31 * dns/query.py: Optional "source" and "source_port" parameters
32 have been added to udp(), tcp(), and xfr(). Thanks to Ralf
33 Weber for suggesting the change and providing a patch.
35 2005-06-05 Bob Halley <halley@dnspython.org>
37 * dns/query.py: The requirement that the "where" parameter be
38 an IPv4 or IPv6 address is now documented.
40 2005-06-04 Bob Halley <halley@dnspython.org>
42 * dns/resolver.py: The resolver now does exponential backoff
43 each time it runs through all of the nameservers.
45 * dns/resolver.py: rcodes which indicate a nameserver is likely
46 to be a "permanent failure" for a query cause the nameserver
47 to be removed from the mix for that query.
49 2005-01-30 Bob Halley <halley@dnspython.org>
51 * (Version 1.3.3 released)
53 2004-10-25 Bob Halley <halley@dnspython.org>
55 * dns/rdtypes/ANY/TXT.py (TXT.from_text): The masterfile parser
56 incorrectly rejected TXT records where a value was not quoted.
58 2004-10-11 Bob Halley <halley@dnspython.org>
60 * dns/message.py: Added make_response(), which creates a skeletal
61 response for the specified query. Added opcode() and set_opcode()
62 convenience methods to the Message class. Added the request_payload
63 attribute to the Message class.
65 2004-10-10 Bob Halley <halley@dnspython.org>
67 * dns/zone.py (from_xfr): dns.zone.from_xfr() in relativization
68 mode incorrectly set zone.origin to the empty name.
70 2004-09-02 Bob Halley <halley@dnspython.org>
72 * dns/name.py (Name.to_wire): The 'file' parameter to
73 Name.to_wire() is now optional; if omitted, the wire form will
74 be returned as the value of the function.
76 2004-08-14 Bob Halley <halley@dnspython.org>
78 * dns/message.py (Message.find_rrset): find_rrset() now uses an
79 index, vastly improving the from_wire() performance of large
80 messages such as zone transfers.
82 2004-08-07 Bob Halley <halley@dnspython.org>
84 * (Version 1.3.2 released)
86 2004-08-04 Bob Halley <halley@dnspython.org>
88 * dns/query.py: sending queries to a nameserver via IPv6 now
91 * dns/inet.py (af_for_address): Add af_for_address(), which looks
92 at a textual-form address and attempts to determine which address
95 * dns/query.py: the default for the 'af' parameter of the udp(),
96 tcp(), and xfr() functions has been changed from AF_INET to None,
97 which causes dns.inet.af_for_address() to be used to determine the
98 address family. If dns.inet.af_for_address() can't figure it out,
99 we fall back to AF_INET and hope for the best.
101 2004-07-31 Bob Halley <halley@dnspython.org>
103 * dns/rdtypes/ANY/NSEC.py (NSEC.from_text): The NSEC text format
104 does not allow specifying types by number, so we shouldn't either.
106 * dns/renderer.py: the renderer module didn't import random,
107 causing an exception to be raised if a query id wasn't provided
108 when a Renderer was created.
110 * dns/resolver.py (Resolver.query): the resolver wasn't catching
111 dns.exception.Timeout, so a timeout erroneously caused the whole
112 resolution to fail instead of just going on to the next server.
114 2004-06-16 Bob Halley <halley@dnspython.org>
116 * dns/rdtypes/ANY/LOC.py (LOC.from_text): LOC milliseconds values
117 were converted incorrectly if the length of the milliseconds
118 string was less than 3.
120 2004-06-06 Bob Halley <halley@dnspython.org>
122 * (Version 1.3.1 released)
124 2004-05-22 Bob Halley <halley@dnspython.org>
126 * dns/update.py (Update.delete): We erroneously specified a
127 "deleting" value of dns.rdatatype.NONE instead of
128 dns.rdataclass.NONE when the thing being deleted was either an
129 Rdataset instance or an Rdata instance.
131 * dns/rdtypes/ANY/SSHFP.py: Added support for the proposed SSHFP
134 2004-05-14 Bob Halley <halley@dnspython.org>
136 * dns/rdata.py (from_text): The masterfile reader did not
137 accept the unknown RR syntax when used with a known RR type.
139 2004-05-08 Bob Halley <halley@dnspython.org>
141 * dns/name.py (from_text): dns.name.from_text() did not raise
142 an exception if a backslash escape ended prematurely.
144 2004-04-09 Bob Halley <halley@dnspython.org>
146 * dns/zone.py (_MasterReader._rr_line): The masterfile reader
147 erroneously treated lines starting with leading whitespace but
148 not having any RR definition as an error. It now treats
149 them like a blank line (which is not an error).
151 2004-04-01 Bob Halley <halley@dnspython.org>
153 * (Version 1.3.0 released)
155 2004-03-19 Bob Halley <halley@dnspython.org>
157 * Added support for new DNSSEC types RRSIG, NSEC, and DNSKEY.
159 2004-01-16 Bob Halley <halley@dnspython.org>
161 * dns/query.py (_connect): Windows returns EWOULDBLOCK instead
162 of EINPROGRESS when trying to connect a nonblocking socket.
164 2003-11-13 Bob Halley <halley@dnspython.org>
166 * dns/rdtypes/ANY/LOC.py (LOC.to_wire): We encoded and decoded LOC
167 incorrectly, since we were interpreting the values of altitiude,
168 size, hprec, and vprec in meters instead of centimeters.
170 * dns/rdtypes/IN/WKS.py (WKS.from_wire): The WKS protocol value is
171 encoded with just one octet, not two!
173 2003-11-09 Bob Halley <halley@dnspython.org>
175 * dns/resolver.py (Cache.maybe_clean): The cleaner deleted items
176 from the dictionary while iterating it, causing a RuntimeError
177 to be raised. Thanks to Mark R. Levinson for the bug report,
178 regression test, and fix.
180 2003-11-07 Bob Halley <halley@dnspython.org>
182 * (Version 1.2.0 released)
184 2003-11-03 Bob Halley <halley@dnspython.org>
186 * dns/zone.py (_MasterReader.read): The saved_state now includes
189 2003-11-01 Bob Halley <halley@dnspython.org>
191 * dns/tokenizer.py (Tokenizer.get): The tokenizer didn't
192 handle escaped delimiters.
194 2003-10-27 Bob Halley <halley@dnspython.org>
196 * dns/resolver.py (Resolver.read_resolv_conf): If no nameservers
197 are configured in /etc/resolv.conf, the default nameserver
198 list should be ['127.0.0.1'].
200 2003-09-08 Bob Halley <halley@dnspython.org>
202 * dns/resolver.py (Resolver._config_win32_fromkey): We didn't
203 catch WindowsError, which can happen if a key is not defined
206 2003-09-06 Bob Halley <halley@dnspython.org>
208 * (Version 1.2.0b1 released)
210 2003-09-05 Bob Halley <halley@dnspython.org>
212 * dns/query.py: Timeout support has been overhauled to provide
213 timeouts under Python 2.2 as well as 2.3, and to provide more
216 2003-08-30 Bob Halley <halley@dnspython.org>
218 * dns/zone.py: dns.exception.SyntaxError is raised for unknown
219 master file directives.
221 2003-08-28 Bob Halley <halley@dnspython.org>
223 * dns/zone.py: $INCLUDE processing is now enabled/disabled using
224 the allow_include parameter. The default is to process $INCLUDE
225 for from_file(), and to disallow $INCLUDE for from_text(). The
226 master reader now calls zone.check_origin_node() by default after
227 the zone has been read. find_rdataset() called get_node() instead
228 of find_node(), which result in an incorrect exception. The
229 relativization state of a zone is now remembered and applied
230 consistently when looking up names. from_xfr() now supports
231 relativization like the _MasterReader.
233 2003-08-22 Bob Halley <halley@dnspython.org>
235 * dns/zone.py: The _MasterReader now understands $INCLUDE.
237 2003-08-12 Bob Halley <halley@dnspython.org>
239 * dns/zone.py: The _MasterReader now specifies the file and line
240 number when a syntax error occurs. The BIND 8 TTL format is now
241 understood when loading a zone, though it will never be emitted.
242 The from_file() function didn't pass the zone_factory parameter
245 2003-08-10 Bob Halley <halley@dnspython.org>
247 * (Version 1.1.0 released)
249 2003-08-07 Bob Halley <halley@dnspython.org>
251 * dns/update.py (Update._add): A typo meant that _add would
252 fail if the thing being added was an Rdata object (as
253 opposed to an Rdataset or the textual form of an Rdata).
255 2003-08-05 Bob Halley <halley@dnspython.org>
257 * dns/set.py: the simple Set class has been moved to its
258 own module, and augmented to support more set operations.
260 2003-08-04 Bob Halley <halley@dnspython.org>
262 * Node and all rdata types have been "slotted". This speeds
263 things up a little and reduces memory usage noticeably.
265 2003-08-02 Bob Halley <halley@dnspython.org>
267 * (Version 1.1.0c1 released)
269 2003-08-02 Bob Halley <halley@dnspython.org>
271 * dns/rdataset.py: SimpleSets now support more set options.
273 * dns/message.py: Added the get_rrset() method. from_file() now
274 allows Unicode filenames and turns on universal newline support if
275 it opens the file itself.
277 * dns/node.py: Added the delete_rdataset() and replace_rdataset()
280 * dns/zone.py: Added the delete_node(), delete_rdataset(), and
281 replace_rdataset() methods. from_file() now allows Unicode
282 filenames and turns on universal newline support if it opens the
283 file itself. Added a to_file() method.
285 2003-08-01 Bob Halley <halley@dnspython.org>
287 * dns/opcode.py: Opcode from/to text converters now understand
288 numeric opcodes. The to_text() method will return a numeric opcode
289 string if it doesn't know a text name for the opcode.
291 * dns/message.py: Added set_rcode(). Fixed code where ednsflags
292 wasn't treated as a long.
294 * dns/rcode.py: ednsflags wasn't treated as a long. Rcode from/to
295 text converters now understand numeric rcodes. The to_text()
296 method will return a numeric rcode string if it doesn't know
297 a text name for the rcode.
299 * examples/reverse.py: Added a new example program that builds a
300 reverse (address-to-name) mapping table from the name-to-address
301 mapping specified by A RRs in zone files.
303 * dns/node.py: Added get_rdataset() method.
305 * dns/zone.py: Added get_rdataset() and get_rrset() methods. Added
308 2003-07-31 Bob Halley <halley@dnspython.org>
310 * dns/zone.py: Added the iterate_rdatasets() method which returns
311 a generator which yields (name, rdataset) tuples for all the
312 rdatasets in the zone matching the specified rdatatype.
314 2003-07-30 Bob Halley <halley@dnspython.org>
316 * (Version 1.1.0b2 released)
318 2003-07-30 Bob Halley <halley@dnspython.org>
320 * dns/zone.py: Added find_rrset() and find_rdataset() convenience
321 methods. They let you retrieve rdata with the specified name
322 and type in one call.
324 * dns/node.py: Nodes no longer have names; owner names are
325 associated with nodes in the Zone object's nodes dictionary.
327 * dns/zone.py: Zone objects now implement more of the standard
328 mapping interface. __iter__ has been changed to iterate the keys
329 rather than values to match the standard mapping interface's
332 2003-07-20 Bob Halley <halley@dnspython.org>
334 * dns/ipv6.py (inet_ntoa): Handle embedded IPv4 addresses.
336 2003-07-19 Bob Halley <halley@dnspython.org>
338 * (Version 1.1.0b1 released)
340 2003-07-18 Bob Halley <halley@dnspython.org>
342 * dns/tsig.py: The TSIG validation of TCP streams where not
343 every message is signed now works correctly.
345 * dns/zone.py: Zones can now be compared for equality and
346 inequality. If the other object in the comparison is also
347 a zone, then "the right thing" happens; i.e. the zones are
348 equal iff.: they have the same rdclass, origin, and nodes.
350 2003-07-17 Bob Halley <halley@dnspython.org>
352 * dns/message.py (Message.use_tsig): The method now allows for
353 greater control over the various fields in the generated signature
355 (_WireReader._get_section): UnknownTSIGKey is now raised if an
356 unknown key is encountered, or if a signed message has no keyring.
358 2003-07-16 Bob Halley <halley@dnspython.org>
360 * dns/tokenizer.py (Tokenizer._get_char): get_char and unget_char
361 have been renamed to _get_char and _unget_char since they are not
362 useful to clients of the tokenizer.
364 2003-07-15 Bob Halley <halley@dnspython.org>
366 * dns/zone.py (_MasterReader._rr_line): owner names were being
367 unconditionally relativized; it makes much more sense for them
368 to be relativized according to the relativization setting of
371 2003-07-12 Bob Halley <halley@dnspython.org>
373 * dns/resolver.py (Resolver.read_resolv_conf): The resolv.conf
374 parser did not allow blank / whitespace-only lines, nor did it
375 allow comments. Both are now supported.
377 2003-07-11 Bob Halley <halley@dnspython.org>
379 * dns/name.py (Name.to_digestable): to_digestable() now
380 requires an origin to be specified if the name is relative.
381 It will raise NeedAbsoluteNameOrOrigin if the name is
382 relative and there is either no origin or the origin is
384 (Name.split): returned the wrong answer if depth was 0 or depth
385 was the length of the name. split() now does bounds checking
386 on depth, and raises ValueError if depth < 0 or depth > the length
389 2003-07-10 Bob Halley <halley@dnspython.org>
391 * dns/ipv6.py (inet_ntoa): The routine now minimizes its output
392 strings. E.g. the IPv6 address
393 "0000:0000:0000:0000:0000:0000:0000:0001" is minimized to "::1".
394 We do not, however, make any effort to display embedded IPv4
395 addresses in the dot-quad notation.
397 2003-07-09 Bob Halley <halley@dnspython.org>
399 * dns/inet.py: We now supply our own AF_INET and AF_INET6
400 constants since AF_INET6 may not always be available. If the
401 socket module has AF_INET6, we will use it. If not, we will
402 use our own value for the constant.
404 * dns/query.py: the functions now take an optional af argument
405 specifying the address family to use when creating the socket.
407 * dns/rdatatype.py (is_metatype): a typo caused the function
408 return true only for type OPT.
410 * dns/message.py: message section list elements are now RRsets
411 instead of Nodes. This API change makes processing messages
412 easier for many applications.
414 2003-07-07 Bob Halley <halley@dnspython.org>
416 * dns/rrset.py: added. An RRset is a named rdataset.
418 * dns/rdataset.py (Rdataset.__eq__): rdatasets may now be compared
419 for equality and inequality with other objects. Rdataset instance
420 variables are now slotted.
422 * dns/message.py: The wire format and text format readers are now
423 classes. Variables related to reader state have been moved out
424 of the message class.
426 2003-07-06 Bob Halley <halley@dnspython.org>
428 * dns/name.py (from_text): '@' was not interpreted as the empty
431 * dns/zone.py: the master file reader derelativized names in rdata
432 relative to the zone's origin, not relative to the current origin.
433 The reader now deals with relativization in two steps. The rdata
434 is read and derelativized using the current origin. The rdata's
435 relativity is then chosen using the zone origin and the relativize
436 boolean. Here's an example.
442 If the zone origin is example., and relativization is on, then
443 This fragment will become:
445 bar.foo.example. 300 IN MX 0 blaz.foo.example.
447 after the first step (derelativization to current origin), and
449 bar.foo 300 IN MX 0 blaz.foo
451 after the second step (relativiation to zone origin).
453 * dns/namedict.py: added.
455 * dns/zone.py: The master file reader has been made into its
456 own class. Reader-related instance variables have been moved
457 form the zone class into the reader class.
459 * dns/zone.py: Add node_factory class attribute. An application
460 can now subclass Zone and Node and have a zone whose nodes are of
461 the subclassed Node type. The from_text(), from_file(), and
462 from_xfr() algorithms now take an optional zone_factory argument.
463 This allows the algorithms to be used to create zones whose class
464 is a subclass of Zone.
467 2003-07-04 Bob Halley <halley@dnspython.org>
469 * dns/renderer.py: added new wire format rendering module and
470 converted message.py to use it. Applications which want
471 fine-grained control over the conversion to wire format may call
472 the renderer directy, instead of having it called on their behalf
475 2003-07-02 Bob Halley <halley@dnspython.org>
477 * dns/name.py (_validate_labels): The NameTooLong test was
480 * dns/message.py (Message.to_wire): dns.exception.TooBig is
481 now raised if the wire encoding exceeds the specified
484 2003-07-01 Bob Halley <halley@dnspython.org>
486 * dns/message.py: EDNS encoding was broken. from_text()
487 didn't parse rcodes, flags, or eflags correctly. Comparing
488 messages with other types of objects didn't work.
490 2003-06-30 Bob Halley <halley@dnspython.org>
492 * (Version 1.0.0 released)
494 2003-06-30 Bob Halley <halley@dnspython.org>
496 * dns/rdata.py: Rdatas now implement rich comparisons instead of
499 * dns/name.py: Names now implement rich comparisons instead of
502 * dns/inet.py (inet_ntop): Always use our code, since the code
503 in the socket module doesn't support AF_INET6 conversions if
504 IPv6 sockets are not available on the system.
506 * dns/resolver.py (Answer.__init__): A dangling CNAME chain was
507 not raising NoAnswer.
509 * Added a simple resolver Cache class.
511 * Added an expiration attribute to answer instances.
513 2003-06-24 Bob Halley <halley@dnspython.org>
515 * (Version 1.0.0b3 released)
517 2003-06-24 Bob Halley <halley@dnspython.org>
519 * Renamed module "DNS" to "dns" to avoid conflicting with
522 2003-06-23 Bob Halley <halley@dnspython.org>
524 * The from_text() relativization controls now work the same way as
525 the to_text() controls.
527 * DNS/rdata.py: The parsing of generic rdata was broken.
529 2003-06-21 Bob Halley <halley@dnspython.org>
531 * (Version 1.0.0b2 released)
533 2003-06-21 Bob Halley <halley@dnspython.org>
535 * The Python 2.2 socket.inet_aton() doesn't seem to like
536 '255.255.255.255'. We work around this.
538 * Fixed bugs in rdata to_wire() and from_wire() routines of a few
539 types. These bugs were discovered by running the tests/zone.py
542 * Added implementation of type APL.
544 2003-06-20 Bob Halley <halley@dnspython.org>
546 * DNS/rdtypes/IN/AAAA.py: Use our own versions of inet_ntop and
547 inet_pton if the socket module doesn't provide them for us.
549 * The resolver now does a better job handling exceptions. In
550 particular, it no longer eats all exceptions; rather it handles
551 those exceptions it understands, and leaves the rest uncaught.
553 * Exceptions have been pulled into their own module. Almost all
554 exceptions raised by the code are now subclasses of
555 DNS.exception.DNSException. All form errors are subclasses of
556 DNS.exception.FormError (which is itself a subclass of
557 DNS.exception.DNSException).
559 2003-06-19 Bob Halley <halley@dnspython.org>
561 * Added implementations of types DS, NXT, SIG, and WKS.
563 * __cmp__ for type A and AAAA could produce incorrect results.
565 2003-06-18 Bob Halley <halley@dnspython.org>
567 * Started test suites for zone.py and tokenizer.py.
569 * Added implementation of type KEY.
571 * DNS/rdata.py(_base64ify): \n could be emitted erroneously.
573 * DNS/rdtypes/ANY/SOA.py (SOA.from_text): The SOA RNAME field could
574 be set to the value of MNAME in common cases.
576 * DNS/rdtypes/ANY/X25.py: __init__ was broken.
578 * DNS/zone.py (from_text): $TTL handling erroneously caused the
579 next line to be eaten.
581 * DNS/tokenizer.py (Tokenizer.get): parsing was broken for empty
582 quoted strings. Quoted strings didn't handle \ddd escapes. Such
583 escapes are appear not to comply with RFC 1035, but BIND allows
584 them and they seem useful, so we allow them too.
586 * DNS/rdtypes/ANY/ISDN.py (ISDN.from_text): parsing was
587 broken for ISDN RRs without subaddresses.
589 * DNS/zone.py (from_file): from_file() didn't work because
590 some required parameters were not passed to from_text().
592 2003-06-17 Bob Halley <halley@dnspython.org>
594 * (Version 1.0.0b1 released)
596 2003-06-17 Bob Halley <halley@dnspython.org>
598 * Added implementation of type PX.
600 2003-06-16 Bob Halley <halley@dnspython.org>
602 * Added implementation of types CERT, GPOS, LOC, NSAP, NSAP-PTR.
604 * DNS/rdatatype.py (_by_value): A cut-and-paste error had broken
607 2003-06-12 Bob Halley <halley@dnspython.org>
609 * Created a tests directory and started adding tests.
611 * Added "and its documentation" to the permission grant in the
614 2003-06-12 Bob Halley <halley@dnspython.org>
616 * DNS/name.py (Name.is_wild): is_wild() erroneously raised IndexError
617 if the name was empty.
619 2003-06-10 Bob Halley <halley@dnspython.org>
621 * Added implementations of types AFSDB, X25, and ISDN.
623 * The documentation associated with the various rdata types has been
624 improved. In particular, instance variables are now described.
626 2003-06-09 Bob Halley <halley@dnspython.org>
628 * Added implementations of types HINFO, RP, and RT.
630 * DNS/message.py (make_query): Document that make_query() sets
631 flags to DNS.flags.RD, and chooses a random query id.
633 2003-06-05 Bob Halley <halley@dnspython.org>
635 * (Version 1.0.0a2 released)
637 2003-06-05 Bob Halley <halley@dnspython.org>
639 * DNS/node.py: removed __getitem__ and __setitem__, since
640 they are not used by the codebase and were not useful in
643 * DNS/message.py (from_file): from_file() now allows a
644 filename to be specified instead of a file object.
646 * DNS/rdataset.py: The is_compatible() method of the
647 DNS.rdataset.Rdataset class was deleted.
649 2003-06-04 Bob Halley <halley@dnspython.org>
651 * DNS/name.py (class Name): Names are now immutable.
653 * DNS/name.py: the is_comparable() method has been removed, since
654 names are always comparable.
656 * DNS/resolver.py (Resolver.query): A query could run for up
657 to the lifetime + the timeout. This has been corrected and the
658 query will now only run up to the lifetime.
660 2003-06-03 Bob Halley <halley@dnspython.org>
662 * DNS/resolver.py: removed the 'new' function since it is not the
663 style of the library to have such a function. Call
664 DNS.resolver.Resolver() to make a new resolver.
666 2003-06-03 Bob Halley <halley@dnspython.org>
668 * DNS/resolver.py (Resolver._config_win32_fromkey): The DhcpServer
669 list is space separated, not comma separated.
671 2003-06-03 Bob Halley <halley@dnspython.org>
673 * DNS/update.py: Added an update module to make generating updates
676 2003-06-03 Bob Halley <halley@dnspython.org>
678 * Commas were missing in some of the __all__ entries in various
681 2003-05-30 Bob Halley <halley@dnspython.org>
683 * (Version 1.0.0a1 released)