diff --git a/sanic/middleware.py b/sanic/middleware.py deleted file mode 100644 index d19a0288..00000000 --- a/sanic/middleware.py +++ /dev/null @@ -1,4 +0,0 @@ -class Middleware: - def __init__(self, process_request=None, process_response=None): - self.process_request = process_request - self.process_response = process_response diff --git a/sanic/sanic.py b/sanic/sanic.py index f7ed0dc0..aff7188c 100644 --- a/sanic/sanic.py +++ b/sanic/sanic.py @@ -1,12 +1,10 @@ import asyncio from inspect import isawaitable from traceback import format_exc -from types import FunctionType from .config import Config from .exceptions import Handler from .log import log, logging -from .middleware import Middleware from .response import HTTPResponse from .router import Router from .server import serve @@ -80,11 +78,6 @@ class Sanic: attach_to = args[0] return register_middleware - if isinstance(middleware, FunctionType): - middleware = Middleware(process_request=middleware) - - return middleware - # -------------------------------------------------------------------- # # Request Handling # -------------------------------------------------------------------- #