Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leave explicit the maxima version supported the CherryPy (<= 9.0.0) #947

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

.. image:: https://coveralls.io/repos/github/bottlepy/bottle/badge.svg?branch=master
:target: https://coveralls.io/github/bottlepy/bottle?branch=master
:alt: Coverage
:alt: Coverage

.. image:: https://img.shields.io/pypi/dm/bottle.svg
:target: https://pypi.python.org/pypi/bottle/
Expand Down Expand Up @@ -47,7 +47,7 @@ Bottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_.
* **Routing:** Requests to function-call mapping with support for clean and dynamic URLs.
* **Templates:** Fast and pythonic `*built-in template engine* <http://bottlepy.org/docs/dev/tutorial.html#tutorial-templates>`_ and support for mako_, jinja2_ and cheetah_ templates.
* **Utilities:** Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata.
* **Server:** Built-in HTTP development server and support for paste_, fapws3_, bjoern_, `Google App Engine <https://cloud.google.com/appengine/>`_, cherrypy_ or any other WSGI_ capable HTTP server.
* **Server:** Built-in HTTP development server and support for paste_, fapws3_, bjoern_, `Google App Engine <https://cloud.google.com/appengine/>`_, cherrypy_ (<= 9.0.0) or any other WSGI_ capable HTTP server.

Homepage and documentation: http://bottlepy.org

Expand Down
3 changes: 1 addition & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Bottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_.
* **Routing:** Requests to function-call mapping with support for clean and dynamic URLs.
* **Templates:** Fast and pythonic :ref:`built-in template engine <tutorial-templates>` and support for mako_, jinja2_ and cheetah_ templates.
* **Utilities:** Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata.
* **Server:** Built-in HTTP development server and support for paste_, fapws3_, bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server.
* **Server:** Built-in HTTP development server and support for paste_, fapws3_, bjoern_, gae_, cherrypy_ (<= 9.0.0) or any other WSGI_ capable HTTP server.

.. rubric:: Example: "Hello World" in a bottle

Expand Down Expand Up @@ -115,4 +115,3 @@ the unmodified library. In all other cases please ask first.
.. rubric:: Footnotes

.. [1] Usage of the template or server adapter classes requires the corresponding template or server modules.

30 changes: 15 additions & 15 deletions docs/recipes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Recipes
=============

This is a collection of code snippets and examples for common use cases.
This is a collection of code snippets and examples for common use cases.

Keeping track of Sessions
----------------------------
Expand Down Expand Up @@ -48,7 +48,7 @@ Debugging with Style: Debugging Middleware
Bottle catches all Exceptions raised in your app code to prevent your WSGI server from crashing. If the built-in :func:`debug` mode is not enough and you need exceptions to propagate to a debugging middleware, you can turn off this behaviour::

import bottle
app = bottle.app()
app = bottle.app()
app.catchall = False #Now most exceptions are re-raised within bottle.
myapp = DebuggingMiddleware(app) #Replace this with a middleware of your choice (see below)
bottle.run(app=myapp)
Expand All @@ -66,7 +66,7 @@ Unit-testing is usually performed against methods defined in your web applicatio
A simple example using `Nose <http://readthedocs.org/docs/nose>`_::

import bottle

@bottle.route('/')
def index():
return 'Hi!'
Expand All @@ -77,7 +77,7 @@ A simple example using `Nose <http://readthedocs.org/docs/nose>`_::
Test script::

import mywebapp

def test_webapp_index():
assert mywebapp.index() == 'Hi!'

