deprecate None value support for app name (#1705)
* ➖ deprecate None value support for app name * 🚨 cleanup linter issues across the codebase
This commit is contained in:
@@ -46,6 +46,13 @@ class Sanic:
|
||||
|
||||
# Get name from previous stack frame
|
||||
if name is None:
|
||||
warnings.warn(
|
||||
"Sanic(name=None) is deprecated and None value support "
|
||||
"for `name` will be removed in the next release. "
|
||||
"Please use Sanic(name='your_application_name') instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
frame_records = stack()[1]
|
||||
name = getmodulename(frame_records[1])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user