Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-acme for openSUSE:Factory 
checked in at 2021-04-15 16:57:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-acme (Old)
 and      /work/SRC/openSUSE:Factory/.python-acme.new.12324 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-acme"

Thu Apr 15 16:57:40 2021 rev:50 rq:885405 version:1.14.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-acme/python-acme.changes  2021-03-08 
15:21:01.398104154 +0100
+++ /work/SRC/openSUSE:Factory/.python-acme.new.12324/python-acme.changes       
2021-04-15 16:58:22.898765851 +0200
@@ -1,0 +2,7 @@
+Wed Apr 14 15:09:01 UTC 2021 - Mark??ta Machov?? <mmach...@suse.com>
+
+- update to version 1.14.0
+  * The module acme.magic_typing is deprecated and will be removed in 
+    a future release. Please use the built-in module typing instead.
+
+-------------------------------------------------------------------

Old:
----
  acme-1.13.0.tar.gz
  acme-1.13.0.tar.gz.asc

New:
----
  acme-1.14.0.tar.gz
  acme-1.14.0.tar.gz.asc

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

Other differences:
------------------
++++++ python-acme.spec ++++++
--- /var/tmp/diff_new_pack.Az8ayt/_old  2021-04-15 16:58:23.354766573 +0200
+++ /var/tmp/diff_new_pack.Az8ayt/_new  2021-04-15 16:58:23.358766579 +0200
@@ -20,7 +20,7 @@
 %define skip_python2 1
 %define libname acme
 Name:           python-%{libname}
-Version:        1.13.0
+Version:        1.14.0
 Release:        0
 Summary:        Python library for the ACME protocol
 License:        Apache-2.0

++++++ acme-1.13.0.tar.gz -> acme-1.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/PKG-INFO new/acme-1.14.0/PKG-INFO
--- old/acme-1.13.0/PKG-INFO    2021-03-02 22:37:11.656468600 +0100
+++ new/acme-1.14.0/PKG-INFO    2021-04-06 19:17:08.820735500 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: acme
-Version: 1.13.0
+Version: 1.14.0
 Summary: ACME protocol implementation in Python
 Home-page: https://github.com/letsencrypt/letsencrypt
 Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/acme/challenges.py 
new/acme-1.14.0/acme/challenges.py
--- old/acme-1.13.0/acme/challenges.py  2021-03-02 22:37:04.000000000 +0100
+++ new/acme-1.14.0/acme/challenges.py  2021-04-06 19:17:00.000000000 +0200
@@ -5,17 +5,19 @@
 import hashlib
 import logging
 import socket
+from typing import Type
 
 from cryptography.hazmat.primitives import hashes  # type: ignore
 import josepy as jose
-import requests
-from OpenSSL import SSL  # type: ignore # 
https://github.com/python/typeshed/issues/2052
 from OpenSSL import crypto
+from OpenSSL import SSL  # type: ignore # 
https://github.com/python/typeshed/issues/2052
+import requests
 
 from acme import crypto_util
 from acme import errors
 from acme import fields
-from acme.mixins import ResourceMixin, TypeMixin
+from acme.mixins import ResourceMixin
+from acme.mixins import TypeMixin
 
 logger = logging.getLogger(__name__)
 
@@ -23,7 +25,7 @@
 class Challenge(jose.TypedJSONObjectWithFields):
     # _fields_to_partial_json
     """ACME challenge."""
-    TYPES = {}  # type: dict
+    TYPES: dict = {}
 
     @classmethod
     def from_json(cls, jobj):
@@ -37,7 +39,7 @@
 class ChallengeResponse(ResourceMixin, TypeMixin, 
jose.TypedJSONObjectWithFields):
     # _fields_to_partial_json
     """ACME challenge response."""
-    TYPES = {}  # type: dict
+    TYPES: dict = {}
     resource_type = 'challenge'
     resource = fields.Resource(resource_type)
 
