Skip to content

Commit 45ddab4

Browse files
Merge branch 'develop' of https://github.com/hugapi/hug into feature/fix-issue-784
2 parents e8498e6 + bd8eb7c commit 45ddab4

File tree

115 files changed

+3830
-2861
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+3830
-2861
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Changelog
1414
=========
1515
### 2.5.1 hotfix - TBD,
1616
- Fixed issue #784 - POST requests broken on 2.5.0
17+
- Optimizations and simplification of async support, taking advantadge of Python3.4 deprecation.
1718

1819
### 2.5.0 - May 4, 2019
1920
- Updated to latest Falcon: 2.0.0

benchmarks/http/bobo_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import bobo
22

33

4-
@bobo.query('/text', content_type='text/plain')
4+
@bobo.query("/text", content_type="text/plain")
55
def text():
6-
return 'Hello, world!'
6+
return "Hello, world!"
77

88

99
app = bobo.Application(bobo_resources=__name__)

benchmarks/http/bottle_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
app = bottle.Bottle()
44

55

6-
@app.route('/text')
6+
@app.route("/text")
77
def text():
8-
return 'Hello, world!'
8+
return "Hello, world!"

benchmarks/http/cherrypy_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33

44
class Root(object):
5-
65
@cherrypy.expose
76
def text(self):
8-
return 'Hello, world!'
7+
return "Hello, world!"
98

109

1110
app = cherrypy.tree.mount(Root())

benchmarks/http/falcon_test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33

44
class Resource(object):
5-
65
def on_get(self, req, resp):
76
resp.status = falcon.HTTP_200
8-
resp.content_type = 'text/plain'
9-
resp.body = 'Hello, world!'
7+
resp.content_type = "text/plain"
8+
resp.body = "Hello, world!"
109

1110

1211
app = falcon.API()
13-
app.add_route('/text', Resource())
12+
app.add_route("/text", Resource())

benchmarks/http/flask_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
app = flask.Flask(__name__)
44

55

6-
@app.route('/text')
6+
@app.route("/text")
77
def text():
8-
return 'Hello, world!'
8+
return "Hello, world!"

benchmarks/http/hug_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import hug
22

33

4-
@hug.get('/text', output_format=hug.output_format.text, parse_body=False)
4+
@hug.get("/text", output_format=hug.output_format.text, parse_body=False)
55
def text():
6-
return 'Hello, World!'
6+
return "Hello, World!"
77

88

99
app = hug.API(__name__).http.server()

benchmarks/http/muffin_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import muffin
22

3-
app = muffin.Application('web')
3+
app = muffin.Application("web")
44

55

6-
@app.register('/text')
6+
@app.register("/text")
77
def text(request):
8-
return 'Hello, World!'
8+
return "Hello, World!"

benchmarks/http/pyramid_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
from pyramid.config import Configurator
33

44

5-
@view_config(route_name='text', renderer='string')
5+
@view_config(route_name="text", renderer="string")
66
def text(request):
7-
return 'Hello, World!'
7+
return "Hello, World!"
88

99

1010
config = Configurator()
1111

12-
config.add_route('text', '/text')
12+
config.add_route("text", "/text")
1313

1414
config.scan()
1515
app = config.make_wsgi_app()

benchmarks/http/tornado_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66

77
class TextHandler(tornado.web.RequestHandler):
88
def get(self):
9-
self.write('Hello, world!')
9+
self.write("Hello, world!")
1010

1111

12-
application = tornado.web.Application([
13-
(r"/text", TextHandler),
14-
])
12+
application = tornado.web.Application([(r"/text", TextHandler)])
1513

1614
if __name__ == "__main__":
1715
application.listen(8000)

0 commit comments

Comments
 (0)