News and announcements

armhf, arm64 builds now available in stable PPA

Written for Degu by Jason Gerard DeRose on 2016-05-29

Starting with Degu 0.16, the stable releases PPA now has builds for armhf and arm64!

https://launchpad.net/~novacut/+archive/ubuntu/stable/+packages

Thanks to the Launchpad developers for enabling this feature!

For more details on the Degu 0.16 release, please see:

https://launchpad.net/degu/trunk/0.16

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.store[my_key]

Degu 0.13 also has new high-level API for making and handling HTTP Range requests, see this example in the tutorial:
http://docs.novacut.com/degu/tutorial.html#example-range-requests

For more details on the changes in Degu 0.13, see:
http://docs.novacut.com/degu/changelog.html

Read more

Security fixes in Degu 0.9

Written for Degu by Jason Gerard DeRose on 2014-09-29

Degu 0.9 now carefully restricts what bytes are allowed to exist in the HTTP preamble, and in particular it prevents the NUL byte (b'\x00') from being included in any decoded `str` objects (which could then round-trip back to `bytes` objects).

For more details, please see:
http://docs.novacut.com/degu/changelog.html#september-2014

And see:
http://docs.novacut.com/degu/security.html

Read more

Performance improvements in Degu 0.7

Written for Degu by Jason Gerard DeRose on 2014-08-02

Degu 0.7 brings a C implementation of the `degu.base.read_preamble()` function.

The new `read_preamble()` function is around 318% faster than the pure-Python equivalent in Degu 0.6.

As a result, benchmark.py is now around 20% faster for AF_INET6, and around 26% faster for AF_UNIX (on an Intel® Core™ i7-4900MQ when using the "performance" governor). Note that to reproduce this benchmark, you'll need to copy the benchmark.py script from the Degu 0.7 tree back into the Degu 0.6 tree.

Over time, all of `degu.base` will likely be replaced with a C extension, with a pure-Python reference implementation that can be used as a fallback when the C extension isn't available.

For more details, please see the 0.7 changelog:
http://docs.novacut.com/degu/changelog.html#july-2014

Read more

Breaking API changes in Degu 0.6

Written for Degu by Jason Gerard DeRose on 2014-06-29

There are again breaking API changes in the latest Degu release, this time primarily on the server-side.

For details, please see:
http://docs.novacut.com/degu/changelog.html#june-2014

As the IO abstractions used to represent HTTP request and response bodies have been reworked, there are potentially some breaking API changes on the client-side as well, depending on how you were using the client API.

If you were directly interacting with HTTP chunked transfer-encoding via the client (or server), note that a chunk is now represented by a 2-tuple:

    (data, extension)

When no chunk extension is present for a given chunk, the *extension* will be None:

    (b'The chunk data', None)

Otherwise the *extension* will be a (key, value) 2-tuple:

    (b'The chunk data' ('some-key', 'some-value'))

In terms of the server API, RGI applications now take 2 arguments when handling requests (a *session* and a *request*).

Whereas in Degu 0.5 and earlier you'd implement a simple "hello, world" application like this:

def hello_world_app(request):
    return (200, 'OK', {'content-length': 12}, b'hello, world')

In Degu 0.6 you now implement the same like this:

def hello_world_app(session, request):
    return (200, 'OK', {'content-length': 12}, b'hello, world')

The *request* argument now contains strictly per-request information, whereas the server-wide and per-connection information has been moved into the new *session* argument. Importantly, the same *session* instance is used for all requests handled during the lifetime of a given socket connection.

Read more

15 of 6 results