1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

dnspython: Merge in new upstream.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Dec 20 03:21:52 CET 2010 on sn-devel-104
This commit is contained in:
Jelmer Vernooij 2010-12-20 02:31:40 +01:00
parent 145868db15
commit e1d3de3e17
6 changed files with 27 additions and 3 deletions

View File

@ -1,3 +1,15 @@
2010-12-17 Bob Halley <halley@dnspython.org>
* dns/message.py (_WireReader._get_section): use "is" and not "=="
when testing what section an RR is in. Thanks to James Raftery
for reporting this bug.
2010-12-10 Bob Halley <halley@dnspython.org>
* dns/resolver.py (Resolver.query): disallow metaqueries.
* dns/rdata.py (Rdata.__hash__): Added a __hash__ method for rdata.
2010-11-23 Bob Halley <halley@dnspython.org>
* (Version 1.9.2 released)

View File

@ -686,7 +686,7 @@ class _WireReader(object):
deleting = None
if deleting == dns.rdataclass.ANY or \
(deleting == dns.rdataclass.NONE and \
section == self.message.answer):
section is self.message.answer):
covers = dns.rdatatype.NONE
rd = None
else:

View File

@ -28,6 +28,7 @@ chunk of hexstring that _hexify() produces before whitespace occurs.
import cStringIO
import dns.exception
import dns.name
import dns.rdataclass
import dns.rdatatype
import dns.tokenizer
@ -252,6 +253,9 @@ class Rdata(object):
return NotImplemented
return self._cmp(other) > 0
def __hash__(self):
return hash(self.to_digestable(dns.name.root))
def from_text(cls, rdclass, rdtype, tok, origin = None, relativize = True):
"""Build an rdata object from text format.

View File

@ -61,6 +61,10 @@ class NoRootSOA(dns.exception.DNSException):
This should never happen!"""
pass
class NoMetaqueries(dns.exception.DNSException):
"""Metaqueries are not allowed."""
pass
class Answer(object):
"""DNS stub resolver answer
@ -571,8 +575,12 @@ class Resolver(object):
qname = dns.name.from_text(qname, None)
if isinstance(rdtype, (str, unicode)):
rdtype = dns.rdatatype.from_text(rdtype)
if dns.rdatatype.is_metatype(rdtype):
raise NoMetaqueries
if isinstance(rdclass, (str, unicode)):
rdclass = dns.rdataclass.from_text(rdclass)
if dns.rdataclass.is_metaclass(rdclass):
raise NoMetaqueries
qnames_to_try = []
if qname.is_absolute():
qnames_to_try.append(qname)

View File

@ -17,7 +17,7 @@
MAJOR = 1
MINOR = 9
MICRO = 2
MICRO = 3
RELEASELEVEL = 0x0f
SERIAL = 0

View File

@ -18,7 +18,7 @@
import sys
from distutils.core import setup
version = '1.9.2'
version = '1.9.3'
kwargs = {
'name' : 'dnspython',