Merge branch 'master' into plugin-stability

This commit is contained in:
Erica Portnoy 2020-07-21 17:55:19 -07:00
commit 223ae53ad9
15 changed files with 65 additions and 20 deletions

View file

@ -237,6 +237,7 @@ Authors
* [Spencer Bliven](https://github.com/sbliven)
* [Stacey Sheldon](https://github.com/solidgoldbomb)
* [Stavros Korokithakis](https://github.com/skorokithakis)
* [Ștefan Talpalaru](https://github.com/stefantalpalaru)
* [Stefan Weil](https://github.com/stweil)
* [Steve Desmond](https://github.com/stevedesmond-ca)
* [sydneyli](https://github.com/sydneyli)

View file

@ -20,3 +20,11 @@ for mod in list(sys.modules):
# preserved (acme.jose.* is josepy.*)
if mod == 'josepy' or mod.startswith('josepy.'):
sys.modules['acme.' + mod.replace('josepy', 'jose', 1)] = sys.modules[mod]
if sys.version_info[:2] == (3, 5):
warnings.warn(
"Python 3.5 support will be dropped in the next release of "
"acme. Please upgrade your Python version.",
PendingDeprecationWarning,
) # pragma: no cover

View file

@ -279,16 +279,17 @@ def load_sample_data_path(workspace):
shutil.copytree(original, copied, symlinks=True)
if os.name == 'nt':
# Fix the symlinks on Windows since GIT is not creating them upon checkout
# Fix the symlinks on Windows if GIT is not configured to create them upon checkout
for lineage in ['a.encryption-example.com', 'b.encryption-example.com']:
current_live = os.path.join(copied, 'live', lineage)
for name in os.listdir(current_live):
if name != 'README':
current_file = os.path.join(current_live, name)
with open(current_file) as file_h:
src = file_h.read()
os.unlink(current_file)
os.symlink(os.path.join(current_live, src), current_file)
if not os.path.islink(current_file):
with open(current_file) as file_h:
src = file_h.read()
os.unlink(current_file)
os.symlink(os.path.join(current_live, src), current_file)
return copied

View file

@ -14,10 +14,10 @@ Named Arguments
DNS to propagate before asking the
ACME server to verify the DNS
record.
(Default: 1200 because Linode
updates its first DNS every 15
minutes and we allow 5 more minutes
for the update to reach the other 5
(Default: 120 because Linode
updates its first DNS every 60
seconds and we allow 60 more seconds
for the update to reach other 5
servers)
========================================== ===================================
@ -80,15 +80,15 @@ Examples
-d www.example.com
.. code-block:: bash
:caption: To acquire a certificate for ``example.com``, waiting 1000 seconds
for DNS propagation (Linode updates its first DNS every 15 minutes
and we allow some extra time for the update to reach the other 5
:caption: To acquire a certificate for ``example.com``, waiting 120 seconds
for DNS propagation (Linode updates its first DNS every minute
and we allow some extra time for the update to reach other 5
servers)
certbot certonly \\
--dns-linode \\
--dns-linode-credentials ~/.secrets/certbot/linode.ini \\
--dns-linode-propagation-seconds 1000 \\
--dns-linode-propagation-seconds 120 \\
-d example.com
"""

View file

@ -32,7 +32,7 @@ class Authenticator(dns_common.DNSAuthenticator):
@classmethod
def add_parser_arguments(cls, add): # pylint: disable=arguments-differ
super(Authenticator, cls).add_parser_arguments(add, default_propagation_seconds=1200)
super(Authenticator, cls).add_parser_arguments(add, default_propagation_seconds=120)
add('credentials', help='Linode credentials INI file.')
def more_info(self): # pylint: disable=missing-function-docstring

View file

@ -12,7 +12,10 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
### Changed
*
* The Linode DNS plugin now waits 120 seconds for DNS propagation, instead of 1200,
due to https://www.linode.com/blog/linode/linode-turns-17/
* We deprecated support for Python 3.5 in Certbot and its ACME library.
Support for Python 3.5 will be removed in the next major release of Certbot.
### Fixed

View file

@ -1,4 +1,13 @@
"""Certbot client."""
import warnings
import sys
# version number like 1.2.3a0, must have at least 2 parts, like 1.2
__version__ = '1.7.0.dev0'
if sys.version_info[:2] == (3, 5):
warnings.warn(
"Python 3.5 support will be dropped in the next release of "
"certbot. Please upgrade your Python version.",
PendingDeprecationWarning,
) # pragma: no cover

View file

@ -1343,6 +1343,10 @@ def main(cli_args=None):
if config.func != plugins_cmd: # pylint: disable=comparison-with-callable
raise
if sys.version_info[:2] == (3, 5):
logger.warning("Python 3.5 support will be dropped in the next release "
"of Certbot - please upgrade your Python version.")
set_displayer(config)
# Reporter

View file

@ -281,6 +281,7 @@ proxmox_ N Y Install certificates in Proxmox Virtualization serv
dns-standalone_ Y N Obtain certificates via an integrated DNS server
dns-ispconfig_ Y N DNS Authentication using ISPConfig as DNS server
dns-clouddns_ Y N DNS Authentication using CloudDNS API
dns-inwx Y Y DNS Authentication for INWX through the XML API
================== ==== ==== ===============================================================
.. _haproxy: https://github.com/greenhost/certbot-haproxy
@ -293,6 +294,7 @@ dns-clouddns_ Y N DNS Authentication using CloudDNS API
.. _dns-standalone: https://github.com/siilike/certbot-dns-standalone
.. _dns-ispconfig: https://github.com/m42e/certbot-dns-ispconfig
.. _dns-clouddns: https://github.com/vshosting/certbot-dns-clouddns
.. _dns-inwx: https://github.com/oGGy990/certbot-dns-inwx/
If you're interested, you can also :ref:`write your own plugin <dev-plugin>`.

View file

@ -83,7 +83,6 @@ elif sys.version_info < (3,3):
dev_extras = [
'coverage',
'ipdb',
'pytest',
'pytest-cov',
'pytest-xdist',
@ -94,6 +93,7 @@ dev_extras = [
dev3_extras = [
'astroid',
'ipdb',
'mypy',
'pylint',
]

View file

@ -15,6 +15,7 @@ description: |
- Help you revoke the certificate if that ever becomes necessary.
confinement: classic
base: core20
grade: stable
adopt-info: certbot
apps:

View file

@ -10,6 +10,7 @@ asn1crypto==0.22.0
astroid==2.3.3
attrs==17.3.0
Babel==2.5.1
backcall==0.2.0
backports.functools-lru-cache==1.5
backports.shutil-get-terminal-size==1.0.0
backports.ssl-match-hostname==3.7.0.1
@ -40,9 +41,10 @@ httplib2==0.10.3
imagesize==0.7.1
importlib-metadata==0.23
ipdb==0.12.3
ipython==5.8.0
ipython==7.9.0
ipython-genutils==0.2.0
isort==4.3.21
jedi==0.17.1
Jinja2==2.9.6
jmespath==0.9.4
josepy==1.1.0
@ -59,13 +61,14 @@ ndg-httpsclient==0.3.2
oauth2client==4.0.0
packaging==19.2
paramiko==2.4.2
parso==0.7.0
pathlib2==2.3.5
pexpect==4.7.0
pickleshare==0.7.5
pkginfo==1.4.2
pluggy==0.13.0
ply==3.4
prompt-toolkit==1.0.18
prompt-toolkit==2.0.10
ptyprocess==0.6.0
py==1.8.0
pyasn1==0.1.9

View file

@ -63,3 +63,10 @@ dns-lexicon==2.2.1
# Tracking at https://github.com/certbot/certbot/issues/6473
boto3==1.4.7
botocore==1.7.41
# Old certbot[dev] constraints
# Old versions of certbot[dev] required ipdb and our normally pinned version of
# ipython which ipdb depends on doesn't support Python 2 so we pin an older
# version here to keep tests working while we have Python 2 support.
ipython==5.8.0
prompt-toolkit==1.0.18

View file

@ -31,11 +31,14 @@ function cleanup() {
trap cleanup EXIT
# NB: We use ARCH-stable-save tag instead of ARCH-stable, because recent versions of snapcraft images
# behave badly on QEMU for arm64 architecture. This should be fixed either by a new version of the
# image that does not have this problem anymore, or the migration to snapcraft remote builds.
docker run \
--rm \
--net=host \
-v "${CERTBOT_DIR}:/certbot" \
-w "/certbot" \
-e "PIP_EXTRA_INDEX_URL=http://localhost:8080" \
"adferrand/snapcraft:${DOCKER_ARCH}-stable" \
"adferrand/snapcraft:${DOCKER_ARCH}-stable-save" \
bash -c "snapcraft clean && snapcraft"

View file

@ -60,6 +60,9 @@ for DNS_PLUGIN in ${DNS_PLUGINS}; do
done
EOF
# NB: We use ARCH-stable-save tag instead of ARCH-stable, because recent versions of snapcraft images
# behave badly on QEMU for arm64 architecture. This should be fixed either by a new version of the
# image that does not have this problem anymore, or the migration to snapcraft remote builds.
docker run \
--rm \
--net=host \
@ -69,5 +72,5 @@ docker run \
-w "/certbot" \
-e "DNS_PLUGINS=${DNS_PLUGINS}" \
-e "PIP_EXTRA_INDEX_URL=http://localhost:8080" \
"adferrand/snapcraft:${DOCKER_ARCH}-stable" \
"adferrand/snapcraft:${DOCKER_ARCH}-stable-save" \
/script.sh