summaryrefslogtreecommitdiff
path: root/dns/message.py
Commit message (Collapse)AuthorAgeFilesLines
* Message get_rrset() needs to pass idna_codec to find_rrset().Bob Halley2023-04-061-2/+9
| | | | Also removes some lint about "section = section" being a no-op.
* Enum typing (#923)Brian Wellington2023-04-061-5/+3
| | | | | | | | | | | | | | | | | | | | | | * IntEnum improvements. This changes make() to always return an instance of the subclass, creating one on the fly if the value is not known, and updates the typ registration code to deal with this. It also adds typing annotations to make(). * Add missing int check. Some older versions of python weren't rejecting non-int values. * Fix int check. Raise TypeError for non-int, not ValueError, to make tests happy. * Annotate to_text/from_text. * Remove many the_ prefixed variables. These were needed in the past to work around typing issues.
* Improve get_rrset/find_rrset API. (#922)Brian Wellington2023-04-061-23/+45
| | | | | | | | | | | * Improve get_rrset/find_rrset API. This allows most of the parameters to be specified as strings, matching the interface for dns.message.make_query(). * Remove unneeded "the_section". There's no need to use a separate internal variable for the section; mypy doesn't complain about reuse.
* re-run blackBob Halley2023-03-191-1/+1
|
* more lintBob Halley2022-10-021-1/+1
|
* Add EDNS padding.Bob Halley2022-03-231-15/+64
|
* Add typing info.Brian Wellington2022-03-181-1/+1
|
* Use contextlib.nullcontext().Brian Wellington2022-03-181-3/+5
| | | | | Replaces uses of contextlib.ExitStack, since nullcontext() is available in 3.7.
* join adjacent strings (formatting)Bob Halley2022-03-171-1/+1
|
* black autoformattingBob Halley2022-03-151-250/+403
|
* One more pass, after adding --disallow-incomplete-defsBob Halley2022-03-111-8/+8
|
* Typing pass number 2, featuring typing of bools, adding a return typeBob Halley2022-03-101-32/+42
| | | | | of "-> None" to procedures, and various fixes for omissions, errors, and new issues discovered by type checking previously unchecked things.
* misc type annotation lintBob Halley2022-03-081-2/+2
|
* LGTM lintBob Halley2022-03-061-1/+1
|
* Add integrated typing to much of dnspython.Bob Halley2022-03-051-62/+93
|
* fix various typing issues (typos)Sebastian Wagner2022-01-291-1/+1
| | | | I stumbled over a few typos and then decided to fix 'em all
* Add flags to dns.message.make_query().Brian Wellington2021-11-021-2/+5
|
* Simplify; add a MessageError class.continue_on_errorBob Halley2021-10-241-47/+48
|
* change error format to have current instead of last goodBob Halley2021-10-231-10/+9
|
* draft continue_on_errorBob Halley2021-10-231-62/+103
|
* Add id to dns.message.make_query().Brian Wellington2021-10-141-2/+6
| | | | Allow the caller to supply a message id when building a query.
* Improve dns.message.make_query() docs.Brian Wellington2021-10-131-1/+3
| | | | | | | Update the docs to match the code. Specifically, the docs implied that EDNS was only enabled if use_edns was set, while the code would enable EDNS if any parameter that required EDNS was set and use_edns was not set.
* fix typo and improve dns.message.Message.is_response() doc stringBob Halley2021-10-101-1/+2
|
* use methods with appropriate rcode/opcode typecasting in Message.to_text()Bob Halley2021-01-041-4/+2
|
* Cast flags and ednsflags to int when calling dns.rcode.from_flags() andBob Halley2021-01-041-2/+2
| | | | | dns.opcode.from_flags(). This avoids subsequent to_text issues and other type confusion if the values were allowed to remain IntFlags.
* _WireReader.read() should make flags a dns.flags.Flag [Issue #606]Bob Halley2021-01-041-1/+1
|
* Change ChainingResult "rrset" to "answer"; fix typo.resolve_chainingBob Halley2020-12-211-10/+10
|
* resolve_chaining() now returns a ChainingResult object.Bob Halley2020-12-211-7/+30
|
* resolve_chaining() should not go into an infinite loop if the qtype isBob Halley2020-12-211-0/+3
| | | | CNAME and there is no answer [Issue #610].
* fix rrset match signature problemsfull_matchBob Halley2020-09-031-1/+2
|
* do not call the OPT constructor with rdclass == NoneBob Halley2020-08-211-1/+1
|
* Fix dns.message.use_tsig().Brian Wellington2020-08-101-3/+4
| | | | | | | | Passing only a dns.tsig.Key to dns.message.use_tsig() didn't work, as the placeholder tsig rrset on the message object was created with None as its name, not the name associated with the key. Also do a bit of refactoring to make the code more clear.
* Support callable() TSIG keyrings for use-cases like GSSTSig.Nick Hall2020-08-081-3/+9
|
* Add a lightweight wrapper around the HMAC types and refactor the "is gss-api ↵Nick Hall2020-08-081-4/+4
| | | | or not" wrapper functions to just call the class methods
* fix case of enum namesconstants2Bob Halley2020-08-031-2/+2
|
* remove globals() enum updatingBob Halley2020-08-031-1/+0
|
* add constantsBob Halley2020-08-031-0/+9
|
* pylint lintingBob Halley2020-07-311-2/+8
|
* Raise NoPreviousName if a text message tries to refer to a previous name but ↵Bob Halley2020-07-281-0/+9
| | | | there is none.
* Return the message in question_only mode. [#556]Bob Halley2020-07-281-1/+1
|
* even on errors where we tolerate no question, check question if presentBob Halley2020-07-251-3/+5
|
* Make resolver use_edns() conform to its docstring; slightly improve ↵Bob Halley2020-07-221-1/+1
| | | | use_edns() logic.
* Use min() for min_ttl computations.Bob Halley2020-07-211-8/+3
|
* fix exception docstringsBob Halley2020-07-211-10/+13
|
* set min ttl to max_ttl instead of special case -1Bob Halley2020-07-211-4/+5
|
* unify chaining codeBob Halley2020-07-211-3/+107
|
* Set EDNS default payload to 1232.Bob Halley2020-07-201-3/+4
|
* Minor cleanups to EDNS code.Brian Wellington2020-07-171-18/+7
| | | | | | | When the Message object was changed to store an OPT record, the changes to use_edns() left a lot of cruft. Reduce some code duplication in make_query().
* Fix Message ednsflags propery setter.Brian Wellington2020-07-071-1/+1
| | | | Setting ednsflags to 0 shouldn't unconditionally enable EDNS.
* Fix Message.want_dnssec().Brian Wellington2020-07-071-1/+1
| | | | | It was incorrectly calling Message._make_opt() in the case where the message was not currently using EDNS.