Expand All @@ -96,7 +96,7 @@ Example using `WebTest <http://webtest.pythonpaste.org/>`_ and `Nose <http://rea

def test_functional_login_logout():
app = TestApp(mywebapp.app)

app.post('/login', {'user': 'foo', 'pass': 'bar'}) # log in and get a cookie

assert app.get('/admin').status == '200 OK' # fetch a page successfully
Expand Down Expand Up @@ -147,7 +147,7 @@ add a WSGI middleware that strips trailing slashes from all URLs::
def __call__(self, e, h):
e['PATH_INFO'] = e['PATH_INFO'].rstrip('/')
return self.app(e,h)

app = bottle.app()
myapp = StripPathMiddleware(app)
bottle.run(app=myapp)
Expand Down Expand Up @@ -176,15 +176,15 @@ Several "push" mechanisms like XHR multipart need the ability to write response

import gevent
from bottle import route, run

@route('/stream')
def stream():
yield 'START'
gevent.sleep(3)
yield 'MIDDLE'
gevent.sleep(5)
yield 'END'

run(host='0.0.0.0', port=8080, server='gevent')

If you browse to ``http://localhost:8080/stream``, you should see 'START', 'MIDDLE', and 'END' show up one at a time (rather than waiting 8 seconds to see them all at once).
Expand All @@ -209,7 +209,7 @@ Supporting Gzip compression is not a straightforward proposition, due to a numbe
* Make sure the cache does not get to big.
* Do not cache small files because a disk seek would take longer than on-the-fly compression.

Because of these requirements, it is the recommendation of the Bottle project that Gzip compression is best handled by the WSGI server Bottle runs on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware that can be used to accomplish this.
Because of these requirements, it is the recommendation of the Bottle project that Gzip compression is best handled by the WSGI server Bottle runs on top of. WSGI servers such as cherrypy_ (<= 9.0.0) provide a GzipFilter_ middleware that can be used to accomplish this.


Using the hooks plugin
Expand Down Expand Up @@ -241,13 +241,13 @@ Using Bottle with Heroku
------------------------

Heroku_, a popular cloud application platform now provides support
for running Python applications on their infastructure.
for running Python applications on their infastructure.

This recipe is based upon the `Heroku Quickstart
<http://devcenter.heroku.com/articles/quickstart>`_,
with Bottle specific code replacing the
`Write Your App <http://devcenter.heroku.com/articles/python#write_your_app>`_
section of the `Getting Started with Python on Heroku/Cedar
This recipe is based upon the `Heroku Quickstart
<http://devcenter.heroku.com/articles/quickstart>`_,
with Bottle specific code replacing the
`Write Your App <http://devcenter.heroku.com/articles/python#write_your_app>`_
section of the `Getting Started with Python on Heroku/Cedar
<http://devcenter.heroku.com/articles/python>`_ guide::

import os
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ Deployment

Bottle runs on the built-in `wsgiref WSGIServer <http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_ by default. This non-threading HTTP server is perfectly fine for development, but may become a performance bottleneck when server load increases.

The easiest way to increase performance is to install a multi-threaded server library like paste_ or cherrypy_ and tell Bottle to use that instead of the single-threaded server::
The easiest way to increase performance is to install a multi-threaded server library like paste_ or cherrypy_ (<= 9.0.0) and tell Bottle to use that instead of the single-threaded server::

bottle.run(server='paste')

Expand Down Expand Up @@ -1071,4 +1071,3 @@ Glossary
source directory
The directory which, including its subdirectories, contains all
source files for one Sphinx project.

2 changes: 1 addition & 1 deletion docs/tutorial_app.rst
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ The ``port`` and ``host`` parameter can also be applied when Bottle is running w

As said above, the standard server is perfectly suitable for development, personal use or a small group of people only using your application based on Bottle. For larger tasks, the standard server may become a bottleneck, as it is single-threaded, thus it can only serve one request at a time.

But Bottle has already various adapters to multi-threaded servers on board, which perform better on higher load. Bottle supports Cherrypy_, Fapws3_, Flup_ and Paste_.
But Bottle has already various adapters to multi-threaded servers on board, which perform better on higher load. Bottle supports Cherrypy_ (<= 9.0.0), Fapws3_, Flup_ and Paste_.

If you want to run for example Bottle with the Paste server, use the following code::

Expand Down
2 changes: 1 addition & 1 deletion test/travis-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jinja2
# Server Backends
meinheld
bjoern
cherrypy
cherrypy<9.0.0
diesel
eventlet
fapws3==0.11.dev
Expand Down
4 changes: 2 additions & 2 deletions test/travis_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ set -x
sudo apt-get install libev-dev

if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then
pip install flup waitress cherrypy paste fapws3 tornado twisted diesel meinheld gunicorn eventlet gevent rocket bjoern
pip install flup waitress cherrypy<9.0.0 paste fapws3 tornado twisted diesel meinheld gunicorn eventlet gevent rocket bjoern
fi

if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then
pip install waitress cherrypy paste tornado twisted diesel meinheld gunicorn eventlet gevent uvloop
pip install waitress cherrypy<9.0.0 paste tornado twisted diesel meinheld gunicorn eventlet gevent uvloop
fi