Hello community, here is the log from the commit of package python-certbot-dns-dnsimple for openSUSE:Factory checked in at 2020-01-03 17:39:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-certbot-dns-dnsimple (Old) and /work/SRC/openSUSE:Factory/.python-certbot-dns-dnsimple.new.6675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-certbot-dns-dnsimple" Fri Jan 3 17:39:03 2020 rev:15 rq:760653 version:1.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-certbot-dns-dnsimple/python-certbot-dns-dnsimple.changes 2019-11-15 00:24:29.899862586 +0100 +++ /work/SRC/openSUSE:Factory/.python-certbot-dns-dnsimple.new.6675/python-certbot-dns-dnsimple.changes 2020-01-03 17:39:21.611368840 +0100 @@ -1,0 +2,6 @@ +Fri Jan 3 11:56:24 UTC 2020 - Marketa Calabkova <mcalabk...@suse.com> + +- update to version 1.0.0 + * sync with main certbot package. + +------------------------------------------------------------------- Old: ---- certbot-dns-dnsimple-0.40.1.tar.gz New: ---- certbot-dns-dnsimple-1.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-certbot-dns-dnsimple.spec ++++++ --- /var/tmp/diff_new_pack.s0Yk2D/_old 2020-01-03 17:39:23.339369728 +0100 +++ /var/tmp/diff_new_pack.s0Yk2D/_new 2020-01-03 17:39:23.375369746 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-certbot-dns-dnsimple # -# Copyright (c) 2019 SUSE LLC. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,21 +18,22 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-certbot-dns-dnsimple -Version: 0.40.1 +Version: 1.0.0 Release: 0 Summary: DNSimple Authenticator plugin for Certbot License: Apache-2.0 URL: https://github.com/certbot/certbot Source: https://files.pythonhosted.org/packages/source/c/certbot-dns-dnsimple/certbot-dns-dnsimple-%{version}.tar.gz -BuildRequires: %{python_module certbot >= 0.34.0} -BuildRequires: %{python_module dns-lexicon >= 2.2.1} +BuildRequires: %{python_module certbot >= 1.0.0} +BuildRequires: %{python_module dns-lexicon >= 3.2.1} BuildRequires: %{python_module mock} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-acme >= 0.21.1 -Requires: python-certbot >= 0.34.0 -Requires: python-dns-lexicon >= 2.2.1 +Requires: python-acme >= 0.31.0 +Requires: python-certbot >= 1.0.0 +Requires: python-dns-lexicon >= 3.2.1 Requires: python-zope.interface BuildArch: noarch %python_subpackages ++++++ certbot-dns-dnsimple-0.40.1.tar.gz -> certbot-dns-dnsimple-1.0.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/MANIFEST.in new/certbot-dns-dnsimple-1.0.0/MANIFEST.in --- old/certbot-dns-dnsimple-0.40.1/MANIFEST.in 2019-11-06 03:24:51.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/MANIFEST.in 2019-12-03 18:20:30.000000000 +0100 @@ -1,3 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * +recursive-include tests * +global-exclude __pycache__ +global-exclude *.py[cod] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/PKG-INFO new/certbot-dns-dnsimple-1.0.0/PKG-INFO --- old/certbot-dns-dnsimple-0.40.1/PKG-INFO 2019-11-06 03:25:07.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/PKG-INFO 2019-12-03 18:20:56.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: certbot-dns-dnsimple -Version: 0.40.1 +Version: 1.0.0 Summary: DNSimple DNS Authenticator plugin for Certbot Home-page: https://github.com/certbot/certbot Author: Certbot Project diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple/_internal/__init__.py new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple/_internal/__init__.py --- old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple/_internal/__init__.py 1970-01-01 01:00:00.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple/_internal/__init__.py 2019-12-03 18:20:30.000000000 +0100 @@ -0,0 +1 @@ +"""Internal implementation of `~certbot_dns_dnsimple.dns_dnsimple` plugin.""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple/_internal/dns_dnsimple.py new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple/_internal/dns_dnsimple.py --- old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple/_internal/dns_dnsimple.py 1970-01-01 01:00:00.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple/_internal/dns_dnsimple.py 2019-12-03 18:20:30.000000000 +0100 @@ -0,0 +1,82 @@ +"""DNS Authenticator for DNSimple DNS.""" +import logging + +import zope.interface +from lexicon.providers import dnsimple + +from certbot import errors +from certbot import interfaces +from certbot.plugins import dns_common +from certbot.plugins import dns_common_lexicon + +logger = logging.getLogger(__name__) + +ACCOUNT_URL = 'https://dnsimple.com/user' + + +@zope.interface.implementer(interfaces.IAuthenticator) +@zope.interface.provider(interfaces.IPluginFactory) +class Authenticator(dns_common.DNSAuthenticator): + """DNS Authenticator for DNSimple + + This Authenticator uses the DNSimple v2 API to fulfill a dns-01 challenge. + """ + + description = 'Obtain certificates using a DNS TXT record (if you are using DNSimple for DNS).' + ttl = 60 + + def __init__(self, *args, **kwargs): + super(Authenticator, self).__init__(*args, **kwargs) + self.credentials = None + + @classmethod + def add_parser_arguments(cls, add): # pylint: disable=arguments-differ + super(Authenticator, cls).add_parser_arguments(add, default_propagation_seconds=30) + add('credentials', help='DNSimple credentials INI file.') + + def more_info(self): # pylint: disable=missing-docstring,no-self-use + return 'This plugin configures a DNS TXT record to respond to a dns-01 challenge using ' + \ + 'the DNSimple API.' + + def _setup_credentials(self): + self.credentials = self._configure_credentials( + 'credentials', + 'DNSimple credentials INI file', + { + 'token': 'User access token for DNSimple v2 API. (See {0}.)'.format(ACCOUNT_URL) + } + ) + + def _perform(self, domain, validation_name, validation): + self._get_dnsimple_client().add_txt_record(domain, validation_name, validation) + + def _cleanup(self, domain, validation_name, validation): + self._get_dnsimple_client().del_txt_record(domain, validation_name, validation) + + def _get_dnsimple_client(self): + return _DNSimpleLexiconClient(self.credentials.conf('token'), self.ttl) + + +class _DNSimpleLexiconClient(dns_common_lexicon.LexiconClient): + """ + Encapsulates all communication with the DNSimple via Lexicon. + """ + + def __init__(self, token, ttl): + super(_DNSimpleLexiconClient, self).__init__() + + config = dns_common_lexicon.build_lexicon_config('dnssimple', { + 'ttl': ttl, + }, { + 'auth_token': token, + }) + + self.provider = dnsimple.Provider(config) + + def _handle_http_error(self, e, domain_name): + hint = None + if str(e).startswith('401 Client Error: Unauthorized for url:'): + hint = 'Is your API token value correct?' + + return errors.PluginError('Error determining zone identifier for {0}: {1}.{2}' + .format(domain_name, e, ' ({0})'.format(hint) if hint else '')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple/dns_dnsimple.py new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple/dns_dnsimple.py --- old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple/dns_dnsimple.py 2019-11-06 03:24:51.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple/dns_dnsimple.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,82 +0,0 @@ -"""DNS Authenticator for DNSimple DNS.""" -import logging - -import zope.interface -from lexicon.providers import dnsimple - -from certbot import errors -from certbot import interfaces -from certbot.plugins import dns_common -from certbot.plugins import dns_common_lexicon - -logger = logging.getLogger(__name__) - -ACCOUNT_URL = 'https://dnsimple.com/user' - - -@zope.interface.implementer(interfaces.IAuthenticator) -@zope.interface.provider(interfaces.IPluginFactory) -class Authenticator(dns_common.DNSAuthenticator): - """DNS Authenticator for DNSimple - - This Authenticator uses the DNSimple v2 API to fulfill a dns-01 challenge. - """ - - description = 'Obtain certificates using a DNS TXT record (if you are using DNSimple for DNS).' - ttl = 60 - - def __init__(self, *args, **kwargs): - super(Authenticator, self).__init__(*args, **kwargs) - self.credentials = None - - @classmethod - def add_parser_arguments(cls, add): # pylint: disable=arguments-differ - super(Authenticator, cls).add_parser_arguments(add, default_propagation_seconds=30) - add('credentials', help='DNSimple credentials INI file.') - - def more_info(self): # pylint: disable=missing-docstring,no-self-use - return 'This plugin configures a DNS TXT record to respond to a dns-01 challenge using ' + \ - 'the DNSimple API.' - - def _setup_credentials(self): - self.credentials = self._configure_credentials( - 'credentials', - 'DNSimple credentials INI file', - { - 'token': 'User access token for DNSimple v2 API. (See {0}.)'.format(ACCOUNT_URL) - } - ) - - def _perform(self, domain, validation_name, validation): - self._get_dnsimple_client().add_txt_record(domain, validation_name, validation) - - def _cleanup(self, domain, validation_name, validation): - self._get_dnsimple_client().del_txt_record(domain, validation_name, validation) - - def _get_dnsimple_client(self): - return _DNSimpleLexiconClient(self.credentials.conf('token'), self.ttl) - - -class _DNSimpleLexiconClient(dns_common_lexicon.LexiconClient): - """ - Encapsulates all communication with the DNSimple via Lexicon. - """ - - def __init__(self, token, ttl): - super(_DNSimpleLexiconClient, self).__init__() - - config = dns_common_lexicon.build_lexicon_config('dnssimple', { - 'ttl': ttl, - }, { - 'auth_token': token, - }) - - self.provider = dnsimple.Provider(config) - - def _handle_http_error(self, e, domain_name): - hint = None - if str(e).startswith('401 Client Error: Unauthorized for url:'): - hint = 'Is your API token value correct?' - - return errors.PluginError('Error determining zone identifier for {0}: {1}.{2}' - .format(domain_name, e, ' ({0})'.format(hint) if hint else '')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple/dns_dnsimple_test.py new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple/dns_dnsimple_test.py --- old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple/dns_dnsimple_test.py 2019-11-06 03:24:51.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple/dns_dnsimple_test.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,51 +0,0 @@ -"""Tests for certbot_dns_dnsimple.dns_dnsimple.""" - -import unittest - -import mock -from requests.exceptions import HTTPError - -from certbot.compat import os -from certbot.plugins import dns_test_common -from certbot.plugins import dns_test_common_lexicon -from certbot.tests import util as test_util - -TOKEN = 'foo' - - -class AuthenticatorTest(test_util.TempDirTestCase, - dns_test_common_lexicon.BaseLexiconAuthenticatorTest): - - def setUp(self): - super(AuthenticatorTest, self).setUp() - - from certbot_dns_dnsimple.dns_dnsimple import Authenticator - - path = os.path.join(self.tempdir, 'file.ini') - dns_test_common.write({"dnsimple_token": TOKEN}, path) - - self.config = mock.MagicMock(dnsimple_credentials=path, - dnsimple_propagation_seconds=0) # don't wait during tests - - self.auth = Authenticator(self.config, "dnsimple") - - self.mock_client = mock.MagicMock() - # _get_dnsimple_client | pylint: disable=protected-access - self.auth._get_dnsimple_client = mock.MagicMock(return_value=self.mock_client) - - -class DNSimpleLexiconClientTest(unittest.TestCase, dns_test_common_lexicon.BaseLexiconClientTest): - - LOGIN_ERROR = HTTPError('401 Client Error: Unauthorized for url: ...') - - def setUp(self): - from certbot_dns_dnsimple.dns_dnsimple import _DNSimpleLexiconClient - - self.client = _DNSimpleLexiconClient(TOKEN, 0) - - self.provider_mock = mock.MagicMock() - self.client.provider = self.provider_mock - - -if __name__ == "__main__": - unittest.main() # pragma: no cover diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple.egg-info/PKG-INFO new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple.egg-info/PKG-INFO --- old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple.egg-info/PKG-INFO 2019-11-06 03:25:07.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple.egg-info/PKG-INFO 2019-12-03 18:20:56.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: certbot-dns-dnsimple -Version: 0.40.1 +Version: 1.0.0 Summary: DNSimple DNS Authenticator plugin for Certbot Home-page: https://github.com/certbot/certbot Author: Certbot Project diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple.egg-info/SOURCES.txt new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple.egg-info/SOURCES.txt --- old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple.egg-info/SOURCES.txt 2019-11-06 03:25:07.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple.egg-info/SOURCES.txt 2019-12-03 18:20:56.000000000 +0100 @@ -4,18 +4,18 @@ setup.cfg setup.py certbot_dns_dnsimple/__init__.py -certbot_dns_dnsimple/dns_dnsimple.py -certbot_dns_dnsimple/dns_dnsimple_test.py certbot_dns_dnsimple.egg-info/PKG-INFO certbot_dns_dnsimple.egg-info/SOURCES.txt certbot_dns_dnsimple.egg-info/dependency_links.txt certbot_dns_dnsimple.egg-info/entry_points.txt certbot_dns_dnsimple.egg-info/requires.txt certbot_dns_dnsimple.egg-info/top_level.txt +certbot_dns_dnsimple/_internal/__init__.py +certbot_dns_dnsimple/_internal/dns_dnsimple.py docs/.gitignore docs/Makefile docs/api.rst docs/conf.py docs/index.rst docs/make.bat -docs/api/dns_dnsimple.rst \ No newline at end of file +tests/dns_dnsimple_test.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple.egg-info/entry_points.txt new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple.egg-info/entry_points.txt --- old/certbot-dns-dnsimple-0.40.1/certbot_dns_dnsimple.egg-info/entry_points.txt 2019-11-06 03:25:07.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/certbot_dns_dnsimple.egg-info/entry_points.txt 2019-12-03 18:20:56.000000000 +0100 @@ -1,3 +1,3 @@ [certbot.plugins] -dns-dnsimple = certbot_dns_dnsimple.dns_dnsimple:Authenticator +dns-dnsimple = certbot_dns_dnsimple._internal.dns_dnsimple:Authenticator diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/docs/api/dns_dnsimple.rst new/certbot-dns-dnsimple-1.0.0/docs/api/dns_dnsimple.rst --- old/certbot-dns-dnsimple-0.40.1/docs/api/dns_dnsimple.rst 2019-11-06 03:24:51.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/docs/api/dns_dnsimple.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -:mod:`certbot_dns_dnsimple.dns_dnsimple` ----------------------------------------- - -.. automodule:: certbot_dns_dnsimple.dns_dnsimple - :members: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/docs/api.rst new/certbot-dns-dnsimple-1.0.0/docs/api.rst --- old/certbot-dns-dnsimple-0.40.1/docs/api.rst 2019-11-06 03:24:51.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/docs/api.rst 2019-12-03 18:20:30.000000000 +0100 @@ -2,7 +2,4 @@ API Documentation ================= -.. toctree:: - :glob: - - api/** +Certbot plugins implement the Certbot plugins API, and do not otherwise have an external API. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/setup.py new/certbot-dns-dnsimple-1.0.0/setup.py --- old/certbot-dns-dnsimple-0.40.1/setup.py 2019-11-06 03:24:52.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/setup.py 2019-12-03 18:20:32.000000000 +0100 @@ -1,9 +1,11 @@ import os from setuptools import setup from setuptools import find_packages +from setuptools.command.test import test as TestCommand +import sys -version = '0.40.1' +version = '1.0.0' # Remember to update local-oldest-requirements.txt when changing the minimum # acme/certbot version. @@ -32,6 +34,20 @@ 'sphinx_rtd_theme', ] +class PyTest(TestCommand): + user_options = [] + + def initialize_options(self): + TestCommand.initialize_options(self) + self.pytest_args = '' + + def run_tests(self): + import shlex + # import here, cause outside the eggs aren't loaded + import pytest + errno = pytest.main(shlex.split(self.pytest_args)) + sys.exit(errno) + setup( name='certbot-dns-dnsimple', version=version, @@ -72,8 +88,10 @@ }, entry_points={ 'certbot.plugins': [ - 'dns-dnsimple = certbot_dns_dnsimple.dns_dnsimple:Authenticator', + 'dns-dnsimple = certbot_dns_dnsimple._internal.dns_dnsimple:Authenticator', ], }, + tests_require=["pytest"], test_suite='certbot_dns_dnsimple', + cmdclass={"test": PyTest}, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/certbot-dns-dnsimple-0.40.1/tests/dns_dnsimple_test.py new/certbot-dns-dnsimple-1.0.0/tests/dns_dnsimple_test.py --- old/certbot-dns-dnsimple-0.40.1/tests/dns_dnsimple_test.py 1970-01-01 01:00:00.000000000 +0100 +++ new/certbot-dns-dnsimple-1.0.0/tests/dns_dnsimple_test.py 2019-12-03 18:20:30.000000000 +0100 @@ -0,0 +1,51 @@ +"""Tests for certbot_dns_dnsimple._internal.dns_dnsimple.""" + +import unittest + +import mock +from requests.exceptions import HTTPError + +from certbot.compat import os +from certbot.plugins import dns_test_common +from certbot.plugins import dns_test_common_lexicon +from certbot.tests import util as test_util + +TOKEN = 'foo' + + +class AuthenticatorTest(test_util.TempDirTestCase, + dns_test_common_lexicon.BaseLexiconAuthenticatorTest): + + def setUp(self): + super(AuthenticatorTest, self).setUp() + + from certbot_dns_dnsimple._internal.dns_dnsimple import Authenticator + + path = os.path.join(self.tempdir, 'file.ini') + dns_test_common.write({"dnsimple_token": TOKEN}, path) + + self.config = mock.MagicMock(dnsimple_credentials=path, + dnsimple_propagation_seconds=0) # don't wait during tests + + self.auth = Authenticator(self.config, "dnsimple") + + self.mock_client = mock.MagicMock() + # _get_dnsimple_client | pylint: disable=protected-access + self.auth._get_dnsimple_client = mock.MagicMock(return_value=self.mock_client) + + +class DNSimpleLexiconClientTest(unittest.TestCase, dns_test_common_lexicon.BaseLexiconClientTest): + + LOGIN_ERROR = HTTPError('401 Client Error: Unauthorized for url: ...') + + def setUp(self): + from certbot_dns_dnsimple._internal.dns_dnsimple import _DNSimpleLexiconClient + + self.client = _DNSimpleLexiconClient(TOKEN, 0) + + self.provider_mock = mock.MagicMock() + self.client.provider = self.provider_mock + + +if __name__ == "__main__": + unittest.main() # pragma: no cover