Hello community,

here is the log from the commit of package python-certbot for openSUSE:Factory 
checked in at 2020-08-21 19:12:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-certbot (Old)
 and      /work/SRC/openSUSE:Factory/.python-certbot.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-certbot"

Fri Aug 21 19:12:16 2020 rev:29 rq:828417 version:1.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-certbot/python-certbot.changes    
2020-07-15 15:01:53.131226627 +0200
+++ /work/SRC/openSUSE:Factory/.python-certbot.new.3399/python-certbot.changes  
2020-08-21 19:13:15.760680074 +0200
@@ -1,0 +2,10 @@
+Fri Aug 21 08:37:38 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- Update to version 1.7.0
+  * Third-party plugins can be used without prefix (plugin_name instead of 
dist_name:plugin_name):
+    this concerns the plugin name, CLI flags, and keys in credential files.
+    The prefixed form is still supported but is deprecated, and will be 
removed in a future release.
+  * We deprecated support for Python 3.5 in Certbot and its ACME library.
+    Support for Python 3.5 will be removed in the next major release of 
Certbot.
+
+-------------------------------------------------------------------

Old:
----
  certbot-1.6.0.tar.gz

New:
----
  certbot-1.7.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-certbot.spec ++++++
--- /var/tmp/diff_new_pack.1tfT3r/_old  2020-08-21 19:13:17.836681307 +0200
+++ /var/tmp/diff_new_pack.1tfT3r/_new  2020-08-21 19:13:17.836681307 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %bcond_without python2
 Name:           python-certbot
-Version:        1.6.0
+Version:        1.7.0
 Release:        0
 Summary:        ACME client
 License:        Apache-2.0

