<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>bottlepy-dev</title><link href="http://blog.bottlepy.org/" rel="alternate"></link><link href="http://blog.bottlepy.org/feeds/all.atom.xml" rel="self"></link><id>http://blog.bottlepy.org/</id><updated>2013-07-19T18:00:00+02:00</updated><entry><title>Preview: Bottle 0.12</title><link href="http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html" rel="alternate"></link><published>2013-07-19T18:00:00+02:00</published><updated>2013-07-19T18:00:00+02:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2013-07-19:/2013/07/19/preview-bottle-012.html</id><summary type="html">&lt;p&gt;Some time has passed and some really nice features have found their way into the bottle core framework. As we are now preparing for the new release, let me show you the most important changes and &lt;a class="reference external" href="mailto:bottlepy&amp;#64;googlegroups.com"&gt;let us know&lt;/a&gt; what you think about it!&lt;/p&gt;
&lt;p&gt;As promised: All changes are &lt;strong&gt;fully …&lt;/strong&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;Some time has passed and some really nice features have found their way into the bottle core framework. As we are now preparing for the new release, let me show you the most important changes and &lt;a class="reference external" href="mailto:bottlepy&amp;#64;googlegroups.com"&gt;let us know&lt;/a&gt; what you think about it!&lt;/p&gt;
&lt;p&gt;As promised: All changes are &lt;strong&gt;fully backwards compatible&lt;/strong&gt; to the &lt;strong&gt;last stable release (bottle-0.11)&lt;/strong&gt; and all deprecated APIs print a warning to make the transition as easy as possible.&lt;/p&gt;
&lt;div class="section" id="configuration"&gt;
&lt;h2&gt;Configuration&lt;/h2&gt;
&lt;p&gt;Bottle had the &lt;tt class="docutils literal"&gt;app.config&lt;/tt&gt; attribute for a while now, but it was poorly documented  and not very useful in its old state. The &amp;quot;Uppercase attributes are namespaces&amp;quot; feature just felt odd and I have not seen a single project or plugin that actually uses it that way. It was time to re-think the whole application-configuration topic and make it right.&lt;/p&gt;
&lt;p&gt;The new &lt;a class="reference external" href="http://bottlepy.org/docs/dev/configuration.html#bottle.ConfigDict"&gt;ConfigDict()&lt;/a&gt; implementation of the &lt;a class="reference external" href="http://bottlepy.org/docs/dev/api.html#bottle.Bottle.config"&gt;Bottle().config&lt;/a&gt; attribute is &lt;a class="reference external" href="http://bottlepy.org/docs/dev/configuration.html"&gt;well documented&lt;/a&gt; and has some very nice features.&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;strong&gt;Speed:&lt;/strong&gt; &lt;em&gt;ConfigDict&lt;/em&gt; is subclass of &lt;em&gt;dict&lt;/em&gt; and has zero overhead for read operations. Yes, it is as fast as a build-in dictionary for all read operations (item access, the &lt;tt class="docutils literal"&gt;get()&lt;/tt&gt; method and so on).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Namespaces:&lt;/strong&gt; Plugins and applications can use a &lt;tt class="docutils literal"&gt;dot.separated.name_spaces&lt;/tt&gt; scheme to avoid name collisions (e.g. &lt;tt class="docutils literal"&gt;plugin_name.field_name&lt;/tt&gt;). Many features directly support this kind of name-spacing, but it is not enforced.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Config Files:&lt;/strong&gt; The &lt;em&gt;ConfigDict&lt;/em&gt; can load values from &lt;a class="reference external" href="http://docs.python.org/2/library/configparser.html"&gt;ini-style config files&lt;/a&gt; or nested dictionaries (e.g. from json or YAML files).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Config Hook&lt;/strong&gt;: The application is notified on changes to the config dictionary and fires the new &lt;tt class="docutils literal"&gt;config&lt;/tt&gt; hook. Plugins can listen to that hook and re-configure themselves at run-time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Meta Fields and Validators:&lt;/strong&gt; Next to the actual value, each config key can be associated with named meta fields that offers a lot of possibilities. Currently implemented is the &lt;tt class="docutils literal"&gt;filter&lt;/tt&gt; field. If this field holds a callable, that callable is used to filter new values as soon as they are assigned to the associated config key. Plugins can implement validators or just enforce a specific type for their config values this way. I am sure we find other use cases in the future. Oh, and the &lt;tt class="docutils literal"&gt;help&lt;/tt&gt; meta field may be displayed by a future in-browser administration tool, perhaps? &lt;em&gt;*hint hint*&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For examples and more details have a look at the new &lt;a class="reference external" href="http://bottlepy.org/docs/dev/configuration.html"&gt;Configuration article&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="routing"&gt;
&lt;h2&gt;Routing&lt;/h2&gt;
&lt;p&gt;Thanks to the awesome work of &lt;em&gt;Nicolas Vanhoren&lt;/em&gt;, we got rid of the &lt;a class="reference external" href="http://bottlepy.org/docs/0.11/routing.html#routing-order"&gt;routing order problems with overlapping rules&lt;/a&gt; that were caused by our optimization code. The new implementation is as fast as the old one (slightly faster for some scenarios), but without the reordering and grouping special cases of the old implementation.&lt;/p&gt;
&lt;p&gt;Additionally we added &lt;a class="reference external" href="http://bottlepy.org/docs/dev/api.html#bottle.Route.get_undecorated_callback"&gt;Route.get_undecorated_callback()&lt;/a&gt; and &lt;a class="reference external" href="http://bottlepy.org/docs/dev/api.html#bottle.Route.get_callback_args"&gt;Route.get_callback_args()&lt;/a&gt; to allow inspection of the request callback even if decorators were applied directly (not using the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;route(apply=...)&lt;/span&gt;&lt;/tt&gt; feature).&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="templating"&gt;
&lt;h2&gt;Templating&lt;/h2&gt;
&lt;p&gt;Our built-in template engine called &amp;quot;SimpleTemplate&amp;quot; (or &lt;cite&gt;stpl&lt;/cite&gt; for short) got a lot of attention in 0.12! Most of the changes are internal, but some new features were added, too:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;strong&gt;Multiline Code Blocks:&lt;/strong&gt; Instead of starting each code line with a &lt;tt class="docutils literal"&gt;%&lt;/tt&gt;, you can now use &lt;tt class="docutils literal"&gt;&amp;lt;?&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;?&amp;gt;&lt;/span&gt;&lt;/tt&gt; to mark a whole block of python code. That should save a lot of typing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Include/rebase Functions:&lt;/strong&gt; The &lt;tt class="docutils literal"&gt;include&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;rebase&lt;/tt&gt; keywords are functions now. The most important benefit is that you can specify the target template in a variable (e.g. &lt;tt class="docutils literal"&gt;% include(variable_with_template_name, &lt;span class="pre"&gt;...)&lt;/span&gt;&lt;/tt&gt;). Apart from that, we follow the Python3 philosophy (print as a function) and reduce unnecessary magic with this decision. By the way: &lt;tt class="docutils literal"&gt;include()&lt;/tt&gt; returns the namespace of the included template. Nice, eh?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Documentation is still lacking though. Anyone?&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="file-uploads"&gt;
&lt;h2&gt;File Uploads&lt;/h2&gt;
&lt;p&gt;The &lt;tt class="docutils literal"&gt;cgi.FieldStorage&lt;/tt&gt; API is poorly documented and behaves... strange in some ways. We replaced it with &lt;a class="reference external" href="http://bottlepy.org/docs/dev/api.html#bottle.FileUpload"&gt;FileUpload()&lt;/a&gt;, a new class that has some very nice additional features.&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;strong&gt;Safe Filename:&lt;/strong&gt; The &lt;tt class="docutils literal"&gt;.filename&lt;/tt&gt; attribute contains a normalized version of the client side file name to ensure maximum file system compatibility (lowercase, no whitespace, no path separators, no unsafe characters, ASCII only).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Save to Disk:&lt;/strong&gt; &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;FileUpload().save(destination,&lt;/span&gt; overwrite=False)&lt;/tt&gt; saves a file upload to disk or copies its content to an open file(-like) object in a memory-efficient way. You can specify a directory as destination. In that case the &lt;tt class="docutils literal"&gt;.filename&lt;/tt&gt; attribute is added to the path automatically. Existing files are not overwritten, unless you explicitly allow it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Apart from that, it is mostly compatible with the old &lt;tt class="docutils literal"&gt;cgi.FieldStorage&lt;/tt&gt; API.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="documentation"&gt;
&lt;h2&gt;Documentation&lt;/h2&gt;
&lt;p&gt;Yes, we have a &lt;a class="reference external" href="http://bottlepy.org/docs/dev-cn/"&gt;Chinese translation&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
</content><category term="preview"></category></entry><entry><title>Bottle 0.11 released!</title><link href="http://blog.bottlepy.org/2012/10/09/bottle-011-released.html" rel="alternate"></link><published>2012-10-09T00:00:00+02:00</published><updated>2012-10-09T00:00:00+02:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2012-10-09:/2012/10/09/bottle-011-released.html</id><summary type="html">&lt;p&gt;The bottle-0.11-rc1 development branch is stable for some time now, widely used and excessively tested. There is no reason to not release it. So, here it is:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;PyPi: &lt;a class="reference external" href="http://pypi.python.org/pypi/bottle"&gt;bottle-0.11 (stable)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Changelog: &lt;a class="reference external" href="http://bottlepy.org/docs/0.11/changelog.html#release-0-11"&gt;http://bottlepy.org/docs/0.11/changelog.html#release-0-11&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="section" id="changelog-summary"&gt;
&lt;h2&gt;Changelog (summary)&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;strong&gt;Native support for Python 2.x …&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;The bottle-0.11-rc1 development branch is stable for some time now, widely used and excessively tested. There is no reason to not release it. So, here it is:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;PyPi: &lt;a class="reference external" href="http://pypi.python.org/pypi/bottle"&gt;bottle-0.11 (stable)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Changelog: &lt;a class="reference external" href="http://bottlepy.org/docs/0.11/changelog.html#release-0-11"&gt;http://bottlepy.org/docs/0.11/changelog.html#release-0-11&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="section" id="changelog-summary"&gt;
&lt;h2&gt;Changelog (summary)&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;strong&gt;Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Python 3.3 added to the list of officially supported versions (2.5, 2.6, 2.7, 3.1, 3.2, 3.3)&lt;/li&gt;
&lt;li&gt;Support for partial downloads (&lt;tt class="docutils literal"&gt;Range&lt;/tt&gt; header) in &lt;tt class="docutils literal"&gt;static_file()&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;The new &lt;cite&gt;ResourceManager&lt;/cite&gt; interface helps locating files bundled with an application.&lt;/li&gt;
&lt;li&gt;Added a server adapter for &lt;a class="reference external" href="http://docs.pylonsproject.org/projects/waitress/en/latest/"&gt;waitress&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;New &lt;cite&gt;Bottle.merge()&lt;/cite&gt; method to install all routes from one application into another.&lt;/li&gt;
&lt;li&gt;New &lt;cite&gt;Request.app&lt;/cite&gt; property to get the application object that handles a request.&lt;/li&gt;
&lt;li&gt;Added &lt;cite&gt;FormsDict.decode()&lt;/cite&gt; to get an all-unicode version (for WTForms).&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="upgrade-notes"&gt;
&lt;h2&gt;Upgrade Notes&lt;/h2&gt;
&lt;p&gt;With this new release, bottle-0.10 becomes 'old stable' and support for bottle-0.9 runs out. If you are still using bottle-0.9 (or lower), you should consider upgrading. Bug-fixes are only provided for 'stable' and 'old stable'.&lt;/p&gt;
&lt;p&gt;Bottle maintains backwards compatibility to 'old stable' as usual. If you fixed all deprecation warnings in your bottle-0.10 application, it should run just fine after the upgrade.&lt;/p&gt;
&lt;/div&gt;
</content></entry><entry><title>Template Search-Path Workaround</title><link href="http://blog.bottlepy.org/2012/07/20/template-search-path-workaround.html" rel="alternate"></link><published>2012-07-20T17:00:00+02:00</published><updated>2012-07-20T17:00:00+02:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2012-07-20:/2012/07/20/template-search-path-workaround.html</id><summary type="html">&lt;p&gt;One of the most annoying limitations you may encounter in bottle when building bigger applications is the way templates are searched on the file system. At the time the
template system was designed, nobody thought about multi-app projects, third-party apps, &lt;tt class="docutils literal"&gt;Bottle.mount()&lt;/tt&gt; and the complexities these features introduce. The typical …&lt;/p&gt;</summary><content type="html">&lt;p&gt;One of the most annoying limitations you may encounter in bottle when building bigger applications is the way templates are searched on the file system. At the time the
template system was designed, nobody thought about multi-app projects, third-party apps, &lt;tt class="docutils literal"&gt;Bottle.mount()&lt;/tt&gt; and the complexities these features introduce. The typical
bottle applications consisted of one application in a single file. Using module-globals (e.g. &lt;tt class="docutils literal"&gt;bottle.TEMPLATE_PATH&lt;/tt&gt;) just worked.&lt;/p&gt;
&lt;p&gt;Today, Bottle is more a general-purpose low-overhead framework than a micro-framework. We still focus on small applications, but try to remove the limitations so the
framework can grow with your project. Plugins and the ability to mount sub-applications are just two examples.&lt;/p&gt;
&lt;div class="section" id="the-problem"&gt;
&lt;h2&gt;The Problem&lt;/h2&gt;
&lt;p&gt;Currently, Bottle uses a global list of search paths (&lt;tt class="docutils literal"&gt;bottle.TEMPLATE_PATH&lt;/tt&gt;) to find templates on the file system. Even worse, this list contains relative paths. This
might break in two ways:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Your current working directory (&lt;tt class="docutils literal"&gt;./&lt;/tt&gt;) is not where you expect it to be.&lt;/li&gt;
&lt;li&gt;You run more than one bottle application at the same time.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The first is &lt;a class="reference external" href="http://bottlepy.org/docs/dev/faq.html#template-not-found-in-mod-wsgi-mod-python"&gt;covered in the docs&lt;/a&gt;. The second scenario is a bit more tricky.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="workaround"&gt;
&lt;h2&gt;Workaround&lt;/h2&gt;
&lt;p&gt;The obvious solution is to make templates and their configuration application-bound. Then you could define separate search paths for each application and make them
relative to the applications install path. We are working on a feature that does exactly this.&lt;/p&gt;
&lt;p&gt;While this feature is in the works, this workaround might help:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;bottle&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;os.path&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;functools&lt;/span&gt;

