4.12 -> 4.13 upgrade
Rowland penny
rpenny at samba.org
Thu Oct 22 13:48:43 UTC 2020
On 22/10/2020 14:41, L.P.H. van Belle via samba-technical wrote:
>> OK, you are running buster but you must be running python3-dnspython
>> version 2.0.0 because that error message is coming from that
>> version, it has nothing to do with Samba:
>>
>> def query(self, qname, rdtype=dns.rdatatype.A,
>> rdclass=dns.rdataclass.IN,
>> tcp=False, source=None, raise_on_no_answer=True,
>> source_port=0,
>> lifetime=None): # pragma: no cover
>> """Query nameservers to find the answer to the question.
>>
>> This method calls resolve() with ``search=True``, and is
>> provided for backwards compatbility with prior versions of
>> dnspython. See the documentation for the resolve()
>> method for
>> further details.
>> """
>> warnings.warn('please use
>> dns.resolver.Resolver.resolve() instead',
>> DeprecationWarning, stacklevel=2)
>> return self.resolve(qname, rdtype, rdclass, tcp, source,
>> raise_on_no_answer, source_port,
>> lifetime,
>> True)
>>
>> Version 1.16.0 (which Buster should be using) does not have the
>> 'DeprecationWarning'.
> I do agree with you but..
> Well, im 100% sure its 1.16 thats installed.
>
> dpkg -l |grep python3-dnspython
> ii python3-dnspython 1.16.0-1 all DNS toolkit for Python 3
>
This is the same code from 1.16.0:
def query(qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN,
tcp=False, source=None, raise_on_no_answer=True,
source_port=0, lifetime=None):
"""Query nameservers to find the answer to the question.
This is a convenience function that uses the default resolver
object to make the query.
See ``dns.resolver.Resolver.query`` for more information on the
parameters.
"""
return get_default_resolver().query(qname, rdtype, rdclass, tcp,
source,
raise_on_no_answer, source_port,
lifetime)
I would suggest that to get the warning that you are getting, you must
be running either python3-dnspython 2.0.0 or a 'mangled' version 1.16.0
Rowland
More information about the samba-technical
mailing list