]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Add relativize_to to from_text(). 429/head
authorBrian Wellington <bwelling@xbill.org>
Wed, 18 Mar 2020 23:44:09 +0000 (16:44 -0700)
committerBrian Wellington <bwelling@xbill.org>
Wed, 18 Mar 2020 23:44:09 +0000 (16:44 -0700)
commitcee00834c8ef0c1a0bebbeb98f5e0c97d39ad0d4
tree930da1b29884daa1a5d38d63387b49fb41181ced
parent41ca1be22dad341709a3856f34fe63aa46da1d1b
Add relativize_to to from_text().

When calling from_text, the zone code needs to apply the current origin
(which may or may not be the zone origin, if sub-zone $ORIGIN statements
are present), and may also want to relativize the contents to the zone
origin.

Previously, this was done by explicitly reading records as absolute, and
then relativizing them laster.  With this change, the work is moved to
the tokenizer.

This gets rid of the remaining internal uses of
dns.rdata.choose_relativity(), which prevents rdata from being
immutable.
41 files changed:
dns/rdata.py
dns/rdata.pyi
dns/rdtypes/ANY/CAA.py
dns/rdtypes/ANY/CERT.py
dns/rdtypes/ANY/CSYNC.py
dns/rdtypes/ANY/GPOS.py
dns/rdtypes/ANY/HINFO.py
dns/rdtypes/ANY/HIP.py
dns/rdtypes/ANY/ISDN.py
dns/rdtypes/ANY/LOC.py
dns/rdtypes/ANY/NSEC.py
dns/rdtypes/ANY/NSEC3.py
dns/rdtypes/ANY/NSEC3PARAM.py
dns/rdtypes/ANY/OPENPGPKEY.py
dns/rdtypes/ANY/RP.py
dns/rdtypes/ANY/RRSIG.py
dns/rdtypes/ANY/SOA.py
dns/rdtypes/ANY/SSHFP.py
dns/rdtypes/ANY/TLSA.py
dns/rdtypes/ANY/URI.py
dns/rdtypes/ANY/X25.py
dns/rdtypes/CH/A.py
dns/rdtypes/IN/A.py
dns/rdtypes/IN/AAAA.py
dns/rdtypes/IN/APL.py
dns/rdtypes/IN/DHCID.py
dns/rdtypes/IN/IPSECKEY.py
dns/rdtypes/IN/NAPTR.py
dns/rdtypes/IN/NSAP.py
dns/rdtypes/IN/PX.py
dns/rdtypes/IN/SRV.py
dns/rdtypes/IN/WKS.py
dns/rdtypes/dnskeybase.py
dns/rdtypes/dnskeybase.pyi
dns/rdtypes/dsbase.py
dns/rdtypes/euibase.py
dns/rdtypes/mxbase.py
dns/rdtypes/nsbase.py
dns/rdtypes/txtbase.py
dns/tokenizer.py
dns/zone.py