Do not require mock in Python 3 in certbot-dns modules (#7900)

Part of #7886.

This PR conditionally installs `mock` in `certbot-dns-*/setup.py` based on setuptools version and python version, when possible. It then updates the tests to use `unittest.mock` when `mock` isn't available.

* Do not require mock in Python 3 in certbot-dns modules

* update changelog

* error when trying to build wheels with old setuptools

* add type: ignores
This commit is contained in:
ohemorange
2020-04-15 11:54:44 -07:00
committed by GitHub
parent af21d1d56e
commit 9c345ac301
29 changed files with 211 additions and 28 deletions
@@ -2,7 +2,10 @@
import unittest
import mock
try:
import mock
except ImportError: # pragma: no cover
from unittest import mock # type: ignore
from requests.exceptions import HTTPError
from certbot.compat import os