diff options
author | Avelino <thiago@avelino.xxx> | 2017-02-23 10:47:04 -0300 |
---|---|---|
committer | Avelino <thiago@avelino.xxx> | 2017-02-23 10:47:04 -0300 |
commit | ddf372d5e22293c47a811fdac16001316847d94f (patch) | |
tree | 842b844a0e4f59c0b159822a1292975a4aae1a7e | |
parent | 5a6fc77c9c57501b08e5b4f9161ae07d277effa9 (diff) | |
download | bottle-issue_934.tar.gz |
Leave explicit the maxima version supported the CherryPy (<= 9.0.0)issue_934
ref #934
-rw-r--r-- | README.rst | 4 | ||||
-rwxr-xr-x | docs/index.rst | 3 | ||||
-rwxr-xr-x | docs/recipes.rst | 30 | ||||
-rwxr-xr-x | docs/tutorial.rst | 3 | ||||
-rw-r--r-- | docs/tutorial_app.rst | 2 | ||||
-rw-r--r-- | test/travis-requirements.txt | 2 | ||||
-rwxr-xr-x | test/travis_setup.sh | 4 |
7 files changed, 23 insertions, 25 deletions
@@ -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/ @@ -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 diff --git a/docs/index.rst b/docs/index.rst index a6a23f8..b1ca4d1 100755 --- a/docs/index.rst +++ b/docs/index.rst @@ -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 @@ -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. - diff --git a/docs/recipes.rst b/docs/recipes.rst index 168e26d..c93551e 100755 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -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 ---------------------------- @@ -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) @@ -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!' @@ -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!' @@ -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 @@ -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) @@ -176,7 +176,7 @@ 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' @@ -184,7 +184,7 @@ Several "push" mechanisms like XHR multipart need the ability to write response 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). @@ -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 @@ -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 diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 764243b..bd5c15f 100755 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -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') @@ -1071,4 +1071,3 @@ Glossary source directory The directory which, including its subdirectories, contains all source files for one Sphinx project. - diff --git a/docs/tutorial_app.rst b/docs/tutorial_app.rst index b24ac27..0803e8b 100644 --- a/docs/tutorial_app.rst +++ b/docs/tutorial_app.rst @@ -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:: diff --git a/test/travis-requirements.txt b/test/travis-requirements.txt index a796c90..4262a9c 100644 --- a/test/travis-requirements.txt +++ b/test/travis-requirements.txt @@ -5,7 +5,7 @@ jinja2 # Server Backends meinheld bjoern -cherrypy +cherrypy<9.0.0 diesel eventlet fapws3==0.11.dev diff --git a/test/travis_setup.sh b/test/travis_setup.sh index e74be8f..45dcfb0 100755 --- a/test/travis_setup.sh +++ b/test/travis_setup.sh @@ -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 |