@@ -151,8 +153,8 @@
         that will be used to generate ``response``.
     :param str typ: type of the challenge
     """
-    typ = NotImplemented
-    response_cls = NotImplemented
+    typ: str = NotImplemented
+    response_cls: Type[KeyAuthorizationChallengeResponse] = NotImplemented
     thumbprint_hash_function = (
         KeyAuthorizationChallengeResponse.thumbprint_hash_function)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/acme/client.py 
new/acme-1.14.0/acme/client.py
--- old/acme-1.13.0/acme/client.py      2021-03-02 22:37:04.000000000 +0100
+++ new/acme-1.14.0/acme/client.py      2021-04-06 19:17:00.000000000 +0200
@@ -8,6 +8,12 @@
 import logging
 import re
 import time
+from typing import cast
+from typing import Dict
+from typing import List
+from typing import Set
+from typing import Text
+from typing import Union
 
 import josepy as jose
 import OpenSSL
@@ -20,10 +26,6 @@
 from acme import errors
 from acme import jws
 from acme import messages
-from acme.magic_typing import Dict
-from acme.magic_typing import List
-from acme.magic_typing import Set
-from acme.magic_typing import Text
 from acme.mixins import VersionedLEACMEMixin
 
 logger = logging.getLogger(__name__)
@@ -112,8 +114,9 @@
         """
         return self.update_registration(regr, update={'status': 'deactivated'})
 
-    def deactivate_authorization(self, authzr):
-        # type: (messages.AuthorizationResource) -> 
messages.AuthorizationResource
+    def deactivate_authorization(self,
+                                 authzr: messages.AuthorizationResource
+                                 ) -> messages.AuthorizationResource:
         """Deactivate authorization.
 
         :param messages.AuthorizationResource authzr: The Authorization 
resource
@@ -423,7 +426,7 @@
 
         """
         assert max_attempts > 0
-        attempts = collections.defaultdict(int) # type: 
Dict[messages.AuthorizationResource, int]
+        attempts: Dict[messages.AuthorizationResource, int] = 
collections.defaultdict(int)
         exhausted = set()
 
         # priority queue with datetime.datetime (based on Retry-After) as key,
@@ -536,7 +539,7 @@
         :rtype: `list` of `OpenSSL.crypto.X509` wrapped in `.ComparableX509`
 
         """
-        chain = [] # type: List[jose.ComparableX509]
+        chain: List[jose.ComparableX509] = []
         uri = certr.cert_chain_uri
         while uri is not None and len(chain) < max_length:
             response, cert = self._get_cert(uri)
@@ -817,6 +820,7 @@
     def __init__(self, net, key, server):
         directory = messages.Directory.from_json(net.get(server).json())
         self.acme_version = self._acme_version_from_directory(directory)
+        self.client: Union[Client, ClientV2]
         if self.acme_version == 1:
             self.client = Client(directory, key=key, net=net)
         else:
@@ -836,16 +840,18 @@
             if check_tos_cb is not None:
                 check_tos_cb(tos)
         if self.acme_version == 1:
-            regr = self.client.register(regr)
+            client_v1 = cast(Client, self.client)
+            regr = client_v1.register(regr)
             if regr.terms_of_service is not None:
                 _assess_tos(regr.terms_of_service)
-                return self.client.agree_to_tos(regr)
+                return client_v1.agree_to_tos(regr)
             return regr
         else:
-            if "terms_of_service" in self.client.directory.meta:
-                _assess_tos(self.client.directory.meta.terms_of_service)
+            client_v2 = cast(ClientV2, self.client)
+            if "terms_of_service" in client_v2.directory.meta:
+                _assess_tos(client_v2.directory.meta.terms_of_service)
                 regr = regr.update(terms_of_service_agreed=True)
-            return self.client.new_account(regr)
+            return client_v2.new_account(regr)
 
     def new_order(self, csr_pem):
         """Request a new Order object from the server.
