summaryrefslogtreecommitdiff
path: root/docs/changelog.rst
blob: 906d48319d069e5d9a0f420ac1d75bce4d0c011c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
.. highlight:: python
.. currentmodule:: bottle

===========================
Release Notes and Changelog
===========================


Release 0.10
==============

* Plugin API v2

  * To use the new API, set :attr:`Plugin.api` to ``2``.
  * :meth:`Plugin.apply` receives a :class:`Route` object instead of a context dictionary as second parameter. The new object offers some additional information and may be extended in the future.
  * Plugin names are considered unique now. The topmost plugin with a given name on a given route is installed, all other plugins with the same name are silently ignored.

* The Request/Response Objects

  * Added :attr:`BaseRequest.json`, :attr:`BaseRequest.remote_route`, :attr:`BaseRequest.remote_addr`, :attr:`BaseRequest.query` and :attr:`BaseRequest.script_name`.
  * Added :attr:`BaseResponse.status_line` and :attr:`BaseResponse.status_code` attributes. In future releases, :attr:`BaseResponse.status` will return a string (e.g. ``200 OK``) instead of an integer to match the API of other common frameworks. To make the transition as smooth as possible, you should use the verbose attributes from now on.
  * Replaced :class:`MultiDict` with a specialized :class:`FormsDict` in many places. The new dict implementation allows attribute access and handles unicode form values transparently.

* Templates

  * Added three new functions to the SimpleTemplate default namespace that handle undefined variables: :func:`stpl.defined`, :func:`stpl.get` and :func:`stpl.setdefault`.
  * The default escape function for SimpleTemplate now additionally escapes single and double quotes.

* Routing

  * A new route syntax (e.g. ``/object/<id:int>``) and support for route wildcard filters.
  * Four new wildcard filters: `int`, `float`, `path` and `re`.

* Oher changes

  * Added command line interface to load applications and start servers.
  * Introduced a :class:`ConfigDict` that makes accessing configuration a lot easier (attribute access and auto-expanding namespaces).
  * Added support for raw WSGI applications to :meth:`Bottle.mount`.
  * :meth:`Bottle.mount` parameter order changed.
  * :meth:`Bottle.route` now accpets an import string for the ``callback`` parameter.
  * Dropped Gunicorn 0.8 support. Current supported version is 0.13.
  * Added custom options to Gunicorn server.
  * Finally dropped support for type filters. Replace with a custom plugin of needed.


Release 0.9
============

.. rubric:: Whats new?

* A brand new plugin-API. See :ref:`plugins` and :doc:`plugindev` for details.
* The :func:`route` decorator got a lot of new features. See :meth:`Bottle.route` for details.
* New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld <http://meinheld.org/>`_ and `bjoern <https://github.com/jonashaag/bjoern>`_.
* Support for SimpleTAL templates.
* Better runtime exception handling for mako templates in debug mode.
* Lots of documentation, fixes and small improvements.
* A new :data:`Request.urlparts` property.

.. rubric:: Performance improvements

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

.. rubric:: 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.


Release 0.8
============

.. rubric:: 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 :class:`HTTPResponse` instead.
* The :class:`SimpleTemplate` engine escapes HTML special characters in ``{{bad_html}}`` expressions automatically. Use the new ``{{!good_html}}`` syntax to get old behaviour (no escaping).
* The :class:`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:
  * :attr:`Request._environ` is now :attr:`Request.environ`
  * :attr:`Response.header` is now :attr:`Response.headers`
  * :func:`default_app` is obsolete. Use :func:`app` instead.
* The default :func:`redirect` code changed from 307 to 303.
* Removed support for ``@default``. Use ``@error(404)`` instead.

.. rubric:: New features


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

* The :class:`Request` object got new properties: :attr:`Request.body`, :attr:`Request.auth`, :attr:`Request.url`, :attr:`Request.header`, :attr:`Request.forms`, :attr:`Request.files`.
* The :meth:`Response.set_cookie` and :meth:`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 :class:`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 :exc:`HTTPError` and :exc:`HTTPResponse` instances or other exception objects instead of raising them.
* The new function :func:`static_file` equals :func:`send_file` but returns a :exc:`HTTPResponse` or :exc:`HTTPError` instead of raising it. :func:`send_file` is deprecated.
* New :func:`get`, :func:`post`, :func:`put` and :func:`delete` decorators.
* The :class:`SimpleTemplate` engine got full unicode support.
* Lots of non-critical bugfixes.


Contributors
============

Thanks to all the people who found bugs, sent patches, spread the word, helped each other on the mailing-list and made this project 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 :doc:`tell me <contact>`.

  * acasajus
  * Adam R. Smith
  * Alexey Borzenkov
  * Alexis Daboville
  * Anton I. Sipos
  * Anton Kolechkin
  * apexi200sx
  * apheage
  * BillMa
  * Brad Greenlee
  * Brandon Gilmore
  * Branko Vukelic
  * Brian Sierakowski
  * Brian Wickman
  * Carl Scharenberg
  * Damien Degois
  * David Buxton
  * Duane Johnson
  * fcamel
  * Frank Murphy
  * Frederic Junod
  * goldfaber3012
  * Greg Milby
  * gstein
  * Ian Davis
  * Itamar Nabriski
  * Iuri de Silvio
  * Jaimie Murdock
  * Jeff Nichols
  * Jeremy Kelley
  * joegester
  * Johannes Krampf
  * Jonas Haag
  * Joshua Roesslein
  * Karl
  * Kraken
  * Kyle Fritz
  * m35
  * Marcos Neves
  * masklinn
  * Michael Labbe
  * Michael Soulier
  * `reddit <http://reddit.com/r/python>`_
  * Robert Rollins
  * rogererens
  * rwxrwx
  * Santiago Gala
  * Sean M. Collins
  * Sean M. Collins
  * Sebastian Wollrath
  * Seth
  * Sigurd Høgsbro
  * Stuart Rackham
  * Sun Ning
  * Tomás A. Schertel
  * Tristan Zajonc
  * voltron
  * Wieland Hoffmann
  * zombat