&lt;span class="c1"&gt;# Create a new list with absolute paths&lt;/span&gt;
&lt;span class="n"&gt;MY_TEMPLATE_PATH&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
   &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;abspath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="vm"&gt;__file__&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;./views&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# Patch @view() so it uses the customized path list instead of the global one&lt;/span&gt;
&lt;span class="n"&gt;view&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;functools&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;partial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bottle&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;template_lookup&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;MY_TEMPLATE_PATH&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Sill, this does not solve all problems. Templates are cached by their name. If two applications load different templates that have the same name, they mix up.&lt;/p&gt;
&lt;p&gt;To get this workaround to actually work, I implemented a &lt;a class="reference external" href="https://github.com/bottlepy/bottle/commit/cecbd04fc80e44f0b422b5bb7a894563102bed7f"&gt;quick fix&lt;/a&gt; and
pushed it to the repository. The ID of the template lookup path list is now part of the cache key. It’s not a perfect solution, but at least allows for a
decent workaround while we are working on a &lt;cite&gt;real&lt;/cite&gt; solution.&lt;/p&gt;
&lt;/div&gt;
</content><category term="workaround templates"></category></entry><entry><title>Virtualenv and Makefiles</title><link href="http://blog.bottlepy.org/2012/07/16/virtualenv-and-makefiles.html" rel="alternate"></link><published>2012-07-16T00:00:00+02:00</published><updated>2012-07-16T00:00:00+02:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2012-07-16:/2012/07/16/virtualenv-and-makefiles.html</id><summary type="html">&lt;p&gt;Whenever I start a new project that is likely to have dependencies, I set up &lt;a class="reference external" href="http://www.virtualenv.org/"&gt;virtualenv&lt;/a&gt; and create a &lt;a class="reference external" href="http://www.pip-installer.org/en/latest/requirements.html"&gt;requirememnts.txt&lt;/a&gt;. I am also a big fan of &lt;a class="reference external" href="http://www.gnu.org/software/make/manual/make.html"&gt;Makefiles&lt;/a&gt;. Here is a small snippet that combines these tools:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c"&gt;# Makefile&lt;/span&gt;
&lt;span class="nf"&gt;venv&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;venv&lt;/span&gt;/&lt;span class="n"&gt;bin&lt;/span&gt;/&lt;span class="n"&gt;activate&lt;/span&gt;
&lt;span class="nf"&gt;venv/bin/activate&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;requirements&lt;/span&gt;.&lt;span class="n"&gt;txt&lt;/span&gt;
    &lt;span class="nb"&gt;test&lt;/span&gt; -d …&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;Whenever I start a new project that is likely to have dependencies, I set up &lt;a class="reference external" href="http://www.virtualenv.org/"&gt;virtualenv&lt;/a&gt; and create a &lt;a class="reference external" href="http://www.pip-installer.org/en/latest/requirements.html"&gt;requirememnts.txt&lt;/a&gt;. I am also a big fan of &lt;a class="reference external" href="http://www.gnu.org/software/make/manual/make.html"&gt;Makefiles&lt;/a&gt;. Here is a small snippet that combines these tools:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c"&gt;# Makefile&lt;/span&gt;
