summaryrefslogtreecommitdiff
path: root/dns/resolver.py
Commit message (Collapse)AuthorAgeFilesLines
* add resolve_address() helper at module levelresrefactorBob Halley2020-05-191-0/+10
|
* lintingBob Halley2020-05-191-0/+12
|
* refactor resolver, extracting all business logicBob Halley2020-05-181-166/+197
|
* flake8 lintingBob Halley2020-05-151-17/+20
|
* Allow resolver-level control over the defaulting of search (default False).Bob Halley2020-05-151-30/+18
|
* Add resolver resolve(), deprecate query().Bob Halley2020-05-151-34/+81
|
* Reharmonize doc style as I think it looks betterBob Halley2020-05-101-2/+4
|
* in doco, text->str, binary->bytesBob Halley2020-05-081-7/+7
|
* Fix [Issue #416], EAI_SYSTEM not defined on Windows.Bob Halley2020-05-041-2/+10
|
* Grealy simplify our getaddrinfo() implementation by calling theBob Halley2020-05-041-48/+41
| | | | | | system's version when we have an address literal for the host. This also avoids infinite loops as dns.query.* needs to call getaddrinfo() to handle scoping correctly.
* more things to make mypy happierBob Halley2020-05-031-4/+4
|
* Use context managers to simplify code.Brian Wellington2020-05-011-37/+15
| | | | | | | | Simplify code using try/finally to use context managers. In some cases, contextlib.ExitStack() is used; this could probably be further simplified to use contextlib.nullcontext() once Python 3.7+ is a requirement.
* Merge pull request #445 from kimbo/kl/resolv-conf-optionsBob Halley2020-04-031-5/+32
|\ | | | | additional resolv.conf options
| * support for ndots, edns0, timeout resolv.conf optskimbo2020-04-021-5/+32
| |
* | Use decorator syntax for properties.Brian Wellington2020-04-031-2/+2
| |
* | Use public dns.set.Set interface.Brian Wellington2020-04-021-1/+1
|/
* delintBob Halley2020-03-111-7/+7
|
* reverse_query: BUGFIX - ipaddr, not address!Thomas Ward2020-03-091-1/+1
| | | | | I made a mistake in the pull req and didn't catch it (OOPS!). `dns.reversename.from_address(address)` is what was in the code. Unfortunately, that causes a nice, fat `NameError: name 'address' is not defined` error. This fixes that.
* Docstring, naming, args/kwargs for reverse_queryThomas Ward2020-03-091-22/+7
|
* Docstrings: Update reverse_lookup docstringsThomas Ward2020-03-091-0/+12
| | | Pull docstring bits from the query function that are relevant for reverse_lookup as we're now pulling the query function's arguments in (except for rdtype and rdclass) as arguments that can be accepted.
* Use dns.reversename, extend reverse_lookup argsThomas Ward2020-03-091-17/+11
| | | Use inbuilt dns.reversename. Extend the self.query argument bits into the reverse_lookup (tcp, source, raise_on_no_answer, source_port, lifetime), and force-define the rdtype and rdclass.
* Add a reverse_lookup function to Resolver.Thomas Ward2020-03-091-0/+26
| | | | | | | Utilize the inbuilt ipaddress library and in-built resolver query libraries to provide a reverse_lookup function. This could make it easier for users to set up their own Resolver instances which continue to behave as stub resolvers but also more easily make PTR record lookups, which would be able to be used as a direct result. This had been written by me as an extension of the Resolver class in my own private class (called DNSResolver, which I only use internally on a few private applications) which extended the init file to define the nameservers if not specified (default: google DNS) and then extended to add the reverse_lookup function call as well. Feel free to reject if it doesn't make sense, but it would be a nifty function to have (because `dig` for instance has a `-x` flag you can pass which accepts an IP address and will auto-reverse it to get the in-addr.arpa lookup result from nameservers, whether they're stub resolvers or not, which is a nifty function to have here.)
* DoH cleanup.Brian Wellington2020-01-071-7/+14
|
* only allow Resolver.nameservers to be a listkimbo2020-01-061-11/+5
|
* make sure Resolver.nameservers is a list or strkimbo2019-12-261-0/+21
| | | | | validate if assignment of Resolver.nameservers is a list, a str (in which case it will be converted to a list), or None
* Handle other parametersFilip Š2019-10-291-1/+1
|
* Ignore URLs other than HTTPSFilip Š2019-10-291-0/+2
|
* Rename `doh` method to `https`Filip Š2019-10-291-1/+1
|
* Merge branch 'master' of https://github.com/rthalley/dnspython into ↵Filip Š2019-09-301-2/+11
|\ | | | | | | dns-over-https
| * added nameserver and port to Answer (wip #384)kimbo2019-08-151-2/+11
| |
* | Add support for DoHFilip Š2019-09-281-19/+25
|/
* specify seconds for lifetime in Resolver.query()kimbo2019-07-241-1/+1
|
* For _getaddrinfo(), if AI_ADDRCONFIG or AI_V4MAPPED are specified, raiseBob Halley2019-01-051-1/+4
| | | | | socket.gaierror(socket.EAI_SYSTEM) instead of NotImplementedError, as higher level software will cope better. [Issue #316]
* When decoding from wire format, if a message has TC set, raise a TruncatedBob Halley2019-01-051-5/+7
| | | | exception. [Issue #297]
* If reading /etc/resolv.conf fails, or finds no servers, raise ↵Bob Halley2019-01-051-4/+4
| | | | | | NoResolverConfiguration [Issue #332]
* Remove _compat module.Bob Halley2018-12-091-8/+6
|
* update copyrightBob Halley2018-12-011-0/+2
|
* Upgrade Python syntax with pyupgrade https://github.com/asottile/pyupgradeHugo2018-09-061-5/+5
|
* Merge pull request #258 from shatil/resolver-query-lifetime-timeoutBob Halley2018-07-171-9/+14
|\ | | | | lifetime (timeout) support for dns.resolver.query
| * lifetime (timeout) support for dns.resolver.queryShatil Rafiullah2017-06-041-9/+14
| | | | | | | | | | | | | | | | | | | | Introduces `lifetime` param to `dns.resolver.query`, allowing user to specify a timeout for querying DNS resolvers instead of being stuck on the hardcoded default. This doesn't modify the `Resolver` _instance_ itself, so subsequent calls to it, without specifying `lifetime` as a param, will honor the default value configured in `reset` (see `self.lifetime =`).
* | Merge pull request #300 from jamadden/dont-bare-exceptBob Halley2018-07-171-1/+1
|\ \ | | | | | | Don't use a bare except: in resolver._getaddrinfo
| * | Don't use a bare except:Jason Madden2018-01-311-1/+1
| |/ | | | | | | | | | | This catches things like KeyboardInterrupt and SystemExit that shouldn't be caught here. Under gevent, it breaks Timeout handling.
* | The NXDOMAIN exception should not use its docstring.Bob Halley2018-02-201-1/+1
|/ | | | [Issue #253]
* Always look at Windows global Domain parameter.Bob Halley2017-02-191-3/+4
| | | | [Issue #240]
* Add helper methods to dns.resolver.NXDOMAIN to make retrievingBob Halley2017-01-281-0/+22
| | | | qname and response info easier.
* fix docstring typoBob Halley2017-01-161-1/+1
|
* resolver docoBob Halley2017-01-161-120/+104
|
* improve cache docoBob Halley2017-01-161-57/+42
|
* doco answerBob Halley2017-01-161-26/+12
|
* start resolver docoBob Halley2017-01-161-18/+5
|