Breaking API changes in Degu 0.13
Written for Degu by Jason Gerard DeRose on 2015-05-24
A significant amount of functionality has been moved from Python to the degu._base C extension, which has also largely been rewritten. Now almost everything that happens at a per-request frequency is handled within the C extension, with minimal calls to Python functions and methods.
This brings some dramatic performance improvements. Compared to Degu 0.12, benchmark.py is now:
141% faster for AF_UNIX
118% faster for AF_INET6
There are also a few major breaking API changes that affect anyone who has implemented RGI server applications atop Degu 0.12.
Most importantly, the RGI *request* argument is now a namedtuple instead of a dict:
request['method'] --> request.method
request['uri'] --> request.uri
request['headers'] --> request.headers
request['body'] --> request.body
request['script'] --> request.script
request['path'] --> request.path
request['query'] --> request.query
And the RGI *session* argument is now a custom object with read-only attributes:
session['client'] --> session.address
session['requests'] --> session.requests
session[my_key] --> session.
Degu 0.13 also has new high-level API for making and handling HTTP Range requests, see this example in the tutorial:
http://
For more details on the changes in Degu 0.13, see:
http://