ags-slc/localzone

No longer compatible witih dnspython>=2

jonringer opened this issue · 1 comments

dnspython's rdata no longer supports assignment:

=================================== FAILURES ===================================
________________________________ test_zone_save ________________________________

    def test_zone_save():
        savefile = "tests/db.example.com.saved"
        z = localzone.load(ZONEFILE, ORIGIN)
        serial = z.soa.rdata.serial
        record = z.update_record(HASHID, "192.0.2.100")
>       z.save(savefile)

tests/test_models.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
localzone/models.py:71: in save
    self._increment_serial()
localzone/models.py:52: in _increment_serial
    self.soa.rdata.serial = next_serial
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <DNS IN SOA rdata: ns username 2007120710 86400 7200 2419200 3600>
name = 'serial', value = 2020090900

    def __setattr__(self, name, value):
        # Rdatas are immutable
>       raise TypeError("object doesn't support attribute assignment")
E       TypeError: object doesn't support attribute assignment

/nix/store/7irxfzrcns4x6a7hc2ip9wn62zyc4a1n-python3.8-dnspython-2.0.0/lib/python3.8/site-packages/dns/rdata.py:129: TypeError

Thanks @jonringer for reporting this. I'll work on getting this fixed ASAP.