&lt;span class="nf"&gt;venv&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;venv&lt;/span&gt;/&lt;span class="n"&gt;bin&lt;/span&gt;/&lt;span class="n"&gt;activate&lt;/span&gt;
&lt;span class="nf"&gt;venv/bin/activate&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;requirements&lt;/span&gt;.&lt;span class="n"&gt;txt&lt;/span&gt;
    &lt;span class="nb"&gt;test&lt;/span&gt; -d venv &lt;span class="o"&gt;||&lt;/span&gt; virtualenv venv
    venv/bin/pip install -Ur requirements.txt
    touch venv/bin/activate
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So, what does it do? The &lt;tt class="docutils literal"&gt;venv&lt;/tt&gt; target builds your virtual environment and keeps it in sync with your &lt;tt class="docutils literal"&gt;requirements.txt&lt;/tt&gt;. If everything is up-to-date, nothing happens. You can use the &lt;cite&gt;venv&lt;/cite&gt; target as a dependency for other targets or call &lt;tt class="docutils literal"&gt;make venv&lt;/tt&gt; to build or update the virtual environment manually. Just as an example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nf"&gt;devbuild&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;venv&lt;/span&gt;
    venv/bin/python setup.py install

&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;devbuild&lt;/span&gt;
    venv/bin/python test/runtests.py
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Nothing special, but very handy. Especially if your users are new to python and don't know much about virtual environments.&lt;/p&gt;
</content></entry><entry><title>Thread-locals and Generators</title><link href="http://blog.bottlepy.org/2012/07/13/thread-locals-and-generators.html" rel="alternate"></link><published>2012-07-13T00:00:00+02:00</published><updated>2012-07-13T00:00:00+02:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2012-07-13:/2012/07/13/thread-locals-and-generators.html</id><summary type="html">&lt;p&gt;Looks like the next release (0.11) will break backwards compatibility in some edge cases. I am working on a patch that affects routes that stream content (yield) and access request/response after the first chunk of data is returned.&lt;/p&gt;
&lt;div class="section" id="details"&gt;
&lt;h2&gt;Details&lt;/h2&gt;
&lt;p&gt;Accessing the thread-local request/response objects after yielding a …&lt;/p&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;Looks like the next release (0.11) will break backwards compatibility in some edge cases. I am working on a patch that affects routes that stream content (yield) and access request/response after the first chunk of data is returned.&lt;/p&gt;
&lt;div class="section" id="details"&gt;
&lt;h2&gt;Details&lt;/h2&gt;
&lt;p&gt;Accessing the thread-local request/response objects after yielding a chunk of data works most of the time, but is a bad idea anyway. The request context (the state of request/response) is undefined at that point. As soon as the route callback yields data, Bottle hands the response over to the WSGI server and is no longer in control. The server might start a new thread to send the stream to a client and thus break the thread-local request/response proxies. That'd be a very subtle bug and hard-to-debug scenario.&lt;/p&gt;
&lt;p&gt;It worked until now because bottle does not delete the context, it just overwrites it as soon as a new request arrives.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="whats-new"&gt;
&lt;h2&gt;Whats new?&lt;/h2&gt;
&lt;p&gt;The thread-local request/response proxies will raise a RuntimeError() if they are accessed outside of a request-cycle (before a request or after the first chunk of data is returned).&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="how-to-upgrade"&gt;
&lt;h2&gt;How to upgrade?&lt;/h2&gt;
&lt;p&gt;There are two new ways to get a real, local, persistent instance to the current request object: bottle.get_current_request() and bottle.request.get_current(). The object returned by these functions survives as long as you keep the reference around:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nd"&gt;@route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/stream&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="c1"&gt;# Get a local reference BEFORE returning data&lt;/span&gt;
    &lt;span class="n"&gt;local_request&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_current&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="c1"&gt;# Now we can use that instead of the global proxy&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Hello &lt;/span&gt;&lt;span class="si"&gt;%s&lt;/span&gt;&lt;span class="s1"&gt;!&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;local_request&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;forms&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;As said above, the change is not committed yet. I am still experimenting. Just wanted to write it down to clear my head. The matter is even more complicated than explained here.
