Remove update symlinks (#9592)

* Add deprecation warning when update_symlinks is run

* Remove information about update_symlinks from help

* ignore our own warning and remove unused imports

* Update changelog
This commit is contained in:
ohemorange
2023-02-22 12:16:28 -08:00
committed by GitHub
parent 2a7eeef176
commit 1cb48eca58
5 changed files with 8 additions and 11 deletions
+2 -1
View File
@@ -6,7 +6,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
### Added
*
* We deprecated support for the update_symlinks command. Support will be removed in a following
version of Certbot.
### Changed
+1 -1
View File
@@ -16,7 +16,7 @@ def _add_all_groups(helpful: "helpful.HelpfulArgumentParser") -> None:
helpful.add_group("paths", description="Flags for changing execution paths & servers")
helpful.add_group("manage",
description="Various subcommands and flags are available for managing your certificates:",
verbs=["certificates", "delete", "renew", "revoke", "update_symlinks", "reconfigure"])
verbs=["certificates", "delete", "renew", "revoke", "reconfigure"])
# VERBS
for verb, docs in VERB_HELP:
@@ -1,7 +1,5 @@
"""This module contain help information for verbs supported by certbot"""
from certbot._internal.cli.cli_constants import SHORT_USAGE
from certbot._internal.cli.cli_utils import flag_default
from certbot.compat import os
# The attributes here are:
# short: a string that will be displayed by "certbot -h commands"
@@ -84,13 +82,6 @@ VERB_HELP = [
"opts": 'Options for the "plugins" subcommand',
"usage": "\n\n certbot plugins [options]\n\n"
}),
("update_symlinks", {
"short": "Recreate symlinks in your /etc/letsencrypt/live/ directory",
"opts": ("Recreates certificate and key symlinks in {0}, if you changed them by hand "
"or edited a renewal configuration file".format(
os.path.join(flag_default("config_dir"), "live"))),
"usage": "\n\n certbot update_symlinks [options]\n\n"
}),
("enhance", {
"short": "Add security enhancements to your existing configuration",
"opts": ("Helps to harden the TLS configuration by adding security enhancements "
+2
View File
@@ -15,6 +15,7 @@ from typing import Optional
from typing import Tuple
from typing import TypeVar
from typing import Union
import warnings
import configobj
import josepy as jose
@@ -1279,6 +1280,7 @@ def update_symlinks(config: configuration.NamespaceConfig,
:rtype: None
"""
warnings.warn("update_symlinks is deprecated and will be removed", PendingDeprecationWarning)
cert_manager.update_live_symlinks(config)
+3
View File
@@ -19,8 +19,11 @@
# unit tests. This warning should be ignored until our (transitive)
# dependency on requests-toolbelt is removed or our pinned version can be
# updated.
# 4) Ignore our own PendingDeprecationWarning about update_symlinks soon to be dropped.
# See https://github.com/certbot/certbot/issues/6284.
filterwarnings =
error
ignore:decodestring\(\) is a deprecated alias:DeprecationWarning:dns
ignore:.*rsyncdir:DeprecationWarning
ignore:'urllib3.contrib.pyopenssl:DeprecationWarning:requests_toolbelt
ignore:update_symlinks is deprecated:PendingDeprecationWarning