Release Notes and Changelog

Release 0.9

Whats new?

Performance improvements

  • The Router now special-cases wsgi.run_once environments to speed up CGI.
  • Reduced module load time by ~30% and optimized template parser. See 8ccb2d, f72a7c and b14b9a for details.
  • Support for “App Caching” on Google App Engine. See af93ec.
  • Some of the rarely used or deprecated features are now plugins that avoid overhead if the feature is not used.

API changes

This release is mostly backward compatible, but some APIs are marked deprecated now and will be removed for the next release. Most noteworthy:

  • The static route parameter is deprecated. You can escape wild-cards with a backslash.
  • Type-based output filters are deprecated. They can easily be replaced with plugins.

Thanks to

Thanks to all the people who found bugs, sent patches, spread the word, helped each other on the mailing-list and made this release possible. You are awesome :) Really, you are.

I hope the following (alphabetically sorted) list is complete. If you miss your name on that list (or want your name removed) please tell me.

Adam R. Smith, Alexey Borzenkov, ‘apheage’, ‘BillMa’, Brandon Gilmore, Branko Vukelic, Damien Degois, David Buxton, Duane Johnson, Frank Murphy, Ian Davis, Itamar Nabriski, ‘iurisilvio’, Jeff Nichols, Jeremy Kelley, ‘joegester’, Jonas Haag, ‘Karl’, ‘Kraken’, Kyle Fritz, ‘m35’, ‘masklinn’, reddit, Santiago Gala, Sean M. Collins, ‘Seth’, Sigurd Høgsbro, Stuart Rackham, Sun Ning, Tomás A. Schertel, Tristan Zajonc, ‘voltron’ and Wieland Hoffmann

Release 0.8

API changes

These changes may break compatibility with previous versions.

  • The built-in Key/Value database is not available anymore. It is marked deprecated since 0.6.4
  • The Route syntax and behaviour changed.
    • Regular expressions must be encapsulated with #. In 0.6 all non-alphanumeric characters not present in the regular expression were allowed.
    • Regular expressions not part of a route wildcard are escaped automatically. You don’t have to escape dots or other regular control characters anymore. In 0.6 the whole URL was interpreted as a regular expression. You can use anonymous wildcards (/index:#(\.html)?#) to achieve a similar behaviour.
  • The BreakTheBottle exception is gone. Use HTTPResponse instead.
  • The SimpleTemplate engine escapes HTML special characters in {{bad_html}} expressions automatically. Use the new {{!good_html}} syntax to get old behaviour (no escaping).
  • The SimpleTemplate engine returns unicode strings instead of lists of byte strings.
  • bottle.optimize() and the automatic route optimization is obsolete.
  • Some functions and attributes were renamed: * Request._environ is now Request.environ * Response.header is now Response.headers * default_app() is obsolete. Use app() instead.
  • The default redirect() code changed from 307 to 303.
  • Removed support for @default. Use @error(404) instead.

New features

This is an incomplete list of new features and improved functionality.

  • The Request object got new properties: Request.body, Request.auth, Request.url, Request.header, Request.forms, Request.files.
  • The Response.set_cookie() and Request.get_cookie() methods are now able to encode and decode python objects. This is called a secure cookie because the encoded values are signed and protected from changes on client side. All pickle-able data structures are allowed.
  • The new Router class drastically improves performance for setups with lots of dynamic routes and supports named routes (named route + dict = URL string).
  • It is now possible (and recommended) to return HTTPError and HTTPResponse instances or other exception objects instead of raising them.
  • The new function static_file() equals send_file() but returns a HTTPResponse or HTTPError instead of raising it. send_file() is deprecated.
  • New get(), post(), put() and delete() decorators.
  • The SimpleTemplate engine got full unicode support.
  • Lots of non-critical bugfixes.

Table Of Contents

Previous topic

Frequently Asked Questions

Next topic

Developer Notes

Like it?

Hosted by:

Cloud VPS Servers