dns-rfc2136: use certbot's own is_ipaddress func (#9035)

* dns-rfc2136: use certbot's own is_ipaddress func

* oldest: pin dnspython==1.15.0 (epel8 version)

* inhibit deprecationwarning for dnspython==1.15.0

* dns-rfc2136: declare minimum version of dnspython

* add changelog entry
This commit is contained in:
alexzorin
2021-09-14 07:48:15 +10:00
committed by GitHub
parent bd5f4f2d8a
commit b0aa064640
6 changed files with 11 additions and 6 deletions
@@ -3,7 +3,6 @@ import logging
from typing import Optional
import dns.flags
from dns.inet import is_address
import dns.message
import dns.name
import dns.query
@@ -16,6 +15,7 @@ import dns.update
from certbot import errors
from certbot.plugins import dns_common
from certbot.plugins.dns_common import CredentialsConfiguration
from certbot.util import is_ipaddress
logger = logging.getLogger(__name__)
@@ -57,7 +57,7 @@ class Authenticator(dns_common.DNSAuthenticator):
def _validate_credentials(self, credentials):
server = credentials.conf('server')
if not is_address(server):
if not is_ipaddress(server):
raise errors.PluginError("The configured target DNS server ({0}) is not a valid IPv4 "
"or IPv6 address. A hostname is not allowed.".format(server))
algorithm = credentials.conf('algorithm')
+1 -1
View File
@@ -7,7 +7,7 @@ from setuptools import setup
version = '1.20.0.dev0'
install_requires = [
'dnspython',
'dnspython>=1.15.0',
'setuptools>=39.0.1',
]
+2 -1
View File
@@ -15,7 +15,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
### Fixed
*
* The certbot-dns-rfc2136 plugin in Certbot 1.19.0 inadvertently had an implicit
dependency on `dnspython>=2.0`. This has been relaxed to `dnspython>=1.15.0`.
More details about these changes can be found on our GitHub repo.
+4 -1
View File
@@ -20,9 +20,12 @@
# the certbot.interfaces module.
# 4) The deprecation warning raised when importing deprecated attributes from
# the certbot.display.util module.
# 5) A deprecation warning is raised in dnspython==1.15.0 in the oldest tests for
# certbot-dns-rfc2136.
filterwarnings =
error
ignore:The external mock module:PendingDeprecationWarning
ignore:.*zope. missing __init__:ImportWarning
ignore:.*attribute in certbot.interfaces module is deprecated:DeprecationWarning
ignore:.*attribute in certbot.display.util module is deprecated:DeprecationWarning
ignore:.*attribute in certbot.display.util module is deprecated:DeprecationWarning
ignore:decodestring\(\) is a deprecated alias:DeprecationWarning:dns
+1 -1
View File
@@ -22,7 +22,7 @@ cython==0.29.24; (python_version >= "2.6" and python_full_version < "3.0.0") or
distlib==0.3.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.5.0"
distro==1.0.1
dns-lexicon==3.2.1
dnspython==2.1.0; python_version >= "3.6"
dnspython==1.15.0
docker-compose==1.24.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
docker-pycreds==0.4.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
docker==3.7.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
+1
View File
@@ -63,6 +63,7 @@ configobj = "5.0.6"
cryptography = "2.1.4"
distro = "1.0.1"
dns-lexicon = "3.2.1"
dnspython = "1.15.0"
funcsigs = "0.4"
google-api-python-client = "1.5.5"
httplib2 = "0.9.2"