++++++ certbot-1.6.0.tar.gz -> certbot-1.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/CHANGELOG.md 
new/certbot-1.7.0/CHANGELOG.md
--- old/certbot-1.6.0/CHANGELOG.md      2020-07-07 19:13:21.000000000 +0200
+++ new/certbot-1.7.0/CHANGELOG.md      2020-08-04 20:20:15.000000000 +0200
@@ -2,6 +2,28 @@
 
 Certbot adheres to [Semantic Versioning](https://semver.org/).
 
+## 1.7.0 - 2020-08-04
+
+### Added
+
+* Third-party plugins can be used without prefix (`plugin_name` instead of 
`dist_name:plugin_name`):
+  this concerns the plugin name, CLI flags, and keys in credential files.
+  The prefixed form is still supported but is deprecated, and will be removed 
in a future release.
+* Added `--nginx-sleep-seconds` (default `1`) for environments where nginx 
takes a long time to reload.
+
+### Changed
+
+* The Linode DNS plugin now waits 120 seconds for DNS propagation, instead of 
1200,
+  due to https://www.linode.com/blog/linode/linode-turns-17/
+* We deprecated support for Python 3.5 in Certbot and its ACME library.
+  Support for Python 3.5 will be removed in the next major release of Certbot.
+
+### Fixed
+
+*
+
+More details about these changes can be found on our GitHub repo.
+
 ## 1.6.0 - 2020-07-07
 
 ### Added
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/PKG-INFO new/certbot-1.7.0/PKG-INFO
--- old/certbot-1.6.0/PKG-INFO  2020-07-07 19:13:25.000000000 +0200
+++ new/certbot-1.7.0/PKG-INFO  2020-08-04 20:20:16.638172000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: certbot
-Version: 1.6.0
+Version: 1.7.0
 Summary: ACME client
 Home-page: https://github.com/letsencrypt/letsencrypt
 Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/certbot/__init__.py 
new/certbot-1.7.0/certbot/__init__.py
--- old/certbot-1.6.0/certbot/__init__.py       2020-07-07 19:13:23.000000000 
+0200
+++ new/certbot-1.7.0/certbot/__init__.py       2020-08-04 20:20:16.000000000 
+0200
@@ -1,4 +1,13 @@
 """Certbot client."""
+import warnings
+import sys
 
 # version number like 1.2.3a0, must have at least 2 parts, like 1.2
-__version__ = '1.6.0'
+__version__ = '1.7.0'
+
+if sys.version_info[:2] == (3, 5):
+    warnings.warn(
+            "Python 3.5 support will be dropped in the next release of "
+            "certbot. Please upgrade your Python version.",
+            PendingDeprecationWarning,
+    )  # pragma: no cover
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/certbot/_internal/main.py 
new/certbot-1.7.0/certbot/_internal/main.py
--- old/certbot-1.6.0/certbot/_internal/main.py 2020-07-07 19:13:20.000000000 
+0200
+++ new/certbot-1.7.0/certbot/_internal/main.py 2020-08-04 20:20:15.000000000 
+0200
@@ -1343,6 +1343,10 @@
         if config.func != plugins_cmd:  # pylint: 
disable=comparison-with-callable
             raise
 
+    if sys.version_info[:2] == (3, 5):
+        logger.warning("Python 3.5 support will be dropped in the next release 
"
+                       "of Certbot - please upgrade your Python version.")
+
     set_displayer(config)
 
     # Reporter
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/certbot/_internal/plugins/disco.py 
new/certbot-1.7.0/certbot/_internal/plugins/disco.py
--- old/certbot-1.6.0/certbot/_internal/plugins/disco.py        2020-07-07 
19:13:20.000000000 +0200
+++ new/certbot-1.7.0/certbot/_internal/plugins/disco.py        2020-08-04 
20:20:15.000000000 +0200
@@ -23,47 +23,58 @@
 
 logger = logging.getLogger(__name__)
 
+PREFIX_FREE_DISTRIBUTIONS = [
+    "certbot",
+    "certbot-apache",
+    "certbot-dns-cloudflare",
+    "certbot-dns-cloudxns",
+    "certbot-dns-digitalocean",
+    "certbot-dns-dnsimple",
+    "certbot-dns-dnsmadeeasy",
+    "certbot-dns-gehirn",
+    "certbot-dns-google",
+    "certbot-dns-linode",
+    "certbot-dns-luadns",
+    "certbot-dns-nsone",
+    "certbot-dns-ovh",
+    "certbot-dns-rfc2136",
+    "certbot-dns-route53",
+    "certbot-dns-sakuracloud",
+    "certbot-nginx",
+]
+"""Distributions for which prefix will be omitted."""
+
 
 class PluginEntryPoint(object):
     """Plugin entry point."""
 
-    PREFIX_FREE_DISTRIBUTIONS = [
-        "certbot",
-        "certbot-apache",
-        "certbot-dns-cloudflare",
-        "certbot-dns-cloudxns",
-        "certbot-dns-digitalocean",
-        "certbot-dns-dnsimple",
-        "certbot-dns-dnsmadeeasy",
-        "certbot-dns-gehirn",
-        "certbot-dns-google",
-        "certbot-dns-linode",
-        "certbot-dns-luadns",
-        "certbot-dns-nsone",
-        "certbot-dns-ovh",
-        "certbot-dns-rfc2136",
-        "certbot-dns-route53",
-        "certbot-dns-sakuracloud",
-        "certbot-nginx",
-    ]
-    """Distributions for which prefix will be omitted."""
-
     # this object is mutable, don't allow it to be hashed!
     __hash__ = None  # type: ignore
 
-    def __init__(self, entry_point):
-        self.name = self.entry_point_to_plugin_name(entry_point)
+    def __init__(self, entry_point, with_prefix=False):
+        self.name = self.entry_point_to_plugin_name(entry_point, with_prefix)
         self.plugin_cls = entry_point.load()
         self.entry_point = entry_point
+        self.warning_message = None
         self._initialized = None
         self._prepared = None
+        self._hidden = False
+        self._long_description = None
+
+    def check_name(self, name):
+        """Check if the name refers to this plugin."""
+        if name == self.name:
+            if self.warning_message:
+                logger.warning(self.warning_message)
+            return True
+        return False
 
     @classmethod
-    def entry_point_to_plugin_name(cls, entry_point):
+    def entry_point_to_plugin_name(cls, entry_point, with_prefix):
         """Unique plugin name for an ``entry_point``"""
-        if entry_point.dist.key in cls.PREFIX_FREE_DISTRIBUTIONS:
-            return entry_point.name
-        return entry_point.dist.key + ":" + entry_point.name
+        if with_prefix:
+            return entry_point.dist.key + ":" + entry_point.name
+        return entry_point.name
 
     @property
     def description(self):
@@ -78,15 +89,25 @@
     @property
     def long_description(self):
         """Long description of the plugin."""
+        if self._long_description:
+            return self._long_description
         try:
             return self.plugin_cls.long_description
         except AttributeError:
             return self.description
 
+    @long_description.setter
+    def long_description(self, description):
+        self._long_description = description
+
     @property
     def hidden(self):
         """Should this plugin be hidden from UI?"""
-        return getattr(self.plugin_cls, "hidden", False)
+        return self._hidden or getattr(self.plugin_cls, "hidden", False)
+
+    @hidden.setter
+    def hidden(self, hide):
+        self._hidden = hide
 
     def ifaces(self, *ifaces_groups):
         """Does plugin implements specified interface groups?"""
@@ -212,16 +233,34 @@
             pkg_resources.iter_entry_points(
                 constants.OLD_SETUPTOOLS_PLUGINS_ENTRY_POINT),)
         for entry_point in entry_points:
