{"@attributes":{"version":"2.0"},"channel":{"title":"dnspython","link":"https:\/\/www.dnspython.org\/","description":"Recent content on dnspython","generator":"Hugo -- 0.149.1","language":"en-US","copyright":"Copyright Dnspython Contributors","lastBuildDate":"Sun, 07 Sep 2025 12:15:00 -0700","item":[{"title":"2.8.0","link":"https:\/\/www.dnspython.org\/news\/2.8.0\/","pubDate":"Sun, 07 Sep 2025 12:15:00 -0700","guid":"https:\/\/www.dnspython.org\/news\/2.8.0\/","description":"<p>Dnspython 2.8.0 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.8.0\/\">PyPI<\/a>.<\/p>\n<p>See <a href=\"https:\/\/dnspython.readthedocs.io\/en\/stable\/whatsnew.html\">What&rsquo;s New<\/a> for details.<\/p>\n<p>Thank you to all the contributors to this release, and, as usual,\nthanks to my co-maintainers: Tom\u00e1\u0161 K\u0159\u00ed\u017eek, Petr \u0160pa\u010dek, and Brian\nWellington.<\/p>\n<p>Dnspython 2.8.0 requires Python 3.10 or later.<\/p>\n<p>This release was published to PyPI using Trusted Publishing.<\/p>"},{"title":"2.8.0rc1","link":"https:\/\/www.dnspython.org\/news\/2.8.0rc1\/","pubDate":"Mon, 01 Sep 2025 17:00:00 -0700","guid":"https:\/\/www.dnspython.org\/news\/2.8.0rc1\/","description":"<p>Dnspython 2.8.0rc1 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.8.0rc1\/\">PyPI<\/a>.<\/p>\n<p>This is the first release candidate for dnspython 2.8.0.  See\n<a href=\"https:\/\/dnspython.readthedocs.io\/en\/latest\/whatsnew.html\">What&rsquo;s New<\/a> for details.<\/p>\n<p>We anticipate the final release in about a week.<\/p>\n<p>Thank you to all the contributors to this release.<\/p>\n<p>Dnspython 2.8.0 requires Python 3.10 or later.<\/p>"},{"title":"2.7.0","link":"https:\/\/www.dnspython.org\/news\/2.7.0\/","pubDate":"Sat, 05 Oct 2024 13:15:00 -0700","guid":"https:\/\/www.dnspython.org\/news\/2.7.0\/","description":"<p>Dnspython 2.7.0 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.7.0\/\">PyPI<\/a>.<\/p>\n<p>See <a href=\"https:\/\/dnspython.readthedocs.io\/en\/stable\/whatsnew.html\">What&rsquo;s New<\/a> for details.<\/p>\n<p>Thank you to all the contributors to this release, and, as usual,\nthanks to my co-maintainers: Tom\u00e1\u0161 K\u0159\u00ed\u017eek, Petr \u0160pa\u010dek, and Brian\nWellington.<\/p>\n<p>Dnspython 2.7.0 requires Python 3.9 or later.<\/p>"},{"title":"2.7.0rc1","link":"https:\/\/www.dnspython.org\/news\/2.7.0rc1\/","pubDate":"Sat, 21 Sep 2024 10:00:00 -0700","guid":"https:\/\/www.dnspython.org\/news\/2.7.0rc1\/","description":"<p>Dnspython 2.7.0rc1 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.7.0rc1\/\">PyPI<\/a>.<\/p>\n<p>This is the first release candidate for dnspython 2.7.0.  See\n<a href=\"https:\/\/dnspython.readthedocs.io\/en\/latest\/whatsnew.html\">What&rsquo;s New<\/a> for details.<\/p>\n<p>We anticipate the final release in about a week.<\/p>\n<p>Thank you to all the contributors to this release.<\/p>\n<p>Dnspython 2.7.0 requires Python 3.9 or later.<\/p>"},{"title":"2.6.1","link":"https:\/\/www.dnspython.org\/news\/2.6.1\/","pubDate":"Sun, 18 Feb 2024 10:35:00 -0800","guid":"https:\/\/www.dnspython.org\/news\/2.6.1\/","description":"<p>Dnspython 2.6.1 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.6.1\/\">PyPI<\/a>.<\/p>\n<p>See <a href=\"https:\/\/dnspython.readthedocs.io\/en\/latest\/whatsnew.html\">What&rsquo;s New<\/a> for details.<\/p>\n<p>This is a bug fix release for 2.6.0 where the &ldquo;TuDoor&rdquo; fix erroneously\nsuppressed legitimate Truncated exceptions.  This caused the stub\nresolver to timeout instead of failing over to TCP when a legitimate\ntruncated response was received over UDP.<\/p>\n<p>This release addresses the potential DoS issue discussed in the\n&ldquo;TuDoor&rdquo; paper (CVE-2023-29483).  The dnspython stub resolver is\nvulnerable to a potential DoS if a bad-in-some-way response from the\nright address and port forged by an attacker arrives before a\nlegitimate one on the UDP port dnspython is using for that query.  In\nthis situation, dnspython might switch to querying another resolver or\ngive up entirely, possibly denying service for that resolution.  This\nrelease addresses the issue by adopting the recommended mitigation,\nwhich is ignoring the bad packets and continuing to listen for a\nlegitimate response until the timeout for the query has expired.<\/p>"},{"title":"2.6.0","link":"https:\/\/www.dnspython.org\/news\/2.6.0\/","pubDate":"Fri, 16 Feb 2024 12:15:00 -0800","guid":"https:\/\/www.dnspython.org\/news\/2.6.0\/","description":"<p>Dnspython 2.6.0 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.6.0\/\">PyPI<\/a>.<\/p>\n<p>See <a href=\"https:\/\/dnspython.readthedocs.io\/en\/latest\/whatsnew.html\">What&rsquo;s New<\/a> for details.<\/p>\n<p>This release addresses the potential DoS issue discussed in the\n&ldquo;TuDoor&rdquo; paper (CVE-2023-29483).  The dnspython stub resolver is\nvulnerable to a potential DoS if a bad-in-some-way response from the\nright address and port forged by an attacker arrives before a\nlegitimate one on the UDP port dnspython is using for that query.  In\nthis situation, dnspython might switch to querying another resolver or\ngive up entirely, possibly denying service for that resolution.  This\nrelease addresses the issue by adopting the recommended mitigation,\nwhich is ignoring the bad packets and continuing to listen for a\nlegitimate response until the timeout for the query has expired.<\/p>"},{"title":"2.6.0rc1","link":"https:\/\/www.dnspython.org\/news\/2.6.0rc1\/","pubDate":"Sat, 10 Feb 2024 06:00:00 -0800","guid":"https:\/\/www.dnspython.org\/news\/2.6.0rc1\/","description":"<p>Dnspython 2.6.0rc1 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.6.0rc1\/\">PyPI<\/a>.<\/p>\n<p>This is the first release candidate for dnspython 2.6.0.  See\n<a href=\"https:\/\/dnspython.readthedocs.io\/en\/latest\/whatsnew.html\">What&rsquo;s New<\/a> for details.<\/p>\n<p>This release addresses the potential DoS issue discussed in the\n&ldquo;TuDoor&rdquo; paper (CVE-2023-29483).  The dnspython stub resolver is\nvulnerable to a potential DoS if a bad-in-some-way response from the\nright address and port forged by an attacker arrives before a\nlegitimate one on the UDP port dnspython is using for that query.  In\nthis situation, dnspython might switch to querying another resolver or\ngive up entirely, possibly denying service for that resolution.  This\nrelease addresses the issue by adopting the recommended mitigation,\nwhich is ignoring the bad packets and continuing to listen for a\nlegitimate response until the timeout for the query has expired.<\/p>"},{"title":"About dnspython","link":"https:\/\/www.dnspython.org\/about\/","pubDate":"Fri, 09 Feb 2024 05:25:00 -0800","guid":"https:\/\/www.dnspython.org\/about\/","description":"<p>Dnspython is a DNS toolkit for Python.  It can be used for queries,\nzone transfers, dynamic updates, nameserver testing, and many other\nthings.<\/p>\n<p>Dnspython provides both high and low level access to the DNS. The high\nlevel classes perform queries for data of a given name, type, and\nclass, and return an answer set. The low level classes allow direct\nmanipulation of DNS zones, messages, names, and records.  Almost all\nRR types are supported.<\/p>"},{"title":"2.5.0","link":"https:\/\/www.dnspython.org\/news\/2.5.0\/","pubDate":"Sat, 20 Jan 2024 05:00:00 -0800","guid":"https:\/\/www.dnspython.org\/news\/2.5.0\/","description":"<p>Dnspython 2.5.0 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.5.0\/\">PyPI<\/a>.<\/p>\n<p>See <a href=\"https:\/\/dnspython.readthedocs.io\/en\/stable\/whatsnew.html\">What&rsquo;s New<\/a> for details.<\/p>\n<p>Thank you to all the contributors to this release, and, as usual,\nthanks to my co-maintainers: Tom\u00e1\u0161 K\u0159\u00ed\u017eek, Petr \u0160pa\u010dek, and Brian\nWellington.<\/p>\n<p>Dnspython 2.5.0 requires Python 3.8 or later.  Python 3.8 goes into\nend-of-life state in October of 2024, and dnspython will drop support\nfor it at that time and require 3.9 or later.<\/p>"},{"title":"2.5.0rc1","link":"https:\/\/www.dnspython.org\/news\/2.5.0rc1\/","pubDate":"Sat, 06 Jan 2024 08:50:00 -0800","guid":"https:\/\/www.dnspython.org\/news\/2.5.0rc1\/","description":"<p>Dnspython 2.5.0rc1 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.5.0rc1\/\">PyPI<\/a>.<\/p>\n<p>This is the first release candidate for dnspython 2.5.0.  See\n<a href=\"https:\/\/dnspython.readthedocs.io\/en\/latest\/whatsnew.html\">What&rsquo;s New<\/a> for details.<\/p>\n<p>Thank you to all the contributors to this release.<\/p>\n<p>Dnspython 2.5.0 requires Python 3.8 or later.  Python 3.8 goes into\nend-of-life state in October of 2024, and dnspython will drop support\nfor it at that time and require 3.9 or later.<\/p>"},{"title":"2.4.2","link":"https:\/\/www.dnspython.org\/news\/2.4.2\/","pubDate":"Wed, 09 Aug 2023 07:00:00 -0655","guid":"https:\/\/www.dnspython.org\/news\/2.4.2\/","description":"<p>Dnspython 2.4.2 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.4.2\/\">PyPI<\/a>.<\/p>\n<p>This is a bug fix release, see <a href=\"https:\/\/dnspython.readthedocs.io\/en\/stable\/whatsnew.html\">What&rsquo;s New<\/a> for the details.<\/p>"},{"title":"2.4.1","link":"https:\/\/www.dnspython.org\/news\/2.4.1\/","pubDate":"Wed, 26 Jul 2023 07:00:00 -0700","guid":"https:\/\/www.dnspython.org\/news\/2.4.1\/","description":"<p>Dnspython 2.4.1 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.4.1\/\">PyPI<\/a>.<\/p>\n<p>This is a bug fix release, see <a href=\"https:\/\/dnspython.readthedocs.io\/en\/stable\/whatsnew.html\">What&rsquo;s New<\/a> for the details.<\/p>"},{"title":"2.4.0","link":"https:\/\/www.dnspython.org\/news\/2.4.0\/","pubDate":"Sat, 15 Jul 2023 08:45:00 -0700","guid":"https:\/\/www.dnspython.org\/news\/2.4.0\/","description":"<p>Dnspython 2.4.0 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.4.0\/\">PyPI<\/a>.<\/p>\n<p>See <a href=\"https:\/\/dnspython.readthedocs.io\/en\/stable\/whatsnew.html\">What&rsquo;s New<\/a>!<\/p>\n<p>Thank you to all the contributors to this release.  Special thanks\nto Jakob Schlyter for writing zone signing code and also refactoring the\nDNSSEC code to allow new algorithms to be added more easily.<\/p>\n<p>Dnspython 2.4.0 requires Python 3.8 or later.  Also note that this release\ndrops support for curio and requests (DoH is now done exclusively with httpx).<\/p>"},{"title":"2.4.0rc1","link":"https:\/\/www.dnspython.org\/news\/2.4.0rc1\/","pubDate":"Tue, 04 Jul 2023 13:30:00 -0700","guid":"https:\/\/www.dnspython.org\/news\/2.4.0rc1\/","description":"<p>Dnspython 2.4.0rc1 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.4.0rc1\/\">PyPI<\/a>.<\/p>\n<p>This is the first release candidate for dnspython 2.4.0.  See\n<a href=\"https:\/\/dnspython.readthedocs.io\/en\/latest\/whatsnew.html\">What&rsquo;s New<\/a>!<\/p>\n<p>Thank you to all the contributors to this release.  Special thanks\nto Jakob Schlyter for writing zone signing code and also refactoring the\nDNSSEC code to allow new algorithms to be added more easily.<\/p>\n<p>Dnspython 2.4.0 requires Python 3.8 or later.  Also note that this release\ndrops support for curio and requests (DoH is now done exclusively with httpx).<\/p>"},{"title":"2.3.0","link":"https:\/\/www.dnspython.org\/news\/2.3.0\/","pubDate":"Sun, 15 Jan 2023 09:15:00 -0800","guid":"https:\/\/www.dnspython.org\/news\/2.3.0\/","description":"<p>Dnspython 2.3.0 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.3.0\/\">PyPI<\/a>.<\/p>\n<p>See <a href=\"https:\/\/dnspython.readthedocs.io\/en\/stable\/whatsnew.html\">What&rsquo;s New<\/a> for the details!<\/p>\n<p>Thank you to all the contributors to this release, and special thanks\nto Jakob Schlyter for writing code to make DNSSEC signatures and help\nwith DS, CDS, and CDNSKEY management.<\/p>\n<p>Dnspython 2.3.0 requires Python 3.7 or later.<\/p>"},{"title":"2.3.0rc1","link":"https:\/\/www.dnspython.org\/news\/2.3.0rc1\/","pubDate":"Tue, 27 Dec 2022 12:15:00 -0800","guid":"https:\/\/www.dnspython.org\/news\/2.3.0rc1\/","description":"<p>Dnspython 2.3.0rc1 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.3.0rc1\/\">PyPI<\/a>.<\/p>\n<p>This is the first release candidate for dnspython 2.3.0.  See\n<a href=\"https:\/\/dnspython.readthedocs.io\/en\/latest\/whatsnew.html\">What&rsquo;s New<\/a>!<\/p>\n<p>Thank you to all the contributors to this release, and special thanks\nto Jakob Schlyter for writing code to make DNSSEC signatures and help\nwith DS, CDS, and CDNSKEY management.<\/p>\n<p>Dnspython 2.3.0 requires Python 3.7 or later.<\/p>"},{"title":"2.2.1","link":"https:\/\/www.dnspython.org\/news\/2.2.1\/","pubDate":"Sun, 06 Mar 2022 15:30:00 -0800","guid":"https:\/\/www.dnspython.org\/news\/2.2.1\/","description":"<p>Dnspython 2.2.1 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.2.1\/\">PyPI<\/a>.\nThere are no new features, this is just a bug fix release.<\/p>\n<p>See <a href=\"https:\/\/dnspython.readthedocs.io\/en\/stable\/whatsnew.html\">What&rsquo;s New<\/a> for\nall the fixes.<\/p>\n<p>Thank you to all the contributors to this release.<\/p>\n<p>Python 2.x support ended with 1.16.0. Dnspython 2.2.1 requires\nPython 3.6 or later.<\/p>\n<p>Note that when dnspython 2.3 is released, the minimum Python\nversion will be 3.7.<\/p>"},{"title":"2.2.0","link":"https:\/\/www.dnspython.org\/news\/2.2.0\/","pubDate":"Tue, 18 Jan 2022 05:45:00 -0800","guid":"https:\/\/www.dnspython.org\/news\/2.2.0\/","description":"<p>Dnspython 2.2.0 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.2.0\/\">PyPI<\/a>.<\/p>\n<p>See <a href=\"https:\/\/dnspython.readthedocs.io\/en\/stable\/whatsnew.html\">What&rsquo;s New<\/a> for\nall the features.<\/p>\n<p>Thank you to all the contributors to this release.<\/p>\n<p>Python 2.x support ended with 1.16.0. Dnspython 2.2.0 requires\nPython 3.6 or later.<\/p>"},{"title":"2.2.0rc1","link":"https:\/\/www.dnspython.org\/news\/2.2.0rc1\/","pubDate":"Tue, 21 Dec 2021 08:15:00 -0800","guid":"https:\/\/www.dnspython.org\/news\/2.2.0rc1\/","description":"<p>Dnspython 2.2.0rc1 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.2.0rc1\/\">PyPI<\/a>.<\/p>\n<p>This is the first release candidate for dnspython 2.2.0.  See\n<a href=\"https:\/\/dnspython.readthedocs.io\/en\/latest\/whatsnew.html\">What&rsquo;s New<\/a>!<\/p>"},{"title":"2.1.0","link":"https:\/\/www.dnspython.org\/news\/2.1.0\/","pubDate":"Thu, 07 Jan 2021 08:30:00 -0800","guid":"https:\/\/www.dnspython.org\/news\/2.1.0\/","description":"<p>Dnspython 2.1.0 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.1.0\/\">PyPI<\/a>.<\/p>\n<p>See <a href=\"https:\/\/dnspython.readthedocs.io\/en\/stable\/whatsnew.html\">&ldquo;What&rsquo;s New&rdquo;<\/a> for\nall the features in this major release.<\/p>\n<p>Thanks to the many people who have contributed to this release!<\/p>\n<p>Python 2.x support ended with 1.16.0. Dnspython 2.1.0 requires\nPython 3.6 or later.<\/p>"},{"title":"2.1.0rc1","link":"https:\/\/www.dnspython.org\/news\/2.1.0rc1\/","pubDate":"Fri, 30 Oct 2020 09:30:00 -0700","guid":"https:\/\/www.dnspython.org\/news\/2.1.0rc1\/","description":"<p>Dnspython 2.1.0rc1 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.1.0rc1\/\">PyPI<\/a>.<\/p>\n<p>This is the first release candidate for dnspython 2.1.0.  See\n<a href=\"https:\/\/dnspython.readthedocs.io\/en\/latest\/whatsnew.html\">What&rsquo;s New<\/a>!<\/p>"},{"title":"2.0.0","link":"https:\/\/www.dnspython.org\/news\/2.0.0\/","pubDate":"Fri, 17 Jul 2020 06:30:00 -0700","guid":"https:\/\/www.dnspython.org\/news\/2.0.0\/","description":"<p>Dnspython 2.0.0 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.0.0\/\">PyPI<\/a>.<\/p>\n<p>See <a href=\"https:\/\/dnspython.readthedocs.io\/en\/stable\/whatsnew.html\">&ldquo;What&rsquo;s New&rdquo;<\/a> for\nall the features in this major release.<\/p>\n<p>Thanks to the many people who have contributed to this release!<\/p>\n<p>Python 2.x support ended with 1.16.0. Dnspython 2.0.0 requires\nPython 3.6 or later.<\/p>"},{"title":"2.0.0rc2","link":"https:\/\/www.dnspython.org\/news\/2.0.0rc2\/","pubDate":"Sat, 04 Jul 2020 10:21:00 -0700","guid":"https:\/\/www.dnspython.org\/news\/2.0.0rc2\/","description":"<p>Dnspython 2.0.0rc2 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.0.0rc2\/\">PyPI<\/a>.<\/p>\n<p>This is the second release candidate for dnspython 2.0.0.  See\n<a href=\"https:\/\/dnspython.readthedocs.io\/en\/latest\/whatsnew.html\">What&rsquo;s New<\/a>!<\/p>\n<p>There was a substantial overhaul of the message class hierarchy and the rdata\nencoding system in this RC, and dedicated classes were made for OPT and TSIG.<\/p>"},{"title":"2.0.0rc1","link":"https:\/\/www.dnspython.org\/news\/2.0.0rc1\/","pubDate":"Sat, 20 Jun 2020 14:09:00 -0700","guid":"https:\/\/www.dnspython.org\/news\/2.0.0rc1\/","description":"<p>Dnspython 2.0.0rc1 is now available on <a href=\"https:\/\/pypi.org\/project\/dnspython\/2.0.0rc1\/\">PyPI<\/a>.<\/p>\n<p>This is the first release candidate for dnspython 2.0.0.  See\n<a href=\"https:\/\/dnspython.readthedocs.io\/en\/latest\/whatsnew.html\">What&rsquo;s New<\/a>!<\/p>"},{"title":"Python support update","link":"https:\/\/www.dnspython.org\/news\/python\/","pubDate":"Sat, 20 Jun 2020 10:21:00 -0700","guid":"https:\/\/www.dnspython.org\/news\/python\/","description":"<p>Python 2.x support ended with 1.16.0.  Dnspython 2.0.0 will require Python 3.6\nor later.<\/p>"},{"title":{},"link":"https:\/\/www.dnspython.org\/examples\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/www.dnspython.org\/examples\/","description":"<h1 id=\"examples\">Examples<\/h1>\n<p>Get the MX target and preference of a name:<\/p>\n<pre tabindex=\"0\"><code>import dns.resolver\n\nanswers = dns.resolver.resolve(&#39;dnspython.org&#39;, &#39;MX&#39;)\nfor rdata in answers:\n    print(&#39;Host&#39;, rdata.exchange, &#39;has preference&#39;, rdata.preference)\n<\/code><\/pre><p>Use DNS dynamic update to set the address of a host to a value\nspecified on the command line:<\/p>\n<pre tabindex=\"0\"><code class=\"language-import\" data-lang=\"import\">import dns.tsigkeyring\nimport dns.update\nimport sys\n\nkeyring = dns.tsigkeyring.from_text({\n    &#39;host-example.&#39; : &#39;XXXXXXXXXXXXXXXXXXXXXX==&#39;\n})\n\nupdate = dns.update.UpdateMessage(&#39;dyn.test.example&#39;, keyring=keyring)\nupdate.replace(&#39;host&#39;, 300, &#39;a&#39;, sys.argv[1])\n\nresponse = dns.query.tcp(update, &#39;10.0.0.1&#39;)\n<\/code><\/pre><p>Manipulate domain names:<\/p>"}]}}