History of changes

v0.7.0 (2016-11-25)

New features (backwards compatible):

  • Made it so that sentinels are instances of themselves <sentinel-type-trickiness>, to enable certain dispatch tricks on the return value of Connection.next_event() (see issue #8 for discussion).
  • Added Data.chunk_start and Data.chunk_end properties to the Data event. These provide the user information about where chunk delimiters are in the data stream from the remote peer when chunked transfer encoding is in use. You probably shouldn’t use these, but sometimes there’s no alternative (see issue #19 for discussion).
  • Expose Response.reason attribute, making it possible to read or set the textual “reason phrase” on responses (issue #13).

Bug fixes:

  • Fix the error message given when a call to an event constructor is missing a required keyword argument (issue #14).
  • Fixed encoding of empty Data events (Data(data=b"")) when using chunked encoding (issue #21).

v0.6.0 (2016-10-24)

This is the first release since we started using h11 to write non-trivial server code, and this experience triggered a number of substantial API changes.

Backwards incompatible changes:

  • Split the old receive_data() into the new receive_data() and next_event(), and replaced the old Paused pseudo-event with the new NEED_DATA and PAUSED sentinels.
  • Simplified the API by replacing the old Connection.state_of(), Connection.client_state, Connection.server_state with the new Connection.states.
  • Renamed the old prepare_to_reuse() to the new start_next_cycle().
  • Removed the Paused pseudo-event.

Backwards compatible changes:

  • State machine: added a DONE -> MUST_CLOSE transition triggered by our peer being in the ERROR state.
  • Split ProtocolError into LocalProtocolError and RemoteProtocolError (see Error handling). Use case: HTTP servers want to be able to distinguish between an error that originates locally (which produce a 500 status code) versus errors caused by remote misbehavior (which produce a 4xx status code).
  • Changed the PRODUCT_ID from h11/<verson> to python-h11/<version>. (This is similar to what requests uses, and much more searchable than plain h11.)

Other changes:

  • Added a minimal benchmark suite, and used it to make a few small optimizations (maybe ~20% speedup?).

v0.5.0 (2016-05-14)

  • Initial release.