]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Add dns.edns.Option.to_generic() (#1145)
authorBrian Wellington <bwelling@xbill.org>
Fri, 11 Oct 2024 20:34:57 +0000 (13:34 -0700)
committerGitHub <noreply@github.com>
Fri, 11 Oct 2024 20:34:57 +0000 (13:34 -0700)
commit91d329a748c4d57c94ab2fef977d75d64b6bb66f
treec7ea8e147d1f97e1090fd9bd89a01be84a80f254
parentc0572cd89c2e53d172ccfe3394c5fa85f9234c64
Add dns.edns.Option.to_generic() (#1145)

* Add dns.edns.Option.to_generic()

Converts an EDNS option represented by a custom class into an equivalent
option represented by the generic option class.  This is similar to the
existing dns.rdata.Rdata.to_generic() method.

Also, adds a specialization to the existing dns.rdata.Rdata.to_generic()
method for GenericRdata, to avoid extra work for applications that want
to convert all rdata to generic form.

* Fix typing issue.

* Fix typing again.
dns/edns.py
dns/rdata.py
tests/test_edns.py
tests/test_rdata.py