Diesen Beitrag minimieren&lt;/p&gt;
&lt;/div&gt;
</content></entry><entry><title>Bugfix Release 0.10.10</title><link href="http://blog.bottlepy.org/2012/06/26/bugfix-release-01010.html" rel="alternate"></link><published>2012-06-26T00:00:00+02:00</published><updated>2012-06-26T00:00:00+02:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2012-06-26:/2012/06/26/bugfix-release-01010.html</id><summary type="html">&lt;p&gt;Python 3.2+ cgi.FieldStorage() defaults to utf8 when decoding form values. That confused bottle.FormsDict() because WSGI strings &amp;quot;must contain only code points representable in ISO-8859-1 encoding&amp;quot;. Now bottle forces cgi.FieldStorage() to use ISO-8859-1 instead and re-encodes form-values on-demand with the user-specified input encoding a intended.&lt;/p&gt;
&lt;p&gt;If you …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Python 3.2+ cgi.FieldStorage() defaults to utf8 when decoding form values. That confused bottle.FormsDict() because WSGI strings &amp;quot;must contain only code points representable in ISO-8859-1 encoding&amp;quot;. Now bottle forces cgi.FieldStorage() to use ISO-8859-1 instead and re-encodes form-values on-demand with the user-specified input encoding a intended.&lt;/p&gt;
&lt;p&gt;If you are getting encoding errors after this fix, note that the form-dictionaries contain unaltered strings as sent by the client. Only the .getunicode() method and the attribute access methods honor a user-defined input encoding.&lt;/p&gt;
&lt;p&gt;EDIT: Here is how it works now: &lt;a class="reference external" href="http://bottlepy.org/docs/dev/tutorial.html#unicode-issues"&gt;http://bottlepy.org/docs/dev/tutorial.html#unicode-issues&lt;/a&gt;&lt;/p&gt;
</content></entry><entry><title>Bugfix Release 0.10.11</title><link href="http://blog.bottlepy.org/2012/06/26/bugfix-release-01011.html" rel="alternate"></link><published>2012-06-26T00:00:00+02:00</published><updated>2012-06-26T00:00:00+02:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2012-06-26:/2012/06/26/bugfix-release-01011.html</id><summary type="html">&lt;p&gt;The Python 3.x unicode problem was more complex than I thought. I had to re-implement urllib.parse_qsl to work around an encoding problem in 3.1 and change the way bottle handles query-strings in subtle ways. Again, please read this before upgrading: &lt;a class="reference external" href="http://bottlepy.org/docs/dev/tutorial.html#unicode-issues"&gt;http://bottlepy.org/docs/dev/tutorial.html …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;The Python 3.x unicode problem was more complex than I thought. I had to re-implement urllib.parse_qsl to work around an encoding problem in 3.1 and change the way bottle handles query-strings in subtle ways. Again, please read this before upgrading: &lt;a class="reference external" href="http://bottlepy.org/docs/dev/tutorial.html#unicode-issues"&gt;http://bottlepy.org/docs/dev/tutorial.html#unicode-issues&lt;/a&gt;&lt;/p&gt;
</content></entry><entry><title>TAL Templates deprecated</title><link href="http://blog.bottlepy.org/2012/05/14/tal-templates-deprecated.html" rel="alternate"></link><published>2012-05-14T00:00:00+02:00</published><updated>2012-05-14T00:00:00+02:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2012-05-14:/2012/05/14/tal-templates-deprecated.html</id><summary type="html">&lt;p&gt;Andrea Belvedere found a bug in SimpleTALTemplates that went unnoticed for months. Conclusion: Nobody actually uses Bottle+TAL.&lt;/p&gt;
&lt;p&gt;Perhaps it is a good time to remove SimpleTALTemplate support instead of fixing it. Or move it to a plugin.&lt;/p&gt;
&lt;p&gt;Here is the deal: The TAL template adapter needs a maintainer or …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Andrea Belvedere found a bug in SimpleTALTemplates that went unnoticed for months. Conclusion: Nobody actually uses Bottle+TAL.&lt;/p&gt;
&lt;p&gt;Perhaps it is a good time to remove SimpleTALTemplate support instead of fixing it. Or move it to a plugin.&lt;/p&gt;
&lt;p&gt;Here is the deal: The TAL template adapter needs a maintainer or support will be removed within the next two releases.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://github.com/bottlepy/bottle/issues/322"&gt;https://github.com/bottlepy/bottle/issues/322&lt;/a&gt;&lt;/p&gt;
</content></entry><entry><title>Custom Request Attributes</title><link href="http://blog.bottlepy.org/2012/04/04/custom-request-attributes.html" rel="alternate"></link><published>2012-04-04T00:00:00+02:00</published><updated>2012-04-04T00:00:00+02:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2012-04-04:/2012/04/04/custom-request-attributes.html</id><summary type="html">&lt;p&gt;This might be useful for Plugin developers:
&lt;a class="reference external" href="https://github.com/bottlepy/bottle/commit/a21d71694fdea222844dba5076efad3726ccdb68"&gt;https://github.com/bottlepy/bottle/commit/a21d71694fdea222844dba5076efad3726ccdb68&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To sum it up: You can now add custom attributes or properties to the bottle.request object. These are stored in the environ dictionary ('bottle.request.ext.*' namespace) which has some advantages over traditional instance attributes …&lt;/p&gt;</summary><content type="html">&lt;p&gt;This might be useful for Plugin developers:
&lt;a class="reference external" href="https://github.com/bottlepy/bottle/commit/a21d71694fdea222844dba5076efad3726ccdb68"&gt;https://github.com/bottlepy/bottle/commit/a21d71694fdea222844dba5076efad3726ccdb68&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To sum it up: You can now add custom attributes or properties to the bottle.request object. These are stored in the environ dictionary ('bottle.request.ext.*' namespace) which has some advantages over traditional instance attributes:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;User defined attributes don't leak into other requests.&lt;/li&gt;
&lt;li&gt;They are garbage-collected soon after the request is over.&lt;/li&gt;
&lt;li&gt;You can add or read these values from low-level middleware or via plugins.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Something like bottle.request.db or bottle.request.session is now feasible. You can add methods, too (using types.MethodType(func, bottle.request)).&lt;/p&gt;
</content></entry><entry><title>Bottlepy.org offline</title><link href="http://blog.bottlepy.org/2012/02/17/bottlepyorg-offline.html" rel="alternate"></link><published>2012-02-17T00:00:00+01:00</published><updated>2012-02-17T00:00:00+01:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2012-02-17:/2012/02/17/bottlepyorg-offline.html</id><summary type="html">&lt;p&gt;My server harddisk died today. Until I get a new one installed, you can use the mirror at &lt;a class="reference external" href="http://readthedocs.org/docs/bottle/en/latest/"&gt;http://readthedocs.org/docs/bottle/en/latest/&lt;/a&gt;&lt;/p&gt;
</summary><content type="html">&lt;p&gt;My server harddisk died today. Until I get a new one installed, you can use the mirror at &lt;a class="reference external" href="http://readthedocs.org/docs/bottle/en/latest/"&gt;http://readthedocs.org/docs/bottle/en/latest/&lt;/a&gt;&lt;/p&gt;
</content></entry><entry><title>Bugfix Release 0.10.7</title><link href="http://blog.bottlepy.org/2011/12/28/bugfix-release-0107.html" rel="alternate"></link><published>2011-12-28T00:00:00+01:00</published><updated>2011-12-28T00:00:00+01:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2011-12-28:/2011/12/28/bugfix-release-0107.html</id><summary type="html">&lt;p&gt;I just released 0.10.7 (security release). It fixes a possible DoS vulnerability that is caused by hash collisions in CPython dicts.&lt;/p&gt;
&lt;p&gt;This bug is not specific to bottle. I you are using other frameworks, check for updates there too.&lt;/p&gt;
&lt;p&gt;Details: &lt;a class="reference external" href="https://cryptanalysis.eu/blog/2011/12/28/effective-dos-attacks-against-web-application-plattforms-hashdos/"&gt;https://cryptanalysis.eu/blog/2011/12/28/effective-dos-attacks-against-web-application-plattforms-hashdos …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;I just released 0.10.7 (security release). It fixes a possible DoS vulnerability that is caused by hash collisions in CPython dicts.&lt;/p&gt;
&lt;p&gt;This bug is not specific to bottle. I you are using other frameworks, check for updates there too.&lt;/p&gt;
&lt;p&gt;Details: &lt;a class="reference external" href="https://cryptanalysis.eu/blog/2011/12/28/effective-dos-attacks-against-web-application-plattforms-hashdos/"&gt;https://cryptanalysis.eu/blog/2011/12/28/effective-dos-attacks-against-web-application-plattforms-hashdos/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;If the language does not provide a randomized hash function or the application server does not recognize attacks using multi-collisions, an attacker can degenerate the hash table by sending lots of colliding keys. The algorithmic complexity of inserting n elements into the table then goes to O(n**2), making it possible to exhaust hours of CPU time using a single HTTP request.&amp;quot;&lt;/p&gt;
&lt;p&gt;This workaround limits the number of GET, POST and cookie parameters to a reasonable number of 100 key/value pairs per request, reducing the effectiveness of attacks. Normal web applications should not need to process more than 100 parameters per request, but this limit can be changed by setting Request.MAX_PARAMS to a different value.&lt;/p&gt;
&lt;p&gt;Some more links:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="http://events.ccc.de/congress/2011/Fahrplan/events/4680.en.html"&gt;http://events.ccc.de/congress/2011/Fahrplan/events/4680.en.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://www.nruns.com/_downloads/advisory28122011.pdf"&gt;http://www.nruns.com/_downloads/advisory28122011.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/bottlepy/bottle/commit/6946695b69f5493fb063c351400ff759323a31aa"&gt;https://github.com/bottlepy/bottle/commit/6946695b69f5493fb063c351400ff759323a31aa&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content></entry><entry><title>Bugfix Release 0.9.8 and 0.10.5</title><link href="http://blog.bottlepy.org/2011/12/22/bugfix-release-098-and-0105.html" rel="alternate"></link><published>2011-12-22T00:00:00+01:00</published><updated>2011-12-22T00:00:00+01:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2011-12-22:/2011/12/22/bugfix-release-098-and-0105.html</id><summary type="html">&lt;p&gt;I just released 0.10.5 and 0.9.8. Both are security bugfix releases and recommended for everyone. Here is a brief summary of the changes:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Critical errors (errors within the framework code) resulted in an error page that was not protected against XSS attacks (because the template engine …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;I just released 0.10.5 and 0.9.8. Both are security bugfix releases and recommended for everyone. Here is a brief summary of the changes:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Critical errors (errors within the framework code) resulted in an error page that was not protected against XSS attacks (because the template engine is not used for this kind of errors).&lt;/li&gt;
&lt;li&gt;Exceptions with unicode messages that contained non-ascii characters broke the default error handler and caused a critical error.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And before you ask: 0.10.4 -&amp;gt; 0.10.5 fixed a NameError in the back-ported code for the first bug. Sorry for that, I was in a hurry.&lt;/p&gt;
</content></entry><entry><title>Native Py3k support merged</title><link href="http://blog.bottlepy.org/2011/12/20/native-py3k-support-merged.html" rel="alternate"></link><published>2011-12-20T00:00:00+01:00</published><updated>2011-12-20T00:00:00+01:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2011-12-20:/2011/12/20/native-py3k-support-merged.html</id><summary type="html">&lt;p&gt;It was a lot of work, but I could finally drop the 2to3 requirement! The Bottle sources now support Python 2.5, 2.6, 2.7, 3,1 and 3.2 natively. All tests pass. No measurable performance drawback. Full backwards compatible. Its pure win :)&lt;/p&gt;
&lt;p&gt;You can test it directly …&lt;/p&gt;</summary><content type="html">&lt;p&gt;It was a lot of work, but I could finally drop the 2to3 requirement! The Bottle sources now support Python 2.5, 2.6, 2.7, 3,1 and 3.2 natively. All tests pass. No measurable performance drawback. Full backwards compatible. Its pure win :)&lt;/p&gt;
&lt;p&gt;You can test it directly: &lt;a class="reference external" href="http://bottlepy.org/bottle.py"&gt;http://bottlepy.org/bottle.py&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thank to Ralf and Esteban for their help.&lt;/p&gt;
</content></entry><entry><title>Bottle 0.10 released!</title><link href="http://blog.bottlepy.org/2011/11/26/bottle-010-released.html" rel="alternate"></link><published>2011-11-26T00:00:00+01:00</published><updated>2011-11-26T00:00:00+01:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2011-11-26:/2011/11/26/bottle-010-released.html</id><summary type="html">&lt;p&gt;There is a lot of new stuff this time: A CLI interface, new routing syntax and lots of convenient helpers for request/response objects and templates. The change-log will tell you more.&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Changelog: &lt;a class="reference external" href="http://bottlepy.org/docs/0.10/changelog.html#release-0-10"&gt;http://bottlepy.org/docs/0.10/changelog.html#release-0-10&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;PyPi link: &lt;a class="reference external" href="http://pypi.python.org/pypi/bottle/0.10.1"&gt;http://pypi.python.org/pypi/bottle …&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;There is a lot of new stuff this time: A CLI interface, new routing syntax and lots of convenient helpers for request/response objects and templates. The change-log will tell you more.&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Changelog: &lt;a class="reference external" href="http://bottlepy.org/docs/0.10/changelog.html#release-0-10"&gt;http://bottlepy.org/docs/0.10/changelog.html#release-0-10&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;PyPi link: &lt;a class="reference external" href="http://pypi.python.org/pypi/bottle/0.10.1"&gt;http://pypi.python.org/pypi/bottle/0.10.1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content></entry><entry><title>Native Python 2.x-3.x support</title><link href="http://blog.bottlepy.org/2011/11/25/native-python-2x-3x-support.html" rel="alternate"></link><published>2011-11-25T00:00:00+01:00</published><updated>2011-11-25T00:00:00+01:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2011-11-25:/2011/11/25/native-python-2x-3x-support.html</id><summary type="html">&lt;p&gt;A few days ago, Ralf showed us &lt;a class="reference external" href="http://thread.gmane.org/gmane.comp.python.bottle.general/1038"&gt;his version of Bottle 0.9&lt;/a&gt; that supports python 2.x and 3.x from a single source. No need to run 2to3 anymore, it runs natively with both major versions of Python.&lt;/p&gt;
&lt;p&gt;I want that!&lt;/p&gt;
&lt;p&gt;So I created a &lt;a class="reference external" href="https://github.com/bottlepy/bottle/commits/no2to3"&gt;new branch&lt;/a&gt; and …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A few days ago, Ralf showed us &lt;a class="reference external" href="http://thread.gmane.org/gmane.comp.python.bottle.general/1038"&gt;his version of Bottle 0.9&lt;/a&gt; that supports python 2.x and 3.x from a single source. No need to run 2to3 anymore, it runs natively with both major versions of Python.&lt;/p&gt;
&lt;p&gt;I want that!&lt;/p&gt;
&lt;p&gt;So I created a &lt;a class="reference external" href="https://github.com/bottlepy/bottle/commits/no2to3"&gt;new branch&lt;/a&gt; and ported most of Ralfs changes to 0.11. All tests pass with 2.x and there are no syntax errors with 3.x. But to be really sure, all tests need to be ported to 3.x, too. This is a lot of work and I definitely need some help here.&lt;/p&gt;
&lt;p&gt;Want to contribute? Join the mailing-list and/or fork bottle on github. Pull requests for ported tests are very likely to be accepted. Just make sure that they do what they are supposed to do. And if you dare to explore the inner workings of the bottle framework itself and find some errors or nasty edge cases, be that guy and fix it :) Or tell us. Any help is appreciated.&lt;/p&gt;
</content></entry><entry><title>Bugfix release 0.9.7</title><link href="http://blog.bottlepy.org/2011/11/15/bugfix-release-097.html" rel="alternate"></link><published>2011-11-15T00:00:00+01:00</published><updated>2011-11-15T00:00:00+01:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2011-11-15:/2011/11/15/bugfix-release-097.html</id><summary type="html">&lt;p&gt;Bottle 0.9.7 (bugfix release) is available. The bug: Loading a template encoded with a codec other than the system default in a Python 3.x environment raised an unicode error under certain circumstances. So, this release is optional. Ignore it if you want :)&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Bottle 0.9.7 (bugfix release) is available. The bug: Loading a template encoded with a codec other than the system default in a Python 3.x environment raised an unicode error under certain circumstances. So, this release is optional. Ignore it if you want :)&lt;/p&gt;
</content></entry><entry><title>More robust Auto-reload</title><link href="http://blog.bottlepy.org/2011/11/15/more-robust-auto-reload.html" rel="alternate"></link><published>2011-11-15T00:00:00+01:00</published><updated>2011-11-15T00:00:00+01:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2011-11-15:/2011/11/15/more-robust-auto-reload.html</id><summary type="html">&lt;p&gt;The Bottle auto-reload feature got an upgrade today: It is now able to handle syntax and import errors in your application or imported modules. Just start the server with the new command-line interface and give it a try:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;bottle.py --debug --reload package.module:app
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I had to change a …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The Bottle auto-reload feature got an upgrade today: It is now able to handle syntax and import errors in your application or imported modules. Just start the server with the new command-line interface and give it a try:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;bottle.py --debug --reload package.module:app
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I had to change a lot of the reloading code to achieve this and was not able to test it with windows yet. If you have some time and a windows machine at hand, please try and tell me if anything goes wrong.&lt;/p&gt;
</content></entry><entry><title>Feature freeze for 0.10</title><link href="http://blog.bottlepy.org/2011/11/10/feature-freeze-for-010.html" rel="alternate"></link><published>2011-11-10T00:00:00+01:00</published><updated>2011-11-10T00:00:00+01:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2011-11-10:/2011/11/10/feature-freeze-for-010.html</id><summary type="html">&lt;p&gt;Feature freeze, lets fix some bugs :)&lt;/p&gt;
&lt;p&gt;What is in:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="http://bottlepy.org/docs/dev/changelog.html#release-0-10"&gt;http://bottlepy.org/docs/dev/changelog.html#release-0-10&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;plus the new route (filter) syntax&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Notable stuff that has to wait for 0.11:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;New TemplateAdapter API&lt;/li&gt;
&lt;li&gt;SimpeTemplate v2&lt;/li&gt;
&lt;li&gt;Comamnd-line reloader that can handle syntax errors.&lt;/li&gt;
&lt;li&gt;Testing API for bottle apps (needs …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;Feature freeze, lets fix some bugs :)&lt;/p&gt;
&lt;p&gt;What is in:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="http://bottlepy.org/docs/dev/changelog.html#release-0-10"&gt;http://bottlepy.org/docs/dev/changelog.html#release-0-10&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;plus the new route (filter) syntax&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Notable stuff that has to wait for 0.11:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;New TemplateAdapter API&lt;/li&gt;
&lt;li&gt;SimpeTemplate v2&lt;/li&gt;
&lt;li&gt;Comamnd-line reloader that can handle syntax errors.&lt;/li&gt;
&lt;li&gt;Testing API for bottle apps (needs at least one deprecation cycle).&lt;/li&gt;
&lt;/ul&gt;
</content></entry><entry><title>Routing Overhaul</title><link href="http://blog.bottlepy.org/2011/11/09/routing-overhaul.html" rel="alternate"></link><published>2011-11-09T00:00:00+01:00</published><updated>2011-11-09T00:00:00+01:00</updated><author><name>Marcel Hellkamp</name></author><id>tag:blog.bottlepy.org,2011-11-09:/2011/11/09/routing-overhaul.html</id><summary type="html">&lt;p&gt;It took some time, but the new routing code is finished.&lt;/p&gt;
&lt;p&gt;Highlights:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;New wildcard syntax: &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;/object/&amp;lt;id:int&amp;gt;&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Wildcard filtering/validation as part of the route syntax&lt;/li&gt;
&lt;li&gt;Support for custom wildcard filters&lt;/li&gt;
&lt;li&gt;Faster url() building&lt;/li&gt;
&lt;li&gt;Better error messages&lt;/li&gt;
&lt;li&gt;Much simpler code (I dropped CGI optimization)&lt;/li&gt;
&lt;li&gt;Lots of documentation&lt;/li&gt;
&lt;li&gt;(the old …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;It took some time, but the new routing code is finished.&lt;/p&gt;
&lt;p&gt;Highlights:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;New wildcard syntax: &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;/object/&amp;lt;id:int&amp;gt;&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Wildcard filtering/validation as part of the route syntax&lt;/li&gt;
&lt;li&gt;Support for custom wildcard filters&lt;/li&gt;
&lt;li&gt;Faster url() building&lt;/li&gt;
&lt;li&gt;Better error messages&lt;/li&gt;
&lt;li&gt;Much simpler code (I dropped CGI optimization)&lt;/li&gt;
&lt;li&gt;Lots of documentation&lt;/li&gt;
&lt;li&gt;(the old syntax still works)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can read about it &lt;a class="reference external" href="http://bottlepy.org/docs/dev/routing.html"&gt;in the docs&lt;/a&gt; and test it in the &amp;quot;routing&amp;quot; branch. I am very exited about this feature and think it is important enough to trigger a new release. Please give it a try and test it with your applications. Any feedback may help to get this stable enough for a release.&lt;/p&gt;
</content></entry></feed>