-            plugin_ep = PluginEntryPoint(entry_point)
-            assert plugin_ep.name not in plugins, (
-                "PREFIX_FREE_DISTRIBUTIONS messed up")
-            if interfaces.IPluginFactory.providedBy(plugin_ep.plugin_cls):
-                plugins[plugin_ep.name] = plugin_ep
-            else:  # pragma: no cover
-                logger.warning(
-                    "%r does not provide IPluginFactory, skipping", plugin_ep)
+            plugin_ep = cls._load_entry_point(entry_point, plugins, 
with_prefix=False)
+            if entry_point.dist.key not in PREFIX_FREE_DISTRIBUTIONS:
+                prefixed_plugin_ep = cls._load_entry_point(entry_point, 
plugins, with_prefix=True)
+                prefixed_plugin_ep.hidden = True
+                message = (
+                    "Plugin legacy name {0} may be removed in a future 
version. "
+                    "Please use {1} instead.").format(prefixed_plugin_ep.name, 
plugin_ep.name)
+                prefixed_plugin_ep.warning_message = message
+                prefixed_plugin_ep.long_description = "(WARNING: {0}) 
{1}".format(
+                    message, prefixed_plugin_ep.long_description)
+
         return cls(plugins)
 
+    @classmethod
+    def _load_entry_point(cls, entry_point, plugins, with_prefix):
+        plugin_ep = PluginEntryPoint(entry_point, with_prefix)
+        if plugin_ep.name in plugins:
+            other_ep = plugins[plugin_ep.name]
+            raise Exception("Duplicate plugin name {0} from {1} and 
{2}.".format(
+                plugin_ep.name, plugin_ep.entry_point.dist.key, 
other_ep.entry_point.dist.key))
+        if interfaces.IPluginFactory.providedBy(plugin_ep.plugin_cls):
+            plugins[plugin_ep.name] = plugin_ep
+        else:  # pragma: no cover
+            logger.warning(
+                "%r does not provide IPluginFactory, skipping", plugin_ep)
+
+        return plugin_ep
+
     def __getitem__(self, name):
         return self._plugins[name]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/certbot/_internal/plugins/selection.py 
