Merge branch 'master' of github.com:kennethreitz/responder

This commit is contained in:
2018-10-23 07:59:07 -04:00
4 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ coverage.xml
__pycache__
tests/__pycache__
*.pyc
build
responder.egg-info/
dist/
+1 -1
View File
@@ -185,7 +185,7 @@ WebSocket Support
Responder supports WebSockets::
@api.ws_route('/ws')
@api.route('/ws', websocket=True)
async def hello(ws):
await ws.accept()
await ws.send_text("Hello via websocket!")
+3 -2
View File
@@ -77,8 +77,9 @@ class Route:
def is_class_based(self):
return hasattr(self.endpoint, "__class__")
@property
def is_function(self):
routed = hasattr(self.endpoint, "is_routed")
is_callable = callable(self.endpoint)
code = hasattr(self.endpoint, "__code__")
kwdefaults = hasattr(self.endpoint, "__kwdefaults__")
return all((routed, code, kwdefaults))
return all((is_callable, code, kwdefaults))
+1 -1
View File
@@ -36,7 +36,7 @@ required = [
"python-multipart",
"chardet",
"apispec>=1.0.0b1",
"marshmallow",
"marshmallow>=3.0.0b7",
"asgiref",
"docopt",
"itsdangerous",