Browse Source

maint: add requirements minimum version

wangweimin 4 years ago
parent
commit
706b246139
2 changed files with 5 additions and 5 deletions
  1. 2 2
      pywebio/platform/aiohttp.py
  2. 3 3
      setup.py

+ 2 - 2
pywebio/platform/aiohttp.py

@@ -190,8 +190,8 @@ def start_server(applications, port=0, host='', debug=False,
                             websocket_settings=websocket_settings)
 
     app = web.Application(**aiohttp_settings)
-    app.add_routes([web.get('/io', handler)])
-    app.add_routes(static_routes(STATIC_PATH))
+    app.router.add_routes([web.get('/io', handler)])
+    app.router.add_routes(static_routes(STATIC_PATH))
 
     if auto_open_webbrowser:
         asyncio.get_event_loop().create_task(open_webbrowser_on_server_started('localhost', port))

+ 3 - 3
setup.py

@@ -13,9 +13,9 @@ with open('README.md') as f:
     readme = f.read()
 
 extras_require = {
-    'flask': ['flask'],
-    'django': ['django'],
-    'aiohttp': ['aiohttp'],
+    'flask': ['flask>=0.10'],
+    'django': ['django>=2.2'],
+    'aiohttp': ['aiohttp>=3.1'],
     'bokeh': ['bokeh'],
 }
 # 可以使用 pip install pywebio[all] 安装所有额外依赖