]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Fix rdata pickling.
authorBob Halley <halley@dnspython.org>
Thu, 18 Jun 2020 23:09:47 +0000 (16:09 -0700)
committerBob Halley <halley@dnspython.org>
Thu, 18 Jun 2020 23:09:47 +0000 (16:09 -0700)
commite1f6a890688d342458fd46c65eebf4885ec800d4
tree3255165a3505ce30989d74c80c49b89017577293
parentd4b9df79d1b449f13cfca0b635cea7b96cfc8d1a
Fix rdata pickling.

Coverage testing showed that while rdatas would pickle and unpickle
apparently successfully, in fact only the slots from the deepest class
in the inheritance chain would be restored.  So, e.g., a restored A rdata
would have an address attribute but no rdclass or rdtype attributes,
and so things like rdata comparison would break.

This change preserves the whole set of slots, from all ancestors as
well as the object, as a dictionary.
dns/rdata.py