@@ -863,14 +869,15 @@
 
         """
         if self.acme_version == 1:
+            client_v1 = cast(Client, self.client)
             csr = 
OpenSSL.crypto.load_certificate_request(OpenSSL.crypto.FILETYPE_PEM, csr_pem)
             # pylint: disable=protected-access
             dnsNames = crypto_util._pyopenssl_cert_or_req_all_names(csr)
             authorizations = []
             for domain in dnsNames:
-                
authorizations.append(self.client.request_domain_challenges(domain))
+                
authorizations.append(client_v1.request_domain_challenges(domain))
             return messages.OrderResource(authorizations=authorizations, 
csr_pem=csr_pem)
-        return self.client.new_order(csr_pem)
+        return cast(ClientV2, self.client).new_order(csr_pem)
 
     def finalize_order(self, orderr, deadline, fetch_alternative_chains=False):
         """Finalize an order and obtain a certificate.
@@ -885,8 +892,9 @@
 
         """
         if self.acme_version == 1:
+            client_v1 = cast(Client, self.client)
             csr_pem = orderr.csr_pem
-            certr = self.client.request_issuance(
+            certr = client_v1.request_issuance(
                 jose.ComparableX509(
                     
OpenSSL.crypto.load_certificate_request(OpenSSL.crypto.FILETYPE_PEM, csr_pem)),
                     orderr.authorizations)
@@ -894,7 +902,7 @@
             chain = None
             while datetime.datetime.now() < deadline:
                 try:
-                    chain = self.client.fetch_chain(certr)
+                    chain = client_v1.fetch_chain(certr)
                     break
                 except errors.Error:
                     time.sleep(1)
@@ -909,7 +917,8 @@
             chain = crypto_util.dump_pyopenssl_chain(chain).decode()
 
             return orderr.update(fullchain_pem=(cert + chain))
-        return self.client.finalize_order(orderr, deadline, 
fetch_alternative_chains)
+        return cast(ClientV2, self.client).finalize_order(
+            orderr, deadline, fetch_alternative_chains)
 
     def revoke(self, cert, rsn):
         """Revoke certificate.
@@ -935,7 +944,7 @@
         Always return False for ACMEv1 servers, as it doesn't use External 
Account Binding."""
         if self.acme_version == 1:
             return False
-        return self.client.external_account_required()
+        return cast(ClientV2, self.client).external_account_required()
 
 
 class ClientNetwork:
@@ -968,7 +977,7 @@
         self.account = account
         self.alg = alg
         self.verify_ssl = verify_ssl
-        self._nonces = set() # type: Set[Text]
+        self._nonces: Set[Text] = set()
         self.user_agent = user_agent
         self.session = requests.Session()
         self._default_timeout = timeout
@@ -1128,6 +1137,7 @@
 
         # If content is DER, log the base64 of it instead of raw bytes, to keep
         # binary data out of the logs.
+        debug_content: Union[bytes, str]
         if response.headers.get("Content-Type") == DER_CONTENT_TYPE:
             debug_content = base64.b64encode(response.content)
         else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/acme/crypto_util.py 
new/acme-1.14.0/acme/crypto_util.py
--- old/acme-1.13.0/acme/crypto_util.py 2021-03-02 22:37:04.000000000 +0100
+++ new/acme-1.14.0/acme/crypto_util.py 2021-04-06 19:17:00.000000000 +0200
@@ -5,15 +5,15 @@
 import os
 import re
 import socket
+from typing import Callable
+from typing import Tuple
+from typing import Union
 
 import josepy as jose
 from OpenSSL import crypto
 from OpenSSL import SSL  # type: ignore # 
https://github.com/python/typeshed/issues/2052
 
 from acme import errors
-from acme.magic_typing import Callable
-from acme.magic_typing import Tuple
-from acme.magic_typing import Union
 
 logger = logging.getLogger(__name__)
 
@@ -168,7 +168,7 @@
                 source_address[1]
             ) if any(source_address) else ""
         )
-        socket_tuple = (host, port)  # type: Tuple[str, int]
+        socket_tuple: Tuple[str, int] = (host, port)
         sock = socket.create_connection(socket_tuple, **socket_kwargs)  # 
type: ignore
     except socket.error as error:
         raise errors.Error(error)
@@ -256,7 +256,7 @@
 
     if isinstance(cert_or_req, crypto.X509):
         # pylint: disable=line-too-long
-        func = crypto.dump_certificate # type: Union[Callable[[int, 
crypto.X509Req], bytes], Callable[[int, crypto.X509], bytes]]
+        func: Union[Callable[[int, crypto.X509Req], bytes], Callable[[int, 
crypto.X509], bytes]] = crypto.dump_certificate
     else:
         func = crypto.dump_certificate_request
     text = func(crypto.FILETYPE_TEXT, cert_or_req).decode("utf-8")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/acme/errors.py 
new/acme-1.14.0/acme/errors.py
--- old/acme-1.13.0/acme/errors.py      2021-03-02 22:37:04.000000000 +0100
+++ new/acme-1.14.0/acme/errors.py      2021-04-06 19:17:00.000000000 +0200
@@ -28,13 +28,8 @@
 
 class BadNonce(NonceError):
     """Bad nonce error."""
-    def __init__(self, nonce, error, *args, **kwargs):
-        # MyPy complains here that there is too many arguments for 
BaseException constructor.
-        # This is an error fixed in typeshed, see 
https://github.com/python/mypy/issues/4183
-        # The fix is included in MyPy>=0.740, but upgrading it would bring 
dozen of errors due to
-        #   new types definitions. So we ignore the error until the code base 
is fixed to match
-        #   with MyPy>=0.740 referential.
-        super(BadNonce, self).__init__(*args, **kwargs)  # type: ignore
+    def __init__(self, nonce, error, *args):
+        super(BadNonce, self).__init__(*args)
         self.nonce = nonce
         self.error = error
 
@@ -52,9 +47,8 @@
     :ivar requests.Response ~.response: HTTP Response
 
     """
