Repository: certbot/certbot
Pull request: Deprecate acme.typing_magic module, stop using it in certbot
Fixes #8628

On top of the deprecation and code cleanup, I also execute isort to fix the import sections.

Problem statement:
Stop using magic_typing and deprecate it
Now that we no longer support Python 2, we can stop using `acme.magic_typing` and `josepy.magic_typing` in favor of `typing` which is part of the standard library in Python 3.5+. We should also deprecate these modules so they raise deprecation warnings if they're imported.

This issue may want to be tackled in multiple steps, however, I'm just creating a single, top level issue for now.

Hints from issue discussion:

Commit message: Merge branch 'master' into deprecate-magic-typing

Patch to review:
diff --git a/acme/acme/challenges.py b/acme/acme/challenges.py
index 41a2aa25804..58b457e0d3f 100644
--- a/acme/acme/challenges.py
+++ b/acme/acme/challenges.py
@@ -8,14 +8,15 @@
 
 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__)
 
diff --git a/acme/acme/client.py b/acme/acme/client.py
index c3f8c550f9f..f8e2a84c785 100644
--- a/acme/acme/client.py
+++ b/acme/acme/client.py
@@ -8,6 +8,10 @@
 import logging
 import re
 import time
+from typing import Dict
+from typing import List
+from typing import Set
+from typing import Text
 
 import josepy as jose
 import OpenSSL
@@ -20,10 +24,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__)
diff --git a/acme/acme/crypto_util.py b/acme/acme/crypto_util.py
index 4b58db32849..344caf09a4f 100644
--- a/acme/acme/crypto_util.py
+++ b/acme/acme/crypto_util.py
@@ -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__)
 
diff --git a/acme/acme/magic_typing.py b/acme/acme/magic_typing.py
index 388fc4a58c7..9eb0342c544 100644
--- a/acme/acme/magic_typing.py
+++ b/acme/acme/magic_typing.py
@@ -1,5 +1,9 @@
 """Shim class to not have to depend on typing module in prod."""
 import sys
+import warnings
+
+warnings.warn("Module acme.magic_typing is deprecated and will be removed in a future release.",
+              DeprecationWarning)
 
 
 class TypingClass(object):
@@ -7,6 +11,7 @@ class TypingClass(object):
     def __getattr__(self, name):
         return None
 
+
 try:
     # mypy doesn't respect modifying sys.modules
     from typing import *  # pylint: disable=wildcard-import, unused-wildcard-import
diff --git a/acme/acme/standalone.py b/acme/acme/standalone.py
index 94397f0de4b..8776c797873 100644
--- a/acme/acme/standalone.py
+++ b/acme/acme/standalone.py
@@ -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__)
 
diff --git a/acme/tests/magic_typing_test.py b/acme/tests/magic_typing_test.py
index 04899591699..1bb31d3db35 100644
--- a/acme/tests/magic_typing_test.py
+++ b/acme/tests/magic_typing_test.py
@@ -1,6 +1,7 @@
 """Tests for acme.magic_typing."""
 import sys
 import unittest
+import warnings
 from unittest import mock
 
 
@@ -9,15 +10,17 @@ class MagicTypingTest(unittest.TestCase):
     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
