Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-certbot-apache for
openSUSE:Factory checked in at 2021-04-15 16:57:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-certbot-apache (Old)
and /work/SRC/openSUSE:Factory/.python-certbot-apache.new.12324 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-certbot-apache"
Thu Apr 15 16:57:42 2021 rev:26 rq:885407 version:1.14.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-certbot-apache/python-certbot-apache.changes
2021-03-10 08:58:14.954950540 +0100
+++
/work/SRC/openSUSE:Factory/.python-certbot-apache.new.12324/python-certbot-apache.changes
2021-04-15 16:58:24.394768218 +0200
@@ -1,0 +2,6 @@
+Wed Apr 14 15:16:05 UTC 2021 - Mark??ta Machov?? <[email protected]>
+
+- update to version 1.14.0
+ * sync with the main certbot package
+
+-------------------------------------------------------------------
Old:
----
certbot-apache-1.13.0.tar.gz
New:
----
certbot-apache-1.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-certbot-apache.spec ++++++
--- /var/tmp/diff_new_pack.vdcRUK/_old 2021-04-15 16:58:24.834768914 +0200
+++ /var/tmp/diff_new_pack.vdcRUK/_new 2021-04-15 16:58:24.838768921 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-certbot-apache
-Version: 1.13.0
+Version: 1.14.0
Release: 0
Summary: Apache plugin for Certbot
License: Apache-2.0
++++++ certbot-apache-1.13.0.tar.gz -> certbot-apache-1.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.13.0/PKG-INFO
new/certbot-apache-1.14.0/PKG-INFO
--- old/certbot-apache-1.13.0/PKG-INFO 2021-03-02 22:37:20.276273500 +0100
+++ new/certbot-apache-1.14.0/PKG-INFO 2021-04-06 19:17:11.454677300 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: certbot-apache
-Version: 1.13.0
+Version: 1.14.0
Summary: Apache plugin for Certbot
Home-page: https://github.com/letsencrypt/letsencrypt
Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/apache_util.py
new/certbot-apache-1.14.0/certbot_apache/_internal/apache_util.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/apache_util.py
2021-03-02 22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/apache_util.py
2021-04-06 19:17:00.000000000 +0200
@@ -9,7 +9,6 @@
from certbot import errors
from certbot import util
-
from certbot.compat import os
logger = logging.getLogger(__name__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/apacheparser.py
new/certbot-apache-1.14.0/certbot_apache/_internal/apacheparser.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/apacheparser.py
2021-03-02 22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/apacheparser.py
2021-04-06 19:17:00.000000000 +0200
@@ -1,4 +1,5 @@
""" apacheconfig implementation of the ParserNode interfaces """
+from typing import Tuple
from certbot_apache._internal import assertions
from certbot_apache._internal import interfaces
@@ -21,7 +22,7 @@
self.metadata = metadata
self._raw = self.metadata["ac_ast"]
- def save(self, msg): # pragma: no cover
+ def save(self, msg): # pragma: no cover
pass
def find_ancestors(self, name): # pylint: disable=unused-variable
@@ -83,7 +84,7 @@
def __init__(self, **kwargs):
super(ApacheBlockNode, self).__init__(**kwargs)
- self.children = ()
+ self.children: Tuple[ApacheParserNode, ...] = ()
def __eq__(self, other): # pragma: no cover
if isinstance(other, self.__class__):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/assertions.py
new/certbot-apache-1.14.0/certbot_apache/_internal/assertions.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/assertions.py
2021-03-02 22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/assertions.py
2021-04-06 19:17:00.000000000 +0200
@@ -3,7 +3,6 @@
from certbot_apache._internal import interfaces
-
PASS = "CERTBOT_PASS_ASSERT"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/augeasparser.py
new/certbot-apache-1.14.0/certbot_apache/_internal/augeasparser.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/augeasparser.py
2021-03-02 22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/augeasparser.py
2021-04-06 19:17:00.000000000 +0200
@@ -64,10 +64,10 @@
"/files/etc/apache2/apache2.conf/bLoCk[1]",
]
"""
-from acme.magic_typing import Set
+from typing import Set
+
from certbot import errors
from certbot.compat import os
-
from certbot_apache._internal import apache_util
from certbot_apache._internal import assertions
from certbot_apache._internal import interfaces
@@ -355,7 +355,7 @@
ownpath = self.metadata.get("augeaspath")
directives = self.parser.find_dir(name, start=ownpath, exclude=exclude)
- already_parsed = set() # type: Set[str]
+ already_parsed: Set[str] = set()
for directive in directives:
# Remove the /arg part from the Augeas path
directive = directive.partition("/arg")[0]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/configurator.py
new/certbot-apache-1.14.0/certbot_apache/_internal/configurator.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/configurator.py
2021-03-02 22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/configurator.py
2021-04-06 19:17:00.000000000 +0200
@@ -1,28 +1,25 @@
"""Apache Configurator."""
# pylint: disable=too-many-lines
from collections import defaultdict
-from distutils.version import LooseVersion
import copy
+from distutils.version import LooseVersion
import fnmatch
import logging
import re
import socket
import time
+from typing import cast
+from typing import DefaultDict
+from typing import Dict
+from typing import List
+from typing import Optional
+from typing import Set
+from typing import Union
import zope.component
import zope.interface
-try:
- import apacheconfig
- HAS_APACHECONFIG = True
-except ImportError: # pragma: no cover
- HAS_APACHECONFIG = False
from acme import challenges
-from acme.magic_typing import DefaultDict
-from acme.magic_typing import Dict
-from acme.magic_typing import List
-from acme.magic_typing import Set
-from acme.magic_typing import Union
from certbot import errors
from certbot import interfaces
from certbot import util
@@ -40,6 +37,16 @@
from certbot_apache._internal import http_01
from certbot_apache._internal import obj
from certbot_apache._internal import parser
+from certbot_apache._internal.dualparser import DualBlockNode
+from certbot_apache._internal.obj import VirtualHost
+from certbot_apache._internal.parser import ApacheParser
+
+try:
+ import apacheconfig
+ HAS_APACHECONFIG = True
+except ImportError: # pragma: no cover
+ HAS_APACHECONFIG = False
+
logger = logging.getLogger(__name__)
@@ -154,9 +161,9 @@
self.options[o] = self.OS_DEFAULTS[o]
# Special cases
- self.options["version_cmd"][0] = self.option("ctl")
- self.options["restart_cmd"][0] = self.option("ctl")
- self.options["conftest_cmd"][0] = self.option("ctl")
+ cast(List[str], self.options["version_cmd"])[0] = self.option("ctl")
+ cast(List[str], self.options["restart_cmd"])[0] = self.option("ctl")
+ cast(List[str], self.options["conftest_cmd"])[0] = self.option("ctl")
@classmethod
def add_parser_arguments(cls, add):
@@ -210,30 +217,30 @@
super(ApacheConfigurator, self).__init__(*args, **kwargs)
# Add name_server association dict
- self.assoc = {} # type: Dict[str, obj.VirtualHost]
+ self.assoc: Dict[str, obj.VirtualHost] = {}
# Outstanding challenges
- self._chall_out = set() # type:
Set[KeyAuthorizationAnnotatedChallenge]
+ self._chall_out: Set[KeyAuthorizationAnnotatedChallenge] = set()
# List of vhosts configured per wildcard domain on this run.
# used by deploy_cert() and enhance()
- self._wildcard_vhosts = {} # type: Dict[str, List[obj.VirtualHost]]
+ self._wildcard_vhosts: Dict[str, List[obj.VirtualHost]] = {}
# Maps enhancements to vhosts we've enabled the enhancement for
- self._enhanced_vhosts = defaultdict(set) # type: DefaultDict[str,
Set[obj.VirtualHost]]
+ self._enhanced_vhosts: DefaultDict[str, Set[obj.VirtualHost]] =
defaultdict(set)
# Temporary state for AutoHSTS enhancement
- self._autohsts = {} # type: Dict[str, Dict[str, Union[int, float]]]
+ self._autohsts: Dict[str, Dict[str, Union[int, float]]] = {}
# Reverter save notes
self.save_notes = ""
# Should we use ParserNode implementation instead of the old behavior
self.USE_PARSERNODE = use_parsernode
# Saves the list of file paths that were parsed initially, and
# not added to parser tree by self.conf("vhost-root") for example.
- self.parsed_paths = [] # type: List[str]
+ self.parsed_paths: List[str] = []
# These will be set in the prepare function
self._prepared = False
- self.parser = None
- self.parser_root = None
+ self.parser: ApacheParser
+ self.parser_root: Optional[DualBlockNode] = None
self.version = version
self._openssl_version = openssl_version
- self.vhosts = None
+ self.vhosts: List[VirtualHost]
self.options = copy.deepcopy(self.OS_DEFAULTS)
self._enhance_func = {"redirect": self._enable_redirect,
"ensure-http-header": self._set_http_header,
@@ -342,8 +349,9 @@
"augeaspath": self.parser.get_root_augpath(),
"ac_ast": None}
if self.USE_PARSERNODE:
- self.parser_root = self.get_parsernode_root(pn_meta)
- self.parsed_paths = self.parser_root.parsed_paths()
+ parser_root = self.get_parsernode_root(pn_meta)
+ self.parser_root = parser_root
+ self.parsed_paths = parser_root.parsed_paths()
# Check for errors in parsing files with Augeas
self.parser.check_parsing_errors("httpd.aug")
@@ -405,7 +413,7 @@
super(ApacheConfigurator, self).recovery_routine()
# Reload configuration after these changes take effect if needed
# ie. ApacheParser has been initialized.
- if self.parser:
+ if hasattr(self, "parser"):
# TODO: wrap into non-implementation specific parser interface
self.parser.aug.load()
@@ -832,7 +840,7 @@
:rtype: set
"""
- all_names = set() # type: Set[str]
+ all_names: Set[str] = set()
vhost_macro = []
@@ -996,8 +1004,8 @@
"""
# Search base config, and all included paths for VirtualHosts
- file_paths = {} # type: Dict[str, str]
- internal_paths = defaultdict(set) # type: DefaultDict[str, Set[str]]
+ file_paths: Dict[str, str] = {}
+ internal_paths: DefaultDict[str, Set[str]] = defaultdict(set)
vhs = []
# Make a list of parser paths because the parser_paths
# dictionary may be modified during the loop.
@@ -1048,6 +1056,9 @@
:rtype: list
"""
+ if not self.parser_root:
+ raise errors.Error("This ApacheConfigurator instance is not" #
pragma: no cover
+ " configured to use a node parser.")
vhs = []
vhosts = self.parser_root.find_blocks("VirtualHost", exclude=False)
for vhblock in vhosts:
@@ -2156,7 +2167,7 @@
# There can be other RewriteRule directive lines in vhost config.
# rewrite_args_dict keys are directive ids and the corresponding value
# for each is a list of arguments to that directive.
- rewrite_args_dict = defaultdict(list) # type: DefaultDict[str,
List[str]]
+ rewrite_args_dict: DefaultDict[str, List[str]] = defaultdict(list)
pat = r'(.*directive\[\d+\]).*'
for match in rewrite_path:
m = re.match(pat, match)
@@ -2250,7 +2261,7 @@
if ssl_vhost.aliases:
serveralias = "ServerAlias " + " ".join(ssl_vhost.aliases)
- rewrite_rule_args = [] # type: List[str]
+ rewrite_rule_args: List[str] = []
if self.get_version() >= (2, 3, 9):
rewrite_rule_args = constants.REWRITE_HTTPS_ARGS_WITH_END
else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/dualparser.py
new/certbot-apache-1.14.0/certbot_apache/_internal/dualparser.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/dualparser.py
2021-03-02 22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/dualparser.py
2021-04-06 19:17:00.000000000 +0200
@@ -1,7 +1,7 @@
""" Dual ParserNode implementation """
+from certbot_apache._internal import apacheparser
from certbot_apache._internal import assertions
from certbot_apache._internal import augeasparser
-from certbot_apache._internal import apacheparser
class DualNodeBase:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/http_01.py
new/certbot-apache-1.14.0/certbot_apache/_internal/http_01.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/http_01.py
2021-03-02 22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/http_01.py
2021-04-06 19:17:00.000000000 +0200
@@ -1,9 +1,9 @@
"""A class that performs HTTP-01 challenges for Apache"""
-import logging
import errno
+import logging
+from typing import List
+from typing import Set
-from acme.magic_typing import List
-from acme.magic_typing import Set
from certbot import errors
from certbot.compat import filesystem
from certbot.compat import os
@@ -57,7 +57,7 @@
self.challenge_dir = os.path.join(
self.configurator.config.work_dir,
"http_challenges")
- self.moded_vhosts = set() # type: Set[VirtualHost]
+ self.moded_vhosts: Set[VirtualHost] = set()
def perform(self):
"""Perform all HTTP-01 challenges."""
@@ -93,7 +93,7 @@
self.configurator.enable_mod(mod, temp=True)
def _mod_config(self):
- selected_vhosts = [] # type: List[VirtualHost]
+ selected_vhosts: List[VirtualHost] = []
http_port = str(self.configurator.config.http01_port)
for chall in self.achalls:
# Search for matching VirtualHosts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/interfaces.py
new/certbot-apache-1.14.0/certbot_apache/_internal/interfaces.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/interfaces.py
2021-03-02 22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/interfaces.py
2021-04-06 19:17:00.000000000 +0200
@@ -102,7 +102,6 @@
import abc
-
class ParserNode(object, metaclass=abc.ABCMeta):
"""
ParserNode is the basic building block of the tree of such nodes,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/obj.py
new/certbot-apache-1.14.0/certbot_apache/_internal/obj.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/obj.py 2021-03-02
22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/obj.py 2021-04-06
19:17:00.000000000 +0200
@@ -1,7 +1,7 @@
"""Module contains classes used by the Apache Configurator."""
import re
+from typing import Set
-from acme.magic_typing import Set
from certbot.plugins import common
@@ -137,7 +137,7 @@
def get_names(self):
"""Return a set of all names."""
- all_names = set() # type: Set[str]
+ all_names: Set[str] = set()
all_names.update(self.aliases)
# Strip out any scheme:// and <port> field from servername
if self.name is not None:
@@ -245,7 +245,7 @@
# already_found acts to keep everything very conservative.
# Don't allow multiple ip:ports in same set.
- already_found = set() # type: Set[str]
+ already_found: Set[str] = set()
for addr in vhost.addrs:
for local_addr in self.addrs:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/override_centos.py
new/certbot-apache-1.14.0/certbot_apache/_internal/override_centos.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/override_centos.py
2021-03-02 22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/override_centos.py
2021-04-06 19:17:00.000000000 +0200
@@ -1,9 +1,10 @@
""" Distribution specific override class for CentOS family (RHEL, Fedora) """
import logging
+from typing import cast
+from typing import List
import zope.interface
-from acme.magic_typing import List
from certbot import errors
from certbot import interfaces
from certbot import util
@@ -76,7 +77,7 @@
alternative restart cmd used in CentOS.
"""
super(CentOSConfigurator, self)._prepare_options()
- self.options["restart_cmd_alt"][0] = self.option("ctl")
+ cast(List[str], self.options["restart_cmd_alt"])[0] =
self.option("ctl")
def get_parser(self):
"""Initializes the ApacheParser"""
@@ -102,9 +103,9 @@
loadmods = self.parser.find_dir("LoadModule", "ssl_module",
exclude=False)
- correct_ifmods = [] # type: List[str]
- loadmod_args = [] # type: List[str]
- loadmod_paths = [] # type: List[str]
+ correct_ifmods: List[str] = []
+ loadmod_args: List[str] = []
+ loadmod_paths: List[str] = []
for m in loadmods:
noarg_path = m.rpartition("/")[0]
path_args = self.parser.get_all_args(noarg_path)
@@ -118,8 +119,9 @@
else:
loadmod_args = path_args
- if self.parser.not_modssl_ifmodule(noarg_path): # pylint:
disable=no-member
- if self.parser.loc["default"] in noarg_path:
+ centos_parser: CentOSParser = cast(CentOSParser, self.parser)
+ if centos_parser.not_modssl_ifmodule(noarg_path):
+ if centos_parser.loc["default"] in noarg_path:
# LoadModule already in the main configuration file
if ("ifmodule/" in noarg_path.lower() or
"ifmodule[1]" in noarg_path.lower()):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/override_fedora.py
new/certbot-apache-1.14.0/certbot_apache/_internal/override_fedora.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/override_fedora.py
2021-03-02 22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/override_fedora.py
2021-04-06 19:17:00.000000000 +0200
@@ -1,4 +1,7 @@
""" Distribution specific override class for Fedora 29+ """
+from typing import cast
+from typing import List
+
import zope.interface
from certbot import errors
@@ -69,9 +72,9 @@
of Fedora to restart httpd.
"""
super(FedoraConfigurator, self)._prepare_options()
- self.options["restart_cmd"][0] = 'apachectl'
- self.options["restart_cmd_alt"][0] = 'apachectl'
- self.options["conftest_cmd"][0] = 'apachectl'
+ cast(List[str], self.options["restart_cmd"])[0] = 'apachectl'
+ cast(List[str], self.options["restart_cmd_alt"])[0] = 'apachectl'
+ cast(List[str], self.options["conftest_cmd"])[0] = 'apachectl'
class FedoraParser(parser.ApacheParser):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/override_gentoo.py
new/certbot-apache-1.14.0/certbot_apache/_internal/override_gentoo.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/override_gentoo.py
2021-03-02 22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/override_gentoo.py
2021-04-06 19:17:00.000000000 +0200
@@ -1,4 +1,7 @@
""" Distribution specific override class for Gentoo Linux """
+from typing import cast
+from typing import List
+
import zope.interface
from certbot import interfaces
@@ -36,7 +39,7 @@
alternative restart cmd used in Gentoo.
"""
super(GentooConfigurator, self)._prepare_options()
- self.options["restart_cmd_alt"][0] = self.option("ctl")
+ cast(List[str], self.options["restart_cmd_alt"])[0] =
self.option("ctl")
def get_parser(self):
"""Initializes the ApacheParser"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache/_internal/parser.py
new/certbot-apache-1.14.0/certbot_apache/_internal/parser.py
--- old/certbot-apache-1.13.0/certbot_apache/_internal/parser.py
2021-03-02 22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache/_internal/parser.py
2021-04-06 19:17:00.000000000 +0200
@@ -3,16 +3,20 @@
import fnmatch
import logging
import re
-import sys
+from typing import Dict
+from typing import List
+from typing import Optional
-
-from acme.magic_typing import Dict
-from acme.magic_typing import List
from certbot import errors
from certbot.compat import os
from certbot_apache._internal import apache_util
from certbot_apache._internal import constants
+try:
+ from augeas import Augeas
+except ImportError: # pragma: no cover
+ Augeas = None # type: ignore
+
logger = logging.getLogger(__name__)
@@ -41,8 +45,7 @@
self.configurator = configurator
# Initialize augeas
- self.aug = None
- self.init_augeas()
+ self.aug = init_augeas()
if not self.check_aug_version():
raise errors.NotSupportedError(
@@ -50,9 +53,9 @@
"version 1.2.0 or higher, please make sure you have you have "
"those installed.")
- self.modules = {} # type: Dict[str, str]
- self.parser_paths = {} # type: Dict[str, List[str]]
- self.variables = {} # type: Dict[str, str]
+ self.modules: Dict[str, Optional[str]] = {}
+ self.parser_paths: Dict[str, List[str]] = {}
+ self.variables: Dict[str, str] = {}
# Find configuration root and make sure augeas can parse it.
self.root = os.path.abspath(root)
@@ -85,23 +88,6 @@
if self.find_dir("Define", exclude=False):
raise errors.PluginError("Error parsing runtime variables")
- def init_augeas(self):
- """ Initialize the actual Augeas instance """
-
- try:
- import augeas
- except ImportError: # pragma: no cover
- raise errors.NoInstallationError("Problem in Augeas installation")
-
- self.aug = augeas.Augeas(
- # specify a directory to load our preferred lens from
- loadpath=constants.AUGEAS_LENS_DIR,
- # Do not save backup (we do it ourselves), do not load
- # anything by default
- flags=(augeas.Augeas.NONE |
- augeas.Augeas.NO_MODL_AUTOLOAD |
- augeas.Augeas.ENABLE_SPAN))
-
def check_parsing_errors(self, lens):
"""Verify Augeas can parse all of the lens files.
@@ -265,7 +251,7 @@
the iteration issue. Else... parse and enable mods at same time.
"""
- mods = {} # type: Dict[str, str]
+ mods: Dict[str, str] = {}
matches = self.find_dir("LoadModule")
iterator = iter(matches)
# Make sure prev_size != cur_size for do: while: iteration
@@ -552,7 +538,7 @@
else:
arg_suffix = "/*[self::arg=~regexp('%s')]" % case_i(arg)
- ordered_matches = [] # type: List[str]
+ ordered_matches: List[str] = []
# TODO: Wildcards should be included in alphabetical order
# https://httpd.apache.org/docs/2.4/mod/core.html#include
@@ -737,9 +723,6 @@
:rtype: str
"""
- if sys.version_info < (3, 6):
- # This strips off final /Z(?ms)
- return fnmatch.translate(clean_fn_match)[:-7] # pragma: no cover
# Since Python 3.6, it returns a different pattern like (?s:.*\.load)\Z
return fnmatch.translate(clean_fn_match)[4:-3] # pragma: no cover
@@ -954,3 +937,19 @@
"""
return "/files%s" % file_path
+
+
+def init_augeas() -> Augeas:
+ """ Initialize the actual Augeas instance """
+
+ if not Augeas: # pragma: no cover
+ raise errors.NoInstallationError("Problem in Augeas installation")
+
+ return Augeas(
+ # specify a directory to load our preferred lens from
+ loadpath=constants.AUGEAS_LENS_DIR,
+ # Do not save backup (we do it ourselves), do not load
+ # anything by default
+ flags=(Augeas.NONE |
+ Augeas.NO_MODL_AUTOLOAD |
+ Augeas.ENABLE_SPAN))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.13.0/certbot_apache.egg-info/PKG-INFO
new/certbot-apache-1.14.0/certbot_apache.egg-info/PKG-INFO
--- old/certbot-apache-1.13.0/certbot_apache.egg-info/PKG-INFO 2021-03-02
22:37:20.000000000 +0100
+++ new/certbot-apache-1.14.0/certbot_apache.egg-info/PKG-INFO 2021-04-06
19:17:11.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: certbot-apache
-Version: 1.13.0
+Version: 1.14.0
Summary: Apache plugin for Certbot
Home-page: https://github.com/letsencrypt/letsencrypt
Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.13.0/setup.py
new/certbot-apache-1.14.0/setup.py
--- old/certbot-apache-1.13.0/setup.py 2021-03-02 22:37:05.000000000 +0100
+++ new/certbot-apache-1.14.0/setup.py 2021-04-06 19:17:02.000000000 +0200
@@ -1,7 +1,7 @@
from setuptools import find_packages
from setuptools import setup
-version = '1.13.0'
+version = '1.14.0'
# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.13.0/tests/augeasnode_test.py
new/certbot-apache-1.14.0/tests/augeasnode_test.py
--- old/certbot-apache-1.13.0/tests/augeasnode_test.py 2021-03-02
22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/tests/augeasnode_test.py 2021-04-06
19:17:00.000000000 +0200
@@ -1,4 +1,6 @@
"""Tests for AugeasParserNode classes"""
+from typing import List
+
try:
import mock
except ImportError: # pragma: no cover
@@ -107,7 +109,7 @@
def test_set_parameters(self):
servernames = self.config.parser_root.find_directives("servername")
- names = [] # type: List[str]
+ names: List[str] = []
for servername in servernames:
names += servername.parameters
self.assertFalse("going_to_set_this" in names)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.13.0/tests/http_01_test.py
new/certbot-apache-1.14.0/tests/http_01_test.py
--- old/certbot-apache-1.13.0/tests/http_01_test.py 2021-03-02
22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/tests/http_01_test.py 2021-04-06
19:17:00.000000000 +0200
@@ -1,6 +1,7 @@
"""Test for certbot_apache._internal.http_01."""
import unittest
import errno
+from typing import List
try:
import mock
@@ -26,7 +27,7 @@
super(ApacheHttp01Test, self).setUp(*args, **kwargs)
self.account_key = self.rsa512jwk
- self.achalls = [] # type:
List[achallenges.KeyAuthorizationAnnotatedChallenge]
+ self.achalls: List[achallenges.KeyAuthorizationAnnotatedChallenge] = []
vh_truth = util.get_vh_truth(
self.temp_dir, "debian_apache_2_4/multiple_vhosts")
# Takes the vhosts for encryption-example.demo, certbot.demo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.13.0/tests/parser_test.py
new/certbot-apache-1.14.0/tests/parser_test.py
--- old/certbot-apache-1.13.0/tests/parser_test.py 2021-03-02
22:37:04.000000000 +0100
+++ new/certbot-apache-1.14.0/tests/parser_test.py 2021-04-06
19:17:00.000000000 +0200
@@ -339,7 +339,7 @@
shutil.rmtree(self.config_dir)
shutil.rmtree(self.work_dir)
- @mock.patch("certbot_apache._internal.parser.ApacheParser.init_augeas")
+ @mock.patch("certbot_apache._internal.parser.init_augeas")
def test_prepare_no_augeas(self, mock_init_augeas):
from certbot_apache._internal.parser import ApacheParser
mock_init_augeas.side_effect = errors.NoInstallationError