-    def __init__(self, response, *args, **kwargs):
-        # See comment in BadNonce constructor above for an explanation of 
type: ignore here.
-        super(MissingNonce, self).__init__(*args, **kwargs)  # type: ignore
+    def __init__(self, response, *args):
+        super(MissingNonce, self).__init__(*args)
         self.response = response
 
     def __str__(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/acme/jws.py new/acme-1.14.0/acme/jws.py
--- old/acme-1.13.0/acme/jws.py 2021-03-02 22:37:04.000000000 +0100
+++ new/acme-1.14.0/acme/jws.py 2021-04-06 19:17:00.000000000 +0200
@@ -14,7 +14,9 @@
     kid = jose.Field('kid', omitempty=True)
     url = jose.Field('url', omitempty=True)
 
-    @nonce.decoder
+    # Mypy does not understand the josepy magic happening here, and falsely 
claims
+    # that nonce is redefined. Let's ignore the type check here.
+    @nonce.decoder  # type: ignore
     def nonce(value):  # pylint: 
disable=no-self-argument,missing-function-docstring
         try:
             return jose.decode_b64jose(value)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/acme/magic_typing.py 
new/acme-1.14.0/acme/magic_typing.py
--- old/acme-1.13.0/acme/magic_typing.py        2021-03-02 22:37:04.000000000 
+0100
+++ new/acme-1.14.0/acme/magic_typing.py        2021-04-06 19:17:00.000000000 
+0200
@@ -4,9 +4,12 @@
 available. This code is being kept for now for backwards compatibility.
 
 """
+import warnings
 from typing import *  # pylint: disable=wildcard-import, unused-wildcard-import
 from typing import Collection, IO  # type: ignore
 
+warnings.warn("acme.magic_typing is deprecated and will be removed in a future 
release.",
+              DeprecationWarning)
 
 class TypingClass:
     """Ignore import errors by getting anything"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/acme/messages.py 
new/acme-1.14.0/acme/messages.py
--- old/acme-1.13.0/acme/messages.py    2021-03-02 22:37:04.000000000 +0100
+++ new/acme-1.14.0/acme/messages.py    2021-04-06 19:17:00.000000000 +0200
@@ -1,6 +1,9 @@
 """ACME protocol messages."""
-import json
 from collections.abc import Hashable
+import json
+from typing import Any
+from typing import Dict
+from typing import Type
 
 import josepy as jose
 
@@ -87,7 +90,9 @@
             raise ValueError("The supplied code: %s is not a known ACME error"
                              " code" % code)
         typ = ERROR_PREFIX + code
-        return cls(typ=typ, **kwargs)
+        # Mypy will not understand that the Error constructor accepts a named 
argument
+        # "typ" because of josepy magic. Let's ignore the type check here.
+        return cls(typ=typ, **kwargs)  # type: ignore
 
     @property
     def description(self):
@@ -124,7 +129,7 @@
 class _Constant(jose.JSONDeSerializable, Hashable):  # type: ignore
     """ACME constant."""
     __slots__ = ('name',)
-    POSSIBLE_NAMES = NotImplemented
+    POSSIBLE_NAMES: Dict[str, '_Constant'] = NotImplemented
 
     def __init__(self, name):
         super(_Constant, self).__init__()
@@ -153,7 +158,7 @@
 
 class Status(_Constant):
     """ACME "status" field."""
-    POSSIBLE_NAMES = {}  # type: dict
+    POSSIBLE_NAMES: dict = {}
 STATUS_UNKNOWN = Status('unknown')
 STATUS_PENDING = Status('pending')
 STATUS_PROCESSING = Status('processing')
@@ -166,7 +171,7 @@
 
 class IdentifierType(_Constant):
     """ACME identifier type."""
-    POSSIBLE_NAMES = {}  # type: dict
+    POSSIBLE_NAMES: Dict[str, 'IdentifierType'] = {}
 IDENTIFIER_FQDN = IdentifierType('dns')  # IdentifierDNS in Boulder
 
 
@@ -184,7 +189,7 @@
 class Directory(jose.JSONDeSerializable):
     """Directory."""
 
-    _REGISTERED_TYPES = {}  # type: dict
+    _REGISTERED_TYPES: Dict[str, Type[Any]] = {}
 
     class Meta(jose.JSONObjectWithFields):
         """Directory Meta."""
@@ -218,7 +223,7 @@
         return getattr(key, 'resource_type', key)
 
     @classmethod
-    def register(cls, resource_body_cls):
+    def register(cls, resource_body_cls: Type[Any]) -> Type[Any]:
         """Register resource."""
         resource_type = resource_body_cls.resource_type
         assert resource_type not in cls._REGISTERED_TYPES
@@ -528,7 +533,9 @@
     expires = fields.RFC3339Field('expires', omitempty=True)
     wildcard = jose.Field('wildcard', omitempty=True)
 
-    @challenges.decoder
+    # Mypy does not understand the josepy magic happening here, and falsely 
claims
+    # that challenge is redefined. Let's ignore the type check here.
+    @challenges.decoder  # type: ignore
     def challenges(value):  # pylint: 
disable=no-self-argument,missing-function-docstring
         return tuple(ChallengeBody.from_json(chall) for chall in value)
 
@@ -627,7 +634,9 @@
     expires = fields.RFC3339Field('expires', omitempty=True)
     error = jose.Field('error', omitempty=True, decoder=Error.from_json)
 
-    @identifiers.decoder
+    # Mypy does not understand the josepy magic happening here, and falsely 
claims
+    # that identifiers is redefined. Let's ignore the type check here.
+    @identifiers.decoder  # type: ignore
     def identifiers(value):  # pylint: 
disable=no-self-argument,missing-function-docstring
         return tuple(Identifier.from_json(identifier) for identifier in value)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/acme/standalone.py 
new/acme-1.14.0/acme/standalone.py
--- old/acme-1.13.0/acme/standalone.py  2021-03-02 22:37:04.000000000 +0100
+++ new/acme-1.14.0/acme/standalone.py  2021-04-06 19:17:00.000000000 +0200
@@ -7,10 +7,10 @@
 import socket
 import socketserver
 import threading
+from typing import List
 
 from acme import challenges
 from acme import crypto_util
-from acme.magic_typing import List
 
 logger = logging.getLogger(__name__)
 
@@ -63,8 +63,8 @@
 
     def __init__(self, ServerClass, server_address, *remaining_args, **kwargs):
         port = server_address[1]
-        self.threads = [] # type: List[threading.Thread]
-        self.servers = [] # type: List[ACMEServerMixin]
+        self.threads: List[threading.Thread] = []
+        self.servers: List[socketserver.BaseServer] = []
 
         # Must try True first.
         # Ubuntu, for example, will fail to bind to IPv4 if we've already bound
@@ -203,8 +203,24 @@
 
     def __init__(self, *args, **kwargs):
         self.simple_http_resources = kwargs.pop("simple_http_resources", set())
-        self.timeout = kwargs.pop('timeout', 30)
+        self._timeout = kwargs.pop('timeout', 30)
         BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
+        self.server: HTTP01Server
+
+    # In parent class BaseHTTPRequestHandler, 'timeout' is a class-level 
property but we
+    # need to define its value during the initialization phase in 
HTTP01RequestHandler.
+    # However MyPy does not appreciate that we dynamically shadow a 
class-level property
+    # with an instance-level property (eg. self.timeout = ... in __init__()). 
So to make
+    # everyone happy, we statically redefine 'timeout' as a method property, 
and set the
+    # timeout value in a new internal instance-level property _timeout.
+    @property
+    def timeout(self):
+        """
+        The default timeout this server should apply to requests.
+        :return: timeout to apply
+        :rtype: int
+        """
+        return self._timeout
 
     def log_message(self, format, *args):  # pylint: disable=redefined-builtin
         """Log arbitrary message."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/acme.egg-info/PKG-INFO 
new/acme-1.14.0/acme.egg-info/PKG-INFO
--- old/acme-1.13.0/acme.egg-info/PKG-INFO      2021-03-02 22:37:11.000000000 
+0100
+++ new/acme-1.14.0/acme.egg-info/PKG-INFO      2021-04-06 19:17:08.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: acme
-Version: 1.13.0
+Version: 1.14.0
 Summary: ACME protocol implementation in Python
 Home-page: https://github.com/letsencrypt/letsencrypt
 Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/setup.py new/acme-1.14.0/setup.py
--- old/acme-1.13.0/setup.py    2021-03-02 22:37:05.000000000 +0100
+++ new/acme-1.14.0/setup.py    2021-04-06 19:17:02.000000000 +0200
@@ -3,7 +3,7 @@
 from setuptools import find_packages
 from setuptools import setup
 
-version = '1.13.0'
+version = '1.14.0'
 
 # Please update tox.ini when modifying dependency version requirements
 install_requires = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/tests/client_test.py 
new/acme-1.14.0/tests/client_test.py
--- old/acme-1.13.0/tests/client_test.py        2021-03-02 22:37:04.000000000 
+0100
+++ new/acme-1.14.0/tests/client_test.py        2021-04-06 19:17:00.000000000 
+0200
@@ -5,6 +5,7 @@
 import http.client as http_client
 import json
 import unittest
+from typing import Dict
 from unittest import mock
 
 import josepy as jose
@@ -61,7 +62,7 @@
         self.contact = ('mailto:cert-ad...@example.com', 'tel:+12025551212')
         reg = messages.Registration(
             contact=self.contact, key=KEY.public_key())
-        the_arg = dict(reg)  # type: Dict
+        the_arg: Dict = dict(reg)
         self.new_reg = messages.NewRegistration(**the_arg)
         self.regr = messages.RegistrationResource(
             body=reg, uri='https://www.letsencrypt-demo.org/acme/reg/1')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/tests/crypto_util_test.py 
new/acme-1.14.0/tests/crypto_util_test.py
--- old/acme-1.13.0/tests/crypto_util_test.py   2021-03-02 22:37:04.000000000 
+0100
+++ new/acme-1.14.0/tests/crypto_util_test.py   2021-04-06 19:17:00.000000000 
+0200
@@ -5,6 +5,7 @@
 import threading
 import time
 import unittest
+from typing import List
 
 import josepy as jose
 import OpenSSL
@@ -180,7 +181,7 @@
 
     def setUp(self):
         self.cert_count = 5
-        self.serial_num = [] # type: List[int]
+        self.serial_num: List[int] = []
         self.key = OpenSSL.crypto.PKey()
         self.key.generate_key(OpenSSL.crypto.TYPE_RSA, 2048)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/tests/magic_typing_test.py 
new/acme-1.14.0/tests/magic_typing_test.py
--- old/acme-1.13.0/tests/magic_typing_test.py  2021-03-02 22:37:04.000000000 
+0100
+++ new/acme-1.14.0/tests/magic_typing_test.py  2021-04-06 19:17:00.000000000 
+0200
@@ -1,6 +1,7 @@
 """Tests for acme.magic_typing."""
 import sys
 import unittest
+import warnings
 from unittest import mock
 
 
@@ -9,15 +10,17 @@
     def test_import_success(self):
         try:
             import typing as temp_typing
-        except ImportError: # pragma: no cover
-            temp_typing = None # pragma: no cover
+        except ImportError:  # pragma: no cover
+            temp_typing = None  # pragma: no cover
         typing_class_mock = mock.MagicMock()
         text_mock = mock.MagicMock()
         typing_class_mock.Text = text_mock
         sys.modules['typing'] = typing_class_mock
         if 'acme.magic_typing' in sys.modules:
-            del sys.modules['acme.magic_typing'] # pragma: no cover
-        from acme.magic_typing import Text
+            del sys.modules['acme.magic_typing']  # pragma: no cover
+        with warnings.catch_warnings():
+            warnings.filterwarnings("ignore", category=DeprecationWarning)
+            from acme.magic_typing import Text
         self.assertEqual(Text, text_mock)
         del sys.modules['acme.magic_typing']
         sys.modules['typing'] = temp_typing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/tests/messages_test.py 
new/acme-1.14.0/tests/messages_test.py
--- old/acme-1.13.0/tests/messages_test.py      2021-03-02 22:37:04.000000000 
+0100
+++ new/acme-1.14.0/tests/messages_test.py      2021-04-06 19:17:00.000000000 
+0200
@@ -1,4 +1,5 @@
 """Tests for acme.messages."""
+from typing import Dict
 import unittest
 from unittest import mock
 
@@ -81,7 +82,7 @@
         from acme.messages import _Constant
 
         class MockConstant(_Constant):  # pylint: disable=missing-docstring
-            POSSIBLE_NAMES = {} # type: Dict
+            POSSIBLE_NAMES: Dict = {}
 
         self.MockConstant = MockConstant  # pylint: disable=invalid-name
         self.const_a = MockConstant('a')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/acme-1.13.0/tests/standalone_test.py 
new/acme-1.14.0/tests/standalone_test.py
--- old/acme-1.13.0/tests/standalone_test.py    2021-03-02 22:37:04.000000000 
+0100
+++ new/acme-1.14.0/tests/standalone_test.py    2021-04-06 19:17:00.000000000 
+0200
@@ -4,6 +4,7 @@
 import socketserver
 import threading
 import unittest
+from typing import Set
 from unittest import mock
 
 import josepy as jose
@@ -41,7 +42,7 @@
     def setUp(self):
         self.account_key = jose.JWK.load(
             test_util.load_vector('rsa1024_key.pem'))
-        self.resources = set() # type: Set
+        self.resources: Set = set()
 
         from acme.standalone import HTTP01Server
         self.server = HTTP01Server(('', 0), resources=self.resources)
@@ -218,7 +219,7 @@
     def setUp(self):
         self.account_key = jose.JWK.load(
             test_util.load_vector('rsa1024_key.pem'))
-        self.resources = set() # type: Set
+        self.resources: Set = set()
 
         from acme.standalone import HTTP01DualNetworkedServers
         self.servers = HTTP01DualNetworkedServers(('', 0), 
resources=self.resources)

Reply via email to