22.3 Deprecations and changes (#2362)

This commit is contained in:
Adam Hopkins
2022-01-12 16:28:43 +02:00
committed by GitHub
parent 8b0eaa097c
commit 8dfa49b648
11 changed files with 110 additions and 115 deletions

View File

@@ -79,13 +79,6 @@ Or, a path to a directory to run as a simple HTTP server:
error_logger.exception("Failed to run app")
def _precheck(self):
if self.args.debug and self.main_process:
error_logger.warning(
"Starting in v22.3, --debug will no "
"longer automatically run the auto-reloader.\n Switch to "
"--dev to continue using that functionality."
)
# # Custom TLS mismatch handling for better diagnostics
if self.main_process and (
# one of cert/key missing
@@ -174,8 +167,9 @@ Or, a path to a directory to run as a simple HTTP server:
"workers": self.args.workers,
}
if self.args.auto_reload:
kwargs["auto_reload"] = True
for maybe_arg in ("auto_reload", "dev"):
if getattr(self.args, maybe_arg, False):
kwargs[maybe_arg] = True
if self.args.path:
if self.args.auto_reload or self.args.debug:

View File

@@ -180,19 +180,18 @@ class DevelopmentGroup(Group):
"--debug",
dest="debug",
action="store_true",
help="Run the server in debug mode",
help=(
"Run the server in DEBUG mode. It includes DEBUG logging, "
"additional context on exceptions, and other settings "
"not-safe for PRODUCTION, but helpful for debugging problems."
),
)
self.container.add_argument(
"-d",
"--dev",
dest="debug",
dest="dev",
action="store_true",
help=(
"Currently is an alias for --debug. But starting in v22.3, \n"
"--debug will no longer automatically trigger auto_restart. \n"
"However, --dev will continue, effectively making it the \n"
"same as debug + auto_reload."
),
help=("Debug + auto_reload."),
)
self.container.add_argument(
"-r",