mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 00:35:03 +02:00
Deprecate acme.typing_magic module, stop using it in certbot (#8643)
* Deprecate acme.magic_typing, stop to use it in certbot * Isort * Add a changelog entry Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
This commit is contained in:
co-authored by
Brad Warren
parent
76895457c9
commit
67b65bb2c0
@@ -11,6 +11,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
||||
### Changed
|
||||
|
||||
* certbot-auto no longer checks for updates on any operating system.
|
||||
* The module `acme.magic_typing` is deprecated and will be removed in a future release.
|
||||
Please use the built-in module `typing` instead.
|
||||
* The DigitalOcean plugin now creates TXT records for the DNS-01 challenge with a lower 30s TTL.
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -18,8 +18,8 @@ from certbot import errors
|
||||
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__)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,11 +3,11 @@ import datetime
|
||||
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
|
||||
|
||||
@@ -4,11 +4,11 @@ import logging
|
||||
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
|
||||
|
||||
@@ -5,11 +5,11 @@ import copy
|
||||
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:
|
||||
|
||||
@@ -5,6 +5,8 @@ import copy
|
||||
import functools
|
||||
import glob
|
||||
import sys
|
||||
from typing import Any
|
||||
from typing import Dict
|
||||
|
||||
import configargparse
|
||||
import zope.component
|
||||
@@ -12,8 +14,6 @@ import zope.interface
|
||||
|
||||
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
|
||||
|
||||
@@ -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 client as acme_client
|
||||
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
|
||||
|
||||
@@ -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__)
|
||||
|
||||
@@ -3,12 +3,12 @@ import functools
|
||||
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
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""Facilities for implementing hooks that call shell commands."""
|
||||
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,13 +4,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
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
import itertools
|
||||
import logging
|
||||
import sys
|
||||
from typing import Dict
|
||||
from collections.abc import Mapping
|
||||
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,17 +4,17 @@ import logging
|
||||
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
|
||||
|
||||
@@ -3,15 +3,15 @@ import argparse
|
||||
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
|
||||
|
||||
@@ -7,17 +7,17 @@ import random
|
||||
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
|
||||
@@ -29,6 +29,7 @@ from certbot._internal import storage
|
||||
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__)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -5,8 +5,7 @@ import errno
|
||||
import os # pylint: disable=os-module-forbidden
|
||||
import stat
|
||||
import sys
|
||||
|
||||
from acme.magic_typing import List
|
||||
from typing import List
|
||||
|
||||
try:
|
||||
import ntsecuritycon
|
||||
|
||||
@@ -8,12 +8,12 @@ import logging
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -12,11 +12,11 @@ Other messages can use the `logging` module. See `log.py`.
|
||||
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
|
||||
|
||||
@@ -5,6 +5,8 @@ import logging
|
||||
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 @@ from cryptography.hazmat.primitives import serialization
|
||||
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
|
||||
|
||||
@@ -3,12 +3,12 @@ import logging
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -12,13 +12,13 @@ import re
|
||||
import socket
|
||||
import subprocess
|
||||
import sys
|
||||
from typing import Dict
|
||||
from typing import Text
|
||||
from typing import Tuple
|
||||
from typing import Union
|
||||
|
||||
import configargparse
|
||||
|
||||
from acme.magic_typing import Dict
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user