@@ -25,12 +28,14 @@ def test_import_success(self):
     def test_import_failure(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
         sys.modules['typing'] = None
         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.assertTrue(Text is None)
         del sys.modules['acme.magic_typing']
         sys.modules['typing'] = temp_typing
diff --git a/certbot-apache/certbot_apache/_internal/apache_util.py b/certbot-apache/certbot_apache/_internal/apache_util.py
index 93612f42490..9b9855a45ec 100644
--- a/certbot-apache/certbot_apache/_internal/apache_util.py
+++ b/certbot-apache/certbot_apache/_internal/apache_util.py
@@ -9,7 +9,6 @@
 
 from certbot import errors
 from certbot import util
-
 from certbot.compat import os
 
 logger = logging.getLogger(__name__)
diff --git a/certbot-apache/certbot_apache/_internal/assertions.py b/certbot-apache/certbot_apache/_internal/assertions.py
index 2b2ce4f5030..53603c526a2 100644
--- a/certbot-apache/certbot_apache/_internal/assertions.py
+++ b/certbot-apache/certbot_apache/_internal/assertions.py
@@ -3,7 +3,6 @@
 
 from certbot_apache._internal import interfaces
 
-
 PASS = "CERTBOT_PASS_ASSERT"
 
 
diff --git a/certbot-apache/certbot_apache/_internal/augeasparser.py b/certbot-apache/certbot_apache/_internal/augeasparser.py
index 3b2ce40d8d5..461b5cb7be3 100644
--- a/certbot-apache/certbot_apache/_internal/augeasparser.py
+++ b/certbot-apache/certbot_apache/_internal/augeasparser.py
@@ -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
diff --git a/certbot-apache/certbot_apache/_internal/configurator.py b/certbot-apache/certbot_apache/_internal/configurator.py
index 16def199839..ecd5c46debb 100644
--- a/certbot-apache/certbot_apache/_internal/configurator.py
+++ b/certbot-apache/certbot_apache/_internal/configurator.py
@@ -1,13 +1,18 @@
 """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 DefaultDict
+from typing import Dict
+from typing import List
+from typing import Set
+from typing import Union
 
 import zope.component
 import zope.interface
@@ -18,11 +23,6 @@
     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
@@ -41,6 +41,7 @@
 from certbot_apache._internal import obj
 from certbot_apache._internal import parser
 
+
 logger = logging.getLogger(__name__)
 
 
diff --git a/certbot-apache/certbot_apache/_internal/dualparser.py b/certbot-apache/certbot_apache/_internal/dualparser.py
index eef8f2a0ed5..72954f6896f 100644
--- a/certbot-apache/certbot_apache/_internal/dualparser.py
+++ b/certbot-apache/certbot_apache/_internal/dualparser.py
@@ -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(object):
diff --git a/certbot-apache/certbot_apache/_internal/http_01.py b/certbot-apache/certbot_apache/_internal/http_01.py
index 5ef44fa2e89..4bd935d2d46 100644
--- a/certbot-apache/certbot_apache/_internal/http_01.py
+++ b/certbot-apache/certbot_apache/_internal/http_01.py
@@ -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
diff --git a/certbot-apache/certbot_apache/_internal/interfaces.py b/certbot-apache/certbot_apache/_internal/interfaces.py
index 77daa5b56b2..4bc91352c1d 100644
--- a/certbot-apache/certbot_apache/_internal/interfaces.py
+++ b/certbot-apache/certbot_apache/_internal/interfaces.py
@@ -101,6 +101,7 @@
 
 import abc
 
+import six
 
 
 class ParserNode(object, metaclass=abc.ABCMeta):
diff --git a/certbot-apache/certbot_apache/_internal/obj.py b/certbot-apache/certbot_apache/_internal/obj.py
index 49876674427..8503f07bd5d 100644
--- a/certbot-apache/certbot_apache/_internal/obj.py
+++ b/certbot-apache/certbot_apache/_internal/obj.py
@@ -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
 
 
diff --git a/certbot-apache/certbot_apache/_internal/override_centos.py b/certbot-apache/certbot_apache/_internal/override_centos.py
index 9b2ee54c987..4cde65d577e 100644
--- a/certbot-apache/certbot_apache/_internal/override_centos.py
+++ b/certbot-apache/certbot_apache/_internal/override_centos.py
@@ -1,9 +1,9 @@
 """ Distribution specific override class for CentOS family (RHEL, Fedora) """
 import logging
+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
diff --git a/certbot-apache/certbot_apache/_internal/parser.py b/certbot-apache/certbot_apache/_internal/parser.py
index 75be0833f64..b41f1f76aec 100644
--- a/certbot-apache/certbot_apache/_internal/parser.py
+++ b/certbot-apache/certbot_apache/_internal/parser.py
@@ -4,10 +4,10 @@
 import logging
 import re
 import sys
+from typing import Dict
+from typing import List
 
 
-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
diff --git a/certbot-ci/certbot_integration_tests/assets/hook.py b/certbot-ci/certbot_integration_tests/assets/hook.py
index 483892a936f..f9b2651bcab 100755
--- a/certbot-ci/certbot_integration_tests/assets/hook.py
+++ b/certbot-ci/certbot_integration_tests/assets/hook.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 from __future__ import print_function
+
 import os
 import sys
 
diff --git a/certbot-ci/certbot_integration_tests/conftest.py b/certbot-ci/certbot_integration_tests/conftest.py
index 230fb0eda64..16923895169 100644
--- a/certbot-ci/certbot_integration_tests/conftest.py
+++ b/certbot-ci/certbot_integration_tests/conftest.py
@@ -7,6 +7,7 @@
 See https://docs.pytest.org/en/latest/reference.html#hook-reference
 """
 from __future__ import print_function
+
 import contextlib
 import subprocess
 import sys
diff --git a/certbot-ci/certbot_integration_tests/nginx_tests/test_main.py b/certbot-ci/certbot_integration_tests/nginx_tests/test_main.py
index 8a2d48a50a7..4c746e1ee9d 100644
--- a/certbot-ci/certbot_integration_tests/nginx_tests/test_main.py
+++ b/certbot-ci/certbot_integration_tests/nginx_tests/test_main.py
@@ -1,8 +1,8 @@
 """Module executing integration tests against certbot with nginx plugin."""
 import os
 import ssl
-
 from typing import List
+
 import pytest
 
 from certbot_integration_tests.nginx_tests import context as nginx_context
diff --git a/certbot-ci/certbot_integration_tests/rfc2136_tests/context.py b/certbot-ci/certbot_integration_tests/rfc2136_tests/context.py
index bdedee1fee7..c8024b21d99 100644
--- a/certbot-ci/certbot_integration_tests/rfc2136_tests/context.py
+++ b/certbot-ci/certbot_integration_tests/rfc2136_tests/context.py
@@ -1,7 +1,7 @@
 """Module to handle the context of RFC2136 integration tests."""
 
-import tempfile
 from contextlib import contextmanager
+import tempfile
 
 from pkg_resources import resource_filename
 from pytest import skip
diff --git a/certbot-ci/certbot_integration_tests/utils/acme_server.py b/certbot-ci/certbot_integration_tests/utils/acme_server.py
index bbbdd196bee..c5097fd423b 100755
--- a/certbot-ci/certbot_integration_tests/utils/acme_server.py
+++ b/certbot-ci/certbot_integration_tests/utils/acme_server.py
@@ -12,14 +12,14 @@
 import sys
 import tempfile
 import time
-
 from typing import List
+
 import requests
 
+# pylint: disable=wildcard-import,unused-wildcard-import
 from certbot_integration_tests.utils import misc
 from certbot_integration_tests.utils import pebble_artifacts
 from certbot_integration_tests.utils import proxy
-# pylint: disable=wildcard-import,unused-wildcard-import
 from certbot_integration_tests.utils.constants import *
 
 
diff --git a/certbot-ci/certbot_integration_tests/utils/misc.py b/certbot-ci/certbot_integration_tests/utils/misc.py
index e6b9f0c88d8..6d840e9578c 100644
--- a/certbot-ci/certbot_integration_tests/utils/misc.py
+++ b/certbot-ci/certbot_integration_tests/utils/misc.py
@@ -26,8 +26,8 @@
 import pkg_resources
 import requests
 
-from certbot_integration_tests.utils.constants import \
-     PEBBLE_ALTERNATE_ROOTS, PEBBLE_MANAGEMENT_URL
+from certbot_integration_tests.utils.constants import PEBBLE_ALTERNATE_ROOTS
+from certbot_integration_tests.utils.constants import PEBBLE_MANAGEMENT_URL
 
 RSA_KEY_TYPE = 'rsa'
 ECDSA_KEY_TYPE = 'ecdsa'
diff --git a/certbot-ci/certbot_integration_tests/utils/pebble_artifacts.py b/certbot-ci/certbot_integration_tests/utils/pebble_artifacts.py
index cd62e1a7f8b..918a5fd04b2 100644
--- a/certbot-ci/certbot_integration_tests/utils/pebble_artifacts.py
+++ b/certbot-ci/certbot_integration_tests/utils/pebble_artifacts.py
@@ -7,7 +7,8 @@
 import pkg_resources
 import requests
 
-from certbot_integration_tests.utils.constants import DEFAULT_HTTP_01_PORT, MOCK_OCSP_SERVER_PORT
+from certbot_integration_tests.utils.constants import DEFAULT_HTTP_01_PORT
+from certbot_integration_tests.utils.constants import MOCK_OCSP_SERVER_PORT
 
 PEBBLE_VERSION = 'v2.3.0'
 ASSETS_PATH = pkg_resources.resource_filename('certbot_integration_tests', 'assets')
diff --git a/certbot-ci/snap_integration_tests/dns_tests/test_main.py b/certbot-ci/snap_integration_tests/dns_tests/test_main.py
index 0163553341a..721352c0468 100644
--- a/certbot-ci/snap_integration_tests/dns_tests/test_main.py
+++ b/certbot-ci/snap_integration_tests/dns_tests/test_main.py
@@ -1,9 +1,10 @@
 #!/usr/bin/env python3
-import pytest
-import subprocess
 import glob
 import os
 import re
+import subprocess
+
+import pytest
 
 
 @pytest.fixture(autouse=True, scope="module")
diff --git a/certbot-ci/windows_installer_integration_tests/conftest.py b/certbot-ci/windows_installer_integration_tests/conftest.py
index c6a89c323d7..fa67aa7749f 100644
--- a/certbot-ci/windows_installer_integration_tests/conftest.py
+++ b/certbot-ci/windows_installer_integration_tests/conftest.py
@@ -7,6 +7,7 @@
 See https://docs.pytest.org/en/latest/reference.html#hook-reference
 """
 from __future__ import print_function
+
 import os
 
 ROOT_PATH = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
diff --git a/certbot-ci/windows_installer_integration_tests/test_main.py b/certbot-ci/windows_installer_integration_tests/test_main.py
index c8c347aa818..f699b736a4e 100644
--- a/certbot-ci/windows_installer_integration_tests/test_main.py
+++ b/certbot-ci/windows_installer_integration_tests/test_main.py
@@ -1,8 +1,8 @@
 import os
+import re
+import subprocess
 import time
 import unittest
-import subprocess
-import re
 
 
 @unittest.skipIf(os.name != 'nt', reason='Windows installer tests must be run on Windows.')
diff --git a/certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/common.py b/certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/common.py
index 7cb4e9722a6..58b72c2055d 100644
--- a/certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/common.py
+++ b/certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/common.py
@@ -2,10 +2,10 @@
 import os
 import shutil
 import subprocess
+from typing import Set
 
 import zope.interface
 
-from acme.magic_typing import Set
 from certbot._internal import configuration
 from certbot_compatibility_test import errors
 from certbot_compatibility_test import interfaces
diff --git a/certbot-compatibility-test/certbot_compatibility_test/test_driver.py b/certbot-compatibility-test/certbot_compatibility_test/test_driver.py
index f11b9fdf85a..fe634ba9f76 100644
--- a/certbot-compatibility-test/certbot_compatibility_test/test_driver.py
+++ b/certbot-compatibility-test/certbot_compatibility_test/test_driver.py
@@ -8,6 +8,8 @@
 import sys
 import tempfile
 import time
+from typing import List
+from typing import Tuple
 
 import OpenSSL
 from urllib3.util import connection
@@ -15,8 +17,6 @@
 from acme import challenges
 from acme import crypto_util
 from acme import messages
-from acme.magic_typing import List
-from acme.magic_typing import Tuple
 from certbot import achallenges
 from certbot import errors as le_errors
 from certbot.tests import acme_util
diff --git a/certbot-dns-cloudflare/certbot_dns_cloudflare/_internal/dns_cloudflare.py b/certbot-dns-cloudflare/certbot_dns_cloudflare/_internal/dns_cloudflare.py
index 5978af85c95..477a09d8e4c 100644
--- a/certbot-dns-cloudflare/certbot_dns_cloudflare/_internal/dns_cloudflare.py
+++ b/certbot-dns-cloudflare/certbot_dns_cloudflare/_internal/dns_cloudflare.py
@@ -1,13 +1,12 @@
 """DNS Authenticator for Cloudflare."""
 import logging
+from typing import Any
+from typing import Dict
+from typing import List
 
 import CloudFlare
 import zope.interface
 
-from acme.magic_typing import Any
-from acme.magic_typing import Dict
-from acme.magic_typing import List
-
 from certbot import errors
 from certbot import interfaces
 from certbot.plugins import dns_common
diff --git a/certbot-dns-route53/certbot_dns_route53/_internal/dns_route53.py b/certbot-dns-route53/certbot_dns_route53/_internal/dns_route53.py
index 6250d2274a8..4837e20365e 100644
--- a/certbot-dns-route53/certbot_dns_route53/_internal/dns_route53.py
+++ b/certbot-dns-route53/certbot_dns_route53/_internal/dns_route53.py
@@ -2,15 +2,15 @@
 import collections
 import logging
 import time
+from typing import DefaultDict
+from typing import Dict
+from typing import List
 
 import boto3
 from botocore.exceptions import ClientError
 from botocore.exceptions import NoCredentialsError
 import zope.interface
 
-from acme.magic_typing import DefaultDict
-from acme.magic_typing import Dict
-from acme.magic_typing import List
 from certbot import errors
 from certbot import interfaces
 from certbot.plugins import dns_common
diff --git a/certbot-nginx/certbot_nginx/_internal/configurator.py b/certbot-nginx/certbot_nginx/_internal/configurator.py
index 15fbe61f703..edbd47f40ec 100644
--- a/certbot-nginx/certbot_nginx/_internal/configurator.py
+++ b/certbot-nginx/certbot_nginx/_internal/configurator.py
@@ -6,6 +6,10 @@
 import subprocess
 import tempfile
 import time
+from typing import Dict
+from typing import List
+from typing import Set
+from typing import Text
 
 import OpenSSL
 import pkg_resources
@@ -13,10 +17,6 @@
 
 from acme import challenges
 from acme import crypto_util as acme_crypto_util
-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 certbot import crypto_util
 from certbot import errors
 from certbot import interfaces
diff --git a/certbot-nginx/certbot_nginx/_internal/constants.py b/certbot-nginx/certbot_nginx/_internal/constants.py
index 1f058e7ef4e..7b4111577ec 100644
--- a/certbot-nginx/certbot_nginx/_internal/constants.py
+++ b/certbot-nginx/certbot_nginx/_internal/constants.py
@@ -1,8 +1,7 @@
 """nginx plugin constants."""
 import platform
-
-from acme.magic_typing import Any
-from acme.magic_typing import Dict
+from typing import Any
+from typing import Dict
 
 FREEBSD_DARWIN_SERVER_ROOT = "/usr/local/etc/nginx"
 LINUX_SERVER_ROOT = "/etc/nginx"
diff --git a/certbot-nginx/certbot_nginx/_internal/http_01.py b/certbot-nginx/certbot_nginx/_internal/http_01.py
index 40f994988ab..5c98a5ac1f6 100644
--- a/certbot-nginx/certbot_nginx/_internal/http_01.py
+++ b/certbot-nginx/certbot_nginx/_internal/http_01.py
@@ -2,9 +2,9 @@
 
 import io
 import logging
+from typing import List
 
 from acme import challenges
-from acme.magic_typing import List
 from certbot import errors
 from certbot.compat import os
 from certbot.plugins import common
diff --git a/certbot-nginx/certbot_nginx/_internal/nginxparser.py b/certbot-nginx/certbot_nginx/_internal/nginxparser.py
index f043b0e4d4c..158183e1ea7 100644
--- a/certbot-nginx/certbot_nginx/_internal/nginxparser.py
+++ b/certbot-nginx/certbot_nginx/_internal/nginxparser.py
@@ -2,6 +2,8 @@
 # Forked from https://github.com/fatiherikli/nginxparser (MIT Licensed)
 import copy
 import logging
+from typing import Any  # pylint: disable=unused-import
+from typing import IO  # pylint: disable=unused-import
 
 from pyparsing import Combine
 from pyparsing import Forward
@@ -15,7 +17,6 @@
 from pyparsing import stringEnd
 from pyparsing import White
 from pyparsing import ZeroOrMore
-from acme.magic_typing import IO, Any # pylint: disable=unused-import
 
 logger = logging.getLogger(__name__)
 
diff --git a/certbot-nginx/certbot_nginx/_internal/parser.py b/certbot-nginx/certbot_nginx/_internal/parser.py
index fe5d7bb3198..8eb11699bf2 100644
--- a/certbot-nginx/certbot_nginx/_internal/parser.py
+++ b/certbot-nginx/certbot_nginx/_internal/parser.py
@@ -5,14 +5,14 @@
 import io
 import logging
 import re
+from typing import Dict
+from typing import List
+from typing import Set
+from typing import Tuple
+from typing import Union
 
 import pyparsing
 
-from acme.magic_typing import Dict
-from acme.magic_typing import List
-from acme.magic_typing import Set
-from acme.magic_typing import Tuple
-from acme.magic_typing import Union
 from certbot import errors
 from certbot.compat import os
 from certbot_nginx._internal import nginxparser
diff --git a/certbot-nginx/certbot_nginx/_internal/parser_obj.py b/certbot-nginx/certbot_nginx/_internal/parser_obj.py
index d616a1a99f6..4e62b06f39f 100644
--- a/certbot-nginx/certbot_nginx/_internal/parser_obj.py
+++ b/certbot-nginx/certbot_nginx/_internal/parser_obj.py
@@ -3,9 +3,9 @@
 
 import abc
 import logging
+from typing import List
 
 
-from acme.magic_typing import List
 from certbot import errors
 
 logger = logging.getLogger(__name__)
diff --git a/certbot-nginx/tests/test_log_util.py b/certbot-nginx/tests/test_log_util.py
index 7aebf21511a..7e277fc9af7 100644
--- a/certbot-nginx/tests/test_log_util.py
+++ b/certbot-nginx/tests/test_log_util.py
@@ -3,8 +3,8 @@
 Most of the idea and code are from CPython implementation.
 https://github.com/python/cpython/blob/b76518d43fb82ed9e5d27025d18c90a23d525c90/Lib/unittest/case.py
 """
-import logging
 import collections
+import logging
 
 __all__ = ['AssertLogsMixin']
 
diff --git a/certbot/certbot/_internal/account.py b/certbot/certbot/_internal/account.py
index dbe111fbc26..5e72ab71e87 100644
--- a/certbot/certbot/_internal/account.py
+++ b/certbot/certbot/_internal/account.py
@@ -18,8 +18,8 @@
 from certbot import interfaces
 from certbot import util
 from certbot._internal import constants
-from certbot.compat import os
 from certbot.compat import filesystem
+from certbot.compat import os
 
 logger = logging.getLogger(__name__)
 
diff --git a/certbot/certbot/_internal/auth_handler.py b/certbot/certbot/_internal/auth_handler.py
index 7ea2a1de83a..2024de1c9bd 100644
--- a/certbot/certbot/_internal/auth_handler.py
+++ b/certbot/certbot/_internal/auth_handler.py
@@ -2,15 +2,15 @@
 import datetime
 import logging
 import time
+from typing import Dict
+from typing import List
+from typing import Tuple
 
 import zope.component
 
 from acme import challenges
 from acme import errors as acme_errors
 from acme import messages
-from acme.magic_typing import Dict
-from acme.magic_typing import List
-from acme.magic_typing import Tuple
 from certbot import achallenges
 from certbot import errors
 from certbot import interfaces
diff --git a/certbot/certbot/_internal/cert_manager.py b/certbot/certbot/_internal/cert_manager.py
index dfbe4b5381f..8d9ef0c3dfd 100644
--- a/certbot/certbot/_internal/cert_manager.py
+++ b/certbot/certbot/_internal/cert_manager.py
@@ -3,11 +3,11 @@
 import logging
 import re
 import traceback
+from typing import List
 
 import pytz
 import zope.component
 
-from acme.magic_typing import List
 from certbot import crypto_util
 from certbot import errors
 from certbot import interfaces
diff --git a/certbot/certbot/_internal/cli/__init__.py b/certbot/certbot/_internal/cli/__init__.py
index c69bb356493..dc59156cc76 100644
--- a/certbot/certbot/_internal/cli/__init__.py
+++ b/certbot/certbot/_internal/cli/__init__.py
@@ -5,11 +5,11 @@
 import logging.handlers
 import argparse
 import sys
+from typing import Optional
+
 import certbot._internal.plugins.selection as plugin_selection
 from certbot._internal.plugins import disco as plugins_disco
 
-from acme.magic_typing import Optional
-
 # pylint: disable=ungrouped-imports
 import certbot
 from certbot._internal import constants
diff --git a/certbot/certbot/_internal/cli/cli_utils.py b/certbot/certbot/_internal/cli/cli_utils.py
index a0ddce38f29..d4d557ed645 100644
--- a/certbot/certbot/_internal/cli/cli_utils.py
+++ b/certbot/certbot/_internal/cli/cli_utils.py
@@ -5,11 +5,11 @@
 import zope.interface.interface  # pylint: disable=unused-import
 
 from acme import challenges
+from certbot import errors
 from certbot import interfaces
 from certbot import util
-from certbot import errors
-from certbot.compat import os
 from certbot._internal import constants
+from certbot.compat import os
 
 
 class _Default(object):
diff --git a/certbot/certbot/_internal/cli/helpful.py b/certbot/certbot/_internal/cli/helpful.py
index 80afe5db4fb..5b0dda996c9 100644
--- a/certbot/certbot/_internal/cli/helpful.py
+++ b/certbot/certbot/_internal/cli/helpful.py
@@ -5,6 +5,8 @@
 import functools
 import glob
 import sys
+from typing import Any
+from typing import Dict
 
 import configargparse
 import zope.component
@@ -12,8 +14,6 @@
 
 from zope.interface import interfaces as zope_interfaces
 
-from acme.magic_typing import Any, Dict
-
 from certbot import crypto_util
 from certbot import errors
 from certbot import interfaces
diff --git a/certbot/certbot/_internal/client.py b/certbot/certbot/_internal/client.py
index 5dc62580e17..b5e74a9d5d9 100644
--- a/certbot/certbot/_internal/client.py
+++ b/certbot/certbot/_internal/client.py
@@ -2,6 +2,8 @@
 import datetime
 import logging
 import platform
+from typing import List
+from typing import Optional
 
 from cryptography.hazmat.backends import default_backend
 # See https://github.com/pyca/cryptography/issues/4275
@@ -14,8 +16,6 @@
 from acme import crypto_util as acme_crypto_util
 from acme import errors as acme_errors
 from acme import messages
-from acme.magic_typing import List
-from acme.magic_typing import Optional
 import certbot
 from certbot import crypto_util
 from certbot import errors
diff --git a/certbot/certbot/_internal/eff.py b/certbot/certbot/_internal/eff.py
index 5fbbd302afa..6212c24eeb2 100644
--- a/certbot/certbot/_internal/eff.py
+++ b/certbot/certbot/_internal/eff.py
@@ -1,16 +1,15 @@
 """Subscribes users to the EFF newsletter."""
 import logging
+from typing import Optional  # pylint: disable=unused-import
 
 import requests
 import zope.component
 
-from acme.magic_typing import Optional  # pylint: disable=unused-import
-
 from certbot import interfaces
-from certbot.display import util as display_util
 from certbot._internal import constants
 from certbot._internal.account import Account  # pylint: disable=unused-import
 from certbot._internal.account import AccountFileStorage
+from certbot.display import util as display_util
 from certbot.interfaces import IConfig  # pylint: disable=unused-import
 
 logger = logging.getLogger(__name__)
diff --git a/certbot/certbot/_internal/error_handler.py b/certbot/certbot/_internal/error_handler.py
index 60fb287a662..6627ed23c2a 100644
--- a/certbot/certbot/_internal/error_handler.py
+++ b/certbot/certbot/_internal/error_handler.py
@@ -3,12 +3,12 @@
 import logging
 import signal
 import traceback
+from typing import Any
+from typing import Callable
+from typing import Dict
+from typing import List
+from typing import Union
 
-from acme.magic_typing import Any
-from acme.magic_typing import Callable
-from acme.magic_typing import Dict
-from acme.magic_typing import List
-from acme.magic_typing import Union
 from certbot import errors
 from certbot.compat import os
 
diff --git a/certbot/certbot/_internal/hooks.py b/certbot/certbot/_internal/hooks.py
index 5526b21c4f0..88987b6f098 100644
--- a/certbot/certbot/_internal/hooks.py
+++ b/certbot/certbot/_internal/hooks.py
@@ -2,9 +2,9 @@
 from __future__ import print_function
 
 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 import util
 from certbot.compat import filesystem
diff --git a/certbot/certbot/_internal/lock.py b/certbot/certbot/_internal/lock.py
index aa0b80eaa4e..37391e51c8e 100644
--- a/certbot/certbot/_internal/lock.py
+++ b/certbot/certbot/_internal/lock.py
@@ -1,8 +1,8 @@
 """Implements file locks compatible with Linux and Windows for locking files and directories."""
 import errno
 import logging
+from typing import Optional
 
-from acme.magic_typing import Optional
 from certbot import errors
 from certbot.compat import filesystem
 from certbot.compat import os
diff --git a/certbot/certbot/_internal/main.py b/certbot/certbot/_internal/main.py
index b9b6b16f679..1db71e29474 100644
--- a/certbot/certbot/_internal/main.py
+++ b/certbot/certbot/_internal/main.py
@@ -5,13 +5,17 @@
 import functools
 import logging.handlers
 import sys
+from typing import Iterable  # pylint: disable=unused-import
+from typing import List
+from typing import Optional
+from typing import Tuple
+from typing import Union
 
 import configobj
 import josepy as jose
 import zope.component
 
 from acme import errors as acme_errors
-from acme.magic_typing import Union, Iterable, Optional, List, Tuple  # pylint: disable=unused-import
 import certbot
 from certbot import crypto_util
 from certbot import errors
diff --git a/certbot/certbot/_internal/plugins/disco.py b/certbot/certbot/_internal/plugins/disco.py
index dbcecb067b2..c214ae5bad4 100644
--- a/certbot/certbot/_internal/plugins/disco.py
+++ b/certbot/certbot/_internal/plugins/disco.py
@@ -3,12 +3,12 @@
 import itertools
 import logging
 import sys
+from typing import Dict
 
 import pkg_resources
 import zope.interface
 import zope.interface.verify
 
-from acme.magic_typing import Dict
 from certbot import errors
 from certbot import interfaces
 from certbot._internal import constants
diff --git a/certbot/certbot/_internal/plugins/manual.py b/certbot/certbot/_internal/plugins/manual.py
index a2e4bb28e9b..c28e333b978 100644
--- a/certbot/certbot/_internal/plugins/manual.py
+++ b/certbot/certbot/_internal/plugins/manual.py
@@ -1,9 +1,10 @@
 """Manual authenticator plugin"""
+from typing import Dict
+
 import zope.component
 import zope.interface
 
 from acme import challenges
-from acme.magic_typing import Dict
 from certbot import achallenges  # pylint: disable=unused-import
 from certbot import errors
 from certbot import interfaces
diff --git a/certbot/certbot/_internal/plugins/standalone.py b/certbot/certbot/_internal/plugins/standalone.py
index 60c9558cb34..08af5496c68 100644
--- a/certbot/certbot/_internal/plugins/standalone.py
+++ b/certbot/certbot/_internal/plugins/standalone.py
@@ -4,17 +4,17 @@
 import socket
 # https://github.com/python/typeshed/blob/master/stdlib/2and3/socket.pyi
 from socket import errno as socket_errors  # type: ignore
+from typing import DefaultDict
+from typing import Dict
+from typing import Set
+from typing import Tuple
+from typing import TYPE_CHECKING
 
 import OpenSSL  # pylint: disable=unused-import
 import zope.interface
 
 from acme import challenges
 from acme import standalone as acme_standalone
-from acme.magic_typing import DefaultDict
-from acme.magic_typing import Dict
-from acme.magic_typing import Set
-from acme.magic_typing import Tuple
-from acme.magic_typing import TYPE_CHECKING
 from certbot import achallenges
 from certbot import errors
 from certbot import interfaces
diff --git a/certbot/certbot/_internal/plugins/webroot.py b/certbot/certbot/_internal/plugins/webroot.py
index 8789db60432..730241066cb 100644
--- a/certbot/certbot/_internal/plugins/webroot.py
+++ b/certbot/certbot/_internal/plugins/webroot.py
@@ -3,15 +3,15 @@
 import collections
 import json
 import logging
+from typing import DefaultDict
+from typing import Dict
+from typing import List
+from typing import Set
 
 import zope.component
 import zope.interface
 
 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 certbot import achallenges  # pylint: disable=unused-import
 from certbot import errors
 from certbot import interfaces
diff --git a/certbot/certbot/_internal/renewal.py b/certbot/certbot/_internal/renewal.py
index 9fe9cb54600..257e970040b 100644
--- a/certbot/certbot/_internal/renewal.py
+++ b/certbot/certbot/_internal/renewal.py
@@ -8,17 +8,17 @@
 import sys
 import time
 import traceback
+from typing import List
+from typing import Optional  # pylint: disable=unused-import
 
 from cryptography.hazmat.backends import default_backend
-from cryptography.hazmat.primitives.asymmetric import ec, rsa
+from cryptography.hazmat.primitives.asymmetric import ec
+from cryptography.hazmat.primitives.asymmetric import rsa
 from cryptography.hazmat.primitives.serialization import load_pem_private_key
 import OpenSSL
 import zope.component
 
-from acme.magic_typing import List
-from acme.magic_typing import Optional  # pylint: disable=unused-import
 from certbot import crypto_util
-from certbot.display import util as display_util
 from certbot import errors
 from certbot import interfaces
 from certbot import util
@@ -30,6 +30,7 @@
 from certbot._internal import updater
 from certbot._internal.plugins import disco as plugins_disco
 from certbot.compat import os
+from certbot.display import util as display_util
 
 logger = logging.getLogger(__name__)
 
diff --git a/certbot/certbot/_internal/snap_config.py b/certbot/certbot/_internal/snap_config.py
index a90740787eb..f2fe035db36 100644
--- a/certbot/certbot/_internal/snap_config.py
+++ b/certbot/certbot/_internal/snap_config.py
@@ -1,13 +1,13 @@
 """Module configuring Certbot in a snap environment"""
 import logging
 import socket
+from typing import List
 
 from requests import Session
 from requests.adapters import HTTPAdapter
 from requests.exceptions import HTTPError
 from requests.exceptions import RequestException
 
-from acme.magic_typing import List
 from certbot.compat import os
 from certbot.errors import Error
 
diff --git a/certbot/certbot/compat/filesystem.py b/certbot/certbot/compat/filesystem.py
index 0152685e989..aa6fe913428 100644
--- a/certbot/certbot/compat/filesystem.py
+++ b/certbot/certbot/compat/filesystem.py
@@ -5,8 +5,7 @@
 import os  # pylint: disable=os-module-forbidden
 import stat
 import sys
-
-from acme.magic_typing import List
+from typing import List
 
 try:
     import ntsecuritycon
diff --git a/certbot/certbot/compat/misc.py b/certbot/certbot/compat/misc.py
index f4ea4a5cc73..297df80fc35 100644
--- a/certbot/certbot/compat/misc.py
+++ b/certbot/certbot/compat/misc.py
@@ -8,12 +8,12 @@
 import select
 import subprocess
 import sys
+from typing import Optional
+from typing import Tuple
 
 from certbot import errors
 from certbot.compat import os
 
-from acme.magic_typing import Tuple, Optional
-
 try:
     from win32com.shell import shell as shellwin32
     POSIX_MODE = False
diff --git a/certbot/certbot/crypto_util.py b/certbot/certbot/crypto_util.py
index f67d95d9799..5bc9251a486 100644
--- a/certbot/certbot/crypto_util.py
+++ b/certbot/certbot/crypto_util.py
@@ -6,26 +6,29 @@
 """
 import hashlib
 import logging
+import re
+from typing import IO  # pylint: disable=unused-import
 import warnings
 
-import re
 # See https://github.com/pyca/cryptography/issues/4275
 from cryptography import x509  # type: ignore
-from cryptography.exceptions import InvalidSignature, UnsupportedAlgorithm
+from cryptography.exceptions import InvalidSignature
+from cryptography.exceptions import UnsupportedAlgorithm
 from cryptography.hazmat.backends import default_backend
 from cryptography.hazmat.primitives.asymmetric import ec
-from cryptography.hazmat.primitives.asymmetric.ec import ECDSA, EllipticCurvePublicKey
+from cryptography.hazmat.primitives.asymmetric.ec import ECDSA
+from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePublicKey
 from cryptography.hazmat.primitives.asymmetric.padding import PKCS1v15
 from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey
-from cryptography.hazmat.primitives.serialization import Encoding, NoEncryption, PrivateFormat
+from cryptography.hazmat.primitives.serialization import Encoding
+from cryptography.hazmat.primitives.serialization import NoEncryption
+from cryptography.hazmat.primitives.serialization import PrivateFormat
 from OpenSSL import crypto
 from OpenSSL import SSL  # type: ignore
-
 import pyrfc3339
 import zope.component
 
 from acme import crypto_util as acme_crypto_util
-from acme.magic_typing import IO  # pylint: disable=unused-import
 from certbot import errors
 from certbot import interfaces
 from certbot import util
diff --git a/certbot/certbot/display/util.py b/certbot/certbot/display/util.py
index 9da98189228..8cad0c6a1bd 100644
--- a/certbot/certbot/display/util.py
+++ b/certbot/certbot/display/util.py
@@ -12,11 +12,11 @@
 import logging
 import sys
 import textwrap
+from typing import List
 
 import zope.interface
 import zope.component
 
-from acme.magic_typing import List
 from certbot import errors
 from certbot import interfaces
 from certbot._internal import constants
diff --git a/certbot/certbot/ocsp.py b/certbot/certbot/ocsp.py
index b63338e2e2d..31c32a78c71 100644
--- a/certbot/certbot/ocsp.py
+++ b/certbot/certbot/ocsp.py
@@ -5,6 +5,8 @@
 import re
 from subprocess import PIPE
 from subprocess import Popen
+from typing import Optional
+from typing import Tuple
 
 from cryptography import x509
 from cryptography.exceptions import InvalidSignature
@@ -16,8 +18,6 @@
 import pytz
 import requests
 
-from acme.magic_typing import Optional
-from acme.magic_typing import Tuple
 from certbot import crypto_util
 from certbot import errors
 from certbot import util
diff --git a/certbot/certbot/plugins/common.py b/certbot/certbot/plugins/common.py
index d3fb5b7dc43..d7dd068cc18 100644
--- a/certbot/certbot/plugins/common.py
+++ b/certbot/certbot/plugins/common.py
@@ -3,12 +3,12 @@
 import re
 import shutil
 import tempfile
+from typing import List
 
 from josepy import util as jose_util
 import pkg_resources
 import zope.interface
 
-from acme.magic_typing import List
 from certbot import achallenges  # pylint: disable=unused-import
 from certbot import crypto_util
 from certbot import errors
diff --git a/certbot/certbot/plugins/dns_common_lexicon.py b/certbot/certbot/plugins/dns_common_lexicon.py
index c3d80ca2962..eab92675034 100644
--- a/certbot/certbot/plugins/dns_common_lexicon.py
+++ b/certbot/certbot/plugins/dns_common_lexicon.py
@@ -1,12 +1,12 @@
 """Common code for DNS Authenticator Plugins built on Lexicon."""
 import logging
+from typing import Any
+from typing import Dict
+from typing import Union
 
 from requests.exceptions import HTTPError
 from requests.exceptions import RequestException
 
-from acme.magic_typing import Any
-from acme.magic_typing import Dict
-from acme.magic_typing import Union
 from certbot import errors
 from certbot.plugins import dns_common
 
diff --git a/certbot/certbot/plugins/enhancements.py b/certbot/certbot/plugins/enhancements.py
index e674c32a217..3c3db7e7171 100644
--- a/certbot/certbot/plugins/enhancements.py
+++ b/certbot/certbot/plugins/enhancements.py
@@ -1,9 +1,9 @@
 """New interface style Certbot enhancements"""
 import abc
+from typing import Any
+from typing import Dict
+from typing import List
 
-from acme.magic_typing import Any
-from acme.magic_typing import Dict
-from acme.magic_typing import List
 from certbot._internal import constants
 
 ENHANCEMENTS = ["redirect", "ensure-http-header", "ocsp-stapling"]
diff --git a/certbot/certbot/plugins/storage.py b/certbot/certbot/plugins/storage.py
index f3ed14dce14..213f90be0ed 100644
--- a/certbot/certbot/plugins/storage.py
+++ b/certbot/certbot/plugins/storage.py
@@ -1,9 +1,9 @@
 """Plugin storage class."""
 import json
 import logging
+from typing import Any
+from typing import Dict
 
-from acme.magic_typing import Any
-from acme.magic_typing import Dict
 from certbot import errors
 from certbot.compat import filesystem
 from certbot.compat import os
diff --git a/certbot/certbot/util.py b/certbot/certbot/util.py
index 7bbc02f5f0e..d44a7e18495 100644
--- a/certbot/certbot/util.py
+++ b/certbot/certbot/util.py
@@ -13,12 +13,12 @@
 import socket
 import subprocess
 import sys
+from typing import Text
+from typing import Tuple
+from typing import Union
 
 import configargparse
 
-from acme.magic_typing import Text
-from acme.magic_typing import Tuple
-from acme.magic_typing import Union
 from certbot import errors
 from certbot._internal import constants
 from certbot._internal import lock
diff --git a/tests/letstest/multitester.py b/tests/letstest/multitester.py
index 83a92e6dc83..4964e2d39a9 100644
--- a/tests/letstest/multitester.py
+++ b/tests/letstest/multitester.py
@@ -49,7 +49,6 @@
 from fabric import Config
 from fabric import Connection
 
-
 # Command line parser
 #-------------------------------------------------------------------------------
 parser = argparse.ArgumentParser(description='Builds EC2 cluster for testing.')
diff --git a/tools/pipstrap.py b/tools/pipstrap.py
index e6b74691658..511b0ae7724 100755
--- a/tools/pipstrap.py
+++ b/tools/pipstrap.py
@@ -1,11 +1,11 @@
 #!/usr/bin/env python
 """Uses pip to upgrade Python packaging tools to pinned versions."""
 from __future__ import absolute_import
+
 import os
 
 import pip_install
 
-
 _REQUIREMENTS_PATH = os.path.join(os.path.dirname(__file__), "pipstrap_constraints.txt")
 
 
diff --git a/tools/snap/build_remote.py b/tools/snap/build_remote.py
index e6a44240f81..e690d2916b2 100755
--- a/tools/snap/build_remote.py
+++ b/tools/snap/build_remote.py
@@ -2,12 +2,18 @@
 import argparse
 import datetime
 import glob
+from multiprocessing import Manager
+from multiprocessing import Pool
+from multiprocessing import Process
+from os.path import basename
+from os.path import dirname
+from os.path import exists
+from os.path import join
+from os.path import realpath
 import re
 import subprocess
 import sys
 import time
-from multiprocessing import Pool, Process, Manager
-from os.path import join, realpath, dirname, basename, exists
 
 CERTBOT_DIR = dirname(dirname(dirname(realpath(__file__))))
 PLUGINS = [basename(path) for path in glob.glob(join(CERTBOT_DIR, 'certbot-dns-*'))]


Code review comments:
diff_hunk: @@ -1,12 +1,17 @@
 """Shim class to not have to depend on typing module in prod."""
 import sys
+import warnings
+
+warnings.warn("Module acme.magic_typing is deprecated and will be removed in a future release.",
path: acme/acme/magic_typing.py
text: @user1:
```suggestion
warnings.warn("acme.magic_typing is deprecated and will be removed in a future release.",
```
Alternatively we could say, "The module acme.magic_typing" or "The acme.magic_typing module", but I think the phrasing is a bit weird when using module without "the".

diff_hunk: @@ -101,6 +101,7 @@
 
 import abc
 
+import six
path: certbot-apache/certbot_apache/_internal/interfaces.py
text: @user1:
This should be deleted.