22.9 Docs (#2556)
This commit is contained in:
@@ -72,7 +72,8 @@ def get_ssl_context(
|
||||
"without passing a TLS certificate. If you are developing "
|
||||
"locally, please enable DEVELOPMENT mode and Sanic will "
|
||||
"generate a localhost TLS certificate. For more information "
|
||||
"please see: ___."
|
||||
"please see: https://sanic.dev/en/guide/deployment/development."
|
||||
"html#automatic-tls-certificate."
|
||||
)
|
||||
|
||||
creator = CertCreator.select(
|
||||
@@ -151,7 +152,8 @@ class CertCreator(ABC):
|
||||
raise SanicException(
|
||||
"Sanic could not find package to create a TLS certificate. "
|
||||
"You must have either mkcert or trustme installed. See "
|
||||
"_____ for more details."
|
||||
"https://sanic.dev/en/guide/deployment/development.html"
|
||||
"#automatic-tls-certificate for more details."
|
||||
)
|
||||
|
||||
return creator
|
||||
@@ -203,7 +205,8 @@ class MkcertCreator(CertCreator):
|
||||
"to proceed. Installation instructions can be found here: "
|
||||
"https://github.com/FiloSottile/mkcert.\n"
|
||||
"Find out more information about your options here: "
|
||||
"_____"
|
||||
"https://sanic.dev/en/guide/deployment/development.html#"
|
||||
"automatic-tls-certificate"
|
||||
) from e
|
||||
|
||||
def generate_cert(self, localhost: str) -> ssl.SSLContext:
|
||||
@@ -260,7 +263,8 @@ class TrustmeCreator(CertCreator):
|
||||
"to proceed. Installation instructions can be found here: "
|
||||
"https://github.com/python-trio/trustme.\n"
|
||||
"Find out more information about your options here: "
|
||||
"_____"
|
||||
"https://sanic.dev/en/guide/deployment/development.html#"
|
||||
"automatic-tls-certificate"
|
||||
)
|
||||
|
||||
def generate_cert(self, localhost: str) -> ssl.SSLContext:
|
||||
|
||||
@@ -734,8 +734,7 @@ class StartupMixin(metaclass=SanicMeta):
|
||||
except IndexError:
|
||||
raise RuntimeError(
|
||||
f"No server information found for {primary.name}. Perhaps you "
|
||||
"need to run app.prepare(...)?\n"
|
||||
"See ____ for more information."
|
||||
"need to run app.prepare(...)?"
|
||||
) from None
|
||||
|
||||
socks = []
|
||||
|
||||
@@ -113,13 +113,16 @@ def configure_socket(
|
||||
backlog=backlog,
|
||||
)
|
||||
except OSError as e: # no cov
|
||||
raise ServerError(
|
||||
f"Sanic server could not start: {e}.\n"
|
||||
error = ServerError(
|
||||
f"Sanic server could not start: {e}.\n\n"
|
||||
"This may have happened if you are running Sanic in the "
|
||||
"global scope and not inside of a "
|
||||
'`if __name__ == "__main__"` block. See more information: '
|
||||
"____."
|
||||
) from e
|
||||
'`if __name__ == "__main__"` block.\n\nSee more information: '
|
||||
"https://sanic.dev/en/guide/deployment/manager.html#"
|
||||
"how-sanic-server-starts-processes\n"
|
||||
)
|
||||
error.quiet = True
|
||||
raise error
|
||||
sock.set_inheritable(True)
|
||||
server_settings["sock"] = sock
|
||||
server_settings["host"] = None
|
||||
|
||||
@@ -44,7 +44,9 @@ class SharedContext(SimpleNamespace):
|
||||
f"{Colors.YELLOW}with type {Colors.PURPLE}{type(value)} "
|
||||
f"{Colors.YELLOW}was added to shared_ctx. It may not "
|
||||
"not function as intended. Consider using the regular "
|
||||
f"ctx. For more information, please see ____.{Colors.END}"
|
||||
f"ctx.\nFor more information, please see https://sanic.dev/en"
|
||||
"/guide/deployment/manager.html#using-shared-context-between-"
|
||||
f"worker-processes.{Colors.END}"
|
||||
)
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user