diff --git a/sanic/__version__.py b/sanic/__version__.py index 1492d6c4..90a169a0 100644 --- a/sanic/__version__.py +++ b/sanic/__version__.py @@ -5,6 +5,6 @@ from inspect import currentframe, stack for frame_info in stack(): if frame_info.frame is not currentframe(): - for member, value in frame_info.frame.f_globals.items(): - if member.startswith("__") and member.isupper(): - __compatibility__ = value + value = frame_info.frame.f_globals.get("__SANIC_COMPATIBILITY__") + if value: + __compatibility__ = value