new/certbot-1.7.0/certbot/_internal/plugins/selection.py
--- old/certbot-1.6.0/certbot/_internal/plugins/selection.py    2020-07-07 
19:13:20.000000000 +0200
+++ new/certbot-1.7.0/certbot/_internal/plugins/selection.py    2020-08-04 
20:20:15.000000000 +0200
@@ -38,6 +38,7 @@
     return pick_plugin(
         config, default, plugins, question, (interfaces.IAuthenticator,))
 
+
 def get_unprepared_installer(config, plugins):
     """
     Get an unprepared interfaces.IInstaller object.
@@ -53,7 +54,7 @@
     _, req_inst = cli_plugin_requests(config)
     if not req_inst:
         return None
-    installers = plugins.filter(lambda p_ep: p_ep.name == req_inst)
+    installers = plugins.filter(lambda p_ep: p_ep.check_name(req_inst))
     installers.init(config)
     installers = installers.verify((interfaces.IInstaller,))
     if len(installers) > 1:
@@ -67,6 +68,7 @@
     raise errors.PluginSelectionError(
         "Could not select or initialize the requested installer %s." % 
req_inst)
 
+
 def pick_plugin(config, default, plugins, question, ifaces):
     """Pick plugin.
 
@@ -84,7 +86,7 @@
     """
     if default is not None:
         # throw more UX-friendly error if default not in plugins
-        filtered = plugins.filter(lambda p_ep: p_ep.name == default)
+        filtered = plugins.filter(lambda p_ep: p_ep.check_name(default))
     else:
         if config.noninteractive_mode:
             # it's really bad to auto-select the single available plugin in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/certbot.egg-info/PKG-INFO 
new/certbot-1.7.0/certbot.egg-info/PKG-INFO
--- old/certbot-1.6.0/certbot.egg-info/PKG-INFO 2020-07-07 19:13:25.000000000 
+0200
+++ new/certbot-1.7.0/certbot.egg-info/PKG-INFO 2020-08-04 20:20:16.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: certbot
-Version: 1.6.0
+Version: 1.7.0
 Summary: ACME client
 Home-page: https://github.com/letsencrypt/letsencrypt
 Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/certbot.egg-info/requires.txt 
new/certbot-1.7.0/certbot.egg-info/requires.txt
--- old/certbot-1.6.0/certbot.egg-info/requires.txt     2020-07-07 
19:13:25.000000000 +0200
+++ new/certbot-1.7.0/certbot.egg-info/requires.txt     2020-08-04 
20:20:16.000000000 +0200
@@ -19,7 +19,6 @@
 
 [dev]
 coverage
-ipdb
 pytest
 pytest-cov
 pytest-xdist
@@ -29,6 +28,7 @@
 
 [dev3]
 astroid
+ipdb
 mypy
 pylint
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/docs/cli-help.txt 
new/certbot-1.7.0/docs/cli-help.txt
--- old/certbot-1.6.0/docs/cli-help.txt 2020-07-07 19:13:20.000000000 +0200
+++ new/certbot-1.7.0/docs/cli-help.txt 2020-08-04 20:20:15.000000000 +0200
@@ -97,6 +97,11 @@
                         hook commands are not called. (default: False)
   --debug-challenges    After setting up challenges, wait for user input
                         before submitting to CA (default: False)
+  --preferred-chain PREFERRED_CHAIN
+                        If the CA offers multiple certificate chains, prefer
+                        the chain with an issuer matching this Subject Common
+                        Name. If no match, the default offered chain will be
+                        used. (default: None)
   --preferred-challenges PREF_CHALLS
                         A sorted, comma delimited list of the preferred
                         challenge to use during authorization with the most
@@ -113,7 +118,7 @@
                         case, and to know when to deprecate support for past
                         Python versions and flags. If you wish to hide this
                         information from the Let's Encrypt server, set this to
-                        "". (default: CertbotACMEClient/1.5.0 (certbot(-auto);
+                        "". (default: CertbotACMEClient/1.6.0 (certbot(-auto);
                         OS_NAME OS_VERSION) Authenticator/XXX Installer/YYY
                         (SUBCOMMAND; flags: FLAGS) Py/major.minor.patchlevel).
                         The flags encoded in the user agent are: --duplicate,
@@ -504,6 +509,8 @@
   --apache-ctl APACHE_CTL
                         Full path to Apache control script (default:
                         apache2ctl)
+  --apache-bin APACHE_BIN
+                        Full path to apache2/httpd binary (default: None)
 
 dns-cloudflare:
   Obtain certificates using a DNS TXT record (if you are using Cloudflare
@@ -671,8 +678,8 @@
   requested when performing an HTTP-01 challenge. An additional cleanup
   script can also be provided and can use the additional variable
   $CERTBOT_AUTH_OUTPUT which contains the stdout output from the auth
-  script.For both authenticator and cleanup script, on HTTP-01 and DNS-01
-  challenges,$CERTBOT_REMAINING_CHALLENGES will be equal to the number of
+  script. For both authenticator and cleanup script, on HTTP-01 and DNS-01
+  challenges, $CERTBOT_REMAINING_CHALLENGES will be equal to the number of
   challenges that remain after the current one, and $CERTBOT_ALL_DOMAINS
   contains a comma-separated list of all domains that are challenged for the
   current certificate.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/docs/contributing.rst 
new/certbot-1.7.0/docs/contributing.rst
--- old/certbot-1.6.0/docs/contributing.rst     2020-07-07 19:13:20.000000000 
+0200
+++ new/certbot-1.7.0/docs/contributing.rst     2020-08-04 20:20:15.000000000 
+0200
@@ -340,7 +340,10 @@
 pip. Users who run `certbot-auto` are currently unable to use third-party
 plugins. It's technically possible to install third-party plugins into
 the virtualenv used by `certbot-auto`, but they will be wiped away when
-`certbot-auto` upgrades.
+`certbot-auto` upgrades. If you'd like your plugin to be used alongside
+the Certbot snap, you will also have to publish your plugin as a snap.
+Certbot's DNS plugins and the README file in ``tools/snap/`` provide a
+starting reference for how to do this.
 
 .. _`setuptools entry points`:
     http://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/docs/install.rst 
new/certbot-1.7.0/docs/install.rst
--- old/certbot-1.6.0/docs/install.rst  2020-07-07 19:13:20.000000000 +0200
+++ new/certbot-1.7.0/docs/install.rst  2020-08-04 20:20:15.000000000 +0200
@@ -67,10 +67,10 @@
 ----
 
 Most modern Linux distributions (basically any that use systemd) can install
-Certbot packaged as a snap. Support for the Certbot snap is currently in its
-beta phase and limited to the x86_64 architecture, but it provides an easy way
-to ensure you have the latest version of Certbot with features like automated
-certificate renewal preconfigured.
+Certbot packaged as a snap. Snaps are available for x86_64, ARMv7 and ARMv8
+architectures. The Certbot snap provides an easy way to ensure you have the
+latest version of Certbot with features like automated certificate renewal
+preconfigured.
 
 You can find instructions for installing the Certbot snap at
 https://certbot.eff.org/instructions by selecting your server software and then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/docs/using.rst 
new/certbot-1.7.0/docs/using.rst
--- old/certbot-1.6.0/docs/using.rst    2020-07-07 19:13:20.000000000 +0200
+++ new/certbot-1.7.0/docs/using.rst    2020-08-04 20:20:15.000000000 +0200
@@ -180,9 +180,9 @@
 
 These plugins are not included in a default Certbot installation and must be
 installed separately. While the DNS plugins cannot currently be used with
-``certbot-auto``, they are available in many OS package managers and as Docker
-images. Visit https://certbot.eff.org to learn the best way to use the DNS
-plugins on your system.
+``certbot-auto``, they are available in many OS package managers, as Docker
+images, and as snaps. Visit https://certbot.eff.org to learn the best way to 
use
+the DNS plugins on your system.
 
 Once installed, you can find documentation on how to use each plugin at:
 
@@ -281,6 +281,7 @@
 dns-standalone_    Y    N    Obtain certificates via an integrated DNS server
 dns-ispconfig_     Y    N    DNS Authentication using ISPConfig as DNS server
 dns-clouddns_      Y    N    DNS Authentication using CloudDNS API
+dns-inwx           Y    Y    DNS Authentication for INWX through the XML API
 ================== ==== ==== 
===============================================================
 
 .. _haproxy: https://github.com/greenhost/certbot-haproxy
@@ -293,6 +294,7 @@
 .. _dns-standalone: https://github.com/siilike/certbot-dns-standalone
 .. _dns-ispconfig: https://github.com/m42e/certbot-dns-ispconfig
 .. _dns-clouddns: https://github.com/vshosting/certbot-dns-clouddns
+.. _dns-inwx: https://github.com/oGGy990/certbot-dns-inwx/
 
 If you're interested, you can also :ref:`write your own plugin <dev-plugin>`.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/setup.py new/certbot-1.7.0/setup.py
--- old/certbot-1.6.0/setup.py  2020-07-07 19:13:21.000000000 +0200
+++ new/certbot-1.7.0/setup.py  2020-08-04 20:20:15.000000000 +0200
@@ -83,7 +83,6 @@
 
 dev_extras = [
     'coverage',
-    'ipdb',
     'pytest',
     'pytest-cov',
     'pytest-xdist',
@@ -94,6 +93,7 @@
 
 dev3_extras = [
     'astroid',
+    'ipdb',
     'mypy',
     'pylint',
 ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/tests/plugins/disco_test.py 
new/certbot-1.7.0/tests/plugins/disco_test.py
--- old/certbot-1.6.0/tests/plugins/disco_test.py       2020-07-07 
19:13:20.000000000 +0200
+++ new/certbot-1.7.0/tests/plugins/disco_test.py       2020-08-04 
20:20:15.000000000 +0200
@@ -5,7 +5,7 @@
 
 try:
     import mock
-except ImportError: # pragma: no cover
+except ImportError:  # pragma: no cover
     from unittest import mock
 import pkg_resources
 import six
@@ -13,6 +13,7 @@
 
 from certbot import errors
 from certbot import interfaces
+from certbot._internal.plugins import null
 from certbot._internal.plugins import standalone
 from certbot._internal.plugins import webroot
 
@@ -44,7 +45,22 @@
         from certbot._internal.plugins.disco import PluginEntryPoint
         self.plugin_ep = PluginEntryPoint(EP_SA)
 
-    def test_entry_point_to_plugin_name(self):
+    def test_entry_point_to_plugin_name_not_prefixed(self):
+        from certbot._internal.plugins.disco import PluginEntryPoint
+
+        names = {
+            self.ep1: "ep1",
+            self.ep1prim: "ep1",
+            self.ep2: "ep2",
+            self.ep3: "ep3",
+            EP_SA: "sa",
+        }
+
+        for entry_point, name in six.iteritems(names):
+            self.assertEqual(
+                name, PluginEntryPoint.entry_point_to_plugin_name(entry_point, 
with_prefix=False))
+
+    def test_entry_point_to_plugin_name_prefixed(self):
         from certbot._internal.plugins.disco import PluginEntryPoint
 
         names = {
@@ -52,12 +68,11 @@
             self.ep1prim: "p2:ep1",
             self.ep2: "p2:ep2",
             self.ep3: "p3:ep3",
-            EP_SA: "sa",
         }
 
         for entry_point, name in six.iteritems(names):
             self.assertEqual(
-                name, PluginEntryPoint.entry_point_to_plugin_name(entry_point))
+                name, PluginEntryPoint.entry_point_to_plugin_name(entry_point, 
with_prefix=True))
 
     def test_description(self):
         self.assertTrue("temporary webserver" in self.plugin_ep.description)
@@ -197,17 +212,28 @@
         self.plugin_ep.__hash__.side_effect = TypeError
         self.plugins = {self.plugin_ep.name: self.plugin_ep}
         self.reg = self._create_new_registry(self.plugins)
+        self.ep1 = pkg_resources.EntryPoint(
+            "ep1", "p1.ep1", dist=mock.MagicMock(key="p1"))
 
     def test_find_all(self):
         from certbot._internal.plugins.disco import PluginsRegistry
         with mock.patch("certbot._internal.plugins.disco.pkg_resources") as 
mock_pkg:
-            mock_pkg.iter_entry_points.side_effect = [iter([EP_SA]),
-                                                      iter([EP_WR])]
-            plugins = PluginsRegistry.find_all()
+            mock_pkg.iter_entry_points.side_effect = [
+                iter([EP_SA]), iter([EP_WR, self.ep1])
+            ]
+            with mock.patch.object(pkg_resources.EntryPoint, 'load') as 
mock_load:
+                mock_load.side_effect = [
+                    standalone.Authenticator, webroot.Authenticator,
+                    null.Installer, null.Installer]
+                plugins = PluginsRegistry.find_all()
         self.assertTrue(plugins["sa"].plugin_cls is standalone.Authenticator)
         self.assertTrue(plugins["sa"].entry_point is EP_SA)
         self.assertTrue(plugins["wr"].plugin_cls is webroot.Authenticator)
         self.assertTrue(plugins["wr"].entry_point is EP_WR)
+        self.assertTrue(plugins["ep1"].plugin_cls is null.Installer)
+        self.assertTrue(plugins["ep1"].entry_point is self.ep1)
+        self.assertTrue(plugins["p1:ep1"].plugin_cls is null.Installer)
+        self.assertTrue(plugins["p1:ep1"].entry_point is self.ep1)
 
     def test_getitem(self):
         self.assertEqual(self.plugin_ep, self.reg["mock"])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-1.6.0/tests/plugins/selection_test.py 
new/certbot-1.7.0/tests/plugins/selection_test.py
--- old/certbot-1.6.0/tests/plugins/selection_test.py   2020-07-07 
19:13:20.000000000 +0200
+++ new/certbot-1.7.0/tests/plugins/selection_test.py   2020-08-04 
20:20:15.000000000 +0200
@@ -174,6 +174,7 @@
 
         self.assertTrue("default" in mock_util().menu.call_args[1])
 
+
 class GetUnpreparedInstallerTest(test_util.ConfigTestCase):
     """Tests for 
certbot._internal.plugins.selection.get_unprepared_installer."""
 
@@ -181,10 +182,10 @@
         super(GetUnpreparedInstallerTest, self).setUp()
         self.mock_apache_fail_ep = mock.Mock(
             description_with_name="afail")
-        self.mock_apache_fail_ep.name = "afail"
+        self.mock_apache_fail_ep.check_name = lambda name: name == "afail"
         self.mock_apache_ep = mock.Mock(
             description_with_name="apache")
-        self.mock_apache_ep.name = "apache"
+        self.mock_apache_ep.check_name = lambda name: name == "apache"
         self.mock_apache_plugin = mock.MagicMock()
         self.mock_apache_ep.init.return_value = self.mock_apache_plugin
         self.plugins = PluginsRegistry({
@@ -213,7 +214,7 @@
     def test_multiple_installers_returned(self):
         self.config.configurator = "apache"
         # Two plugins with the same name
-        self.mock_apache_fail_ep.name = "apache"
+        self.mock_apache_fail_ep.check_name = lambda name: name == "apache"
         self.assertRaises(errors.PluginSelectionError, self._call)
 
 


Reply via email to