Relax attribute lookup in warning about old-styled middleware #2340
Closed
Description
For class-based middleware like
class Middleware:
async def __call__(self, app, handler):
...
there is no __name__ attr.
Moreover I could imaging other situations where __name__ doesn't exists.
It breaks web server starting.
Let's change middleware.__name__ to repr(middleware).
Bugfix should be done in 2.3 branch.