Clarification about aiohttp unsafe usage in PoC

This commit is contained in:
Roberto Abdelkader Martínez Pérez
2019-08-21 13:11:45 +02:00
parent 308ba58479
commit 483056ea16
+10
View File
@@ -400,6 +400,16 @@ class InvalidRouteError(Exception):
class DynamicApplication(web.Application):
"""
A wrapper around `aiohttp.web.Application` allowing changing routes
dynamically.
This is not safe as mentioned here:
https://github.com/aio-libs/aiohttp/issues/3238.
On the other hand this is a PoC anyway...
"""
def change_routes(self, routes):
router = UrlDispatcher()
try: