Permalink
Browse files

- Use the ``waitress`` WSGI server instead of ``wsgiref`` in scaffold…

…ing.
  • Loading branch information...
1 parent 2d7d36c commit 030d10697cc52a5c26d19818140616a485f63428 @mcdonc mcdonc committed Jan 3, 2012
Showing with 67 additions and 86 deletions.
  1. +2 −0 CHANGES.txt
  2. +1 −1 docs/narr/MyProject/development.ini
  3. +1 −1 docs/narr/MyProject/production.ini
  4. +5 −27 docs/narr/project.rst
  5. +2 −2 docs/narr/startup.rst
  6. +1 −1 docs/tutorials/wiki/src/authorization/development.ini
  7. +1 −1 docs/tutorials/wiki/src/authorization/production.ini
  8. +1 −0 docs/tutorials/wiki/src/authorization/setup.py
  9. +1 −1 docs/tutorials/wiki/src/basiclayout/development.ini
  10. +1 −1 docs/tutorials/wiki/src/basiclayout/production.ini
  11. +1 −0 docs/tutorials/wiki/src/basiclayout/setup.py
  12. +1 −1 docs/tutorials/wiki/src/models/development.ini
  13. +1 −1 docs/tutorials/wiki/src/models/production.ini
  14. +1 −0 docs/tutorials/wiki/src/models/setup.py
  15. +1 −1 docs/tutorials/wiki/src/tests/development.ini
  16. +1 −1 docs/tutorials/wiki/src/tests/production.ini
  17. +1 −0 docs/tutorials/wiki/src/tests/setup.py
  18. +1 −1 docs/tutorials/wiki/src/views/development.ini
  19. +1 −1 docs/tutorials/wiki/src/views/production.ini
  20. +1 −0 docs/tutorials/wiki/src/views/setup.py
  21. +1 −1 docs/tutorials/wiki2/src/authorization/development.ini
  22. +1 −1 docs/tutorials/wiki2/src/authorization/production.ini
  23. +1 −0 docs/tutorials/wiki2/src/authorization/setup.py
  24. +1 −1 docs/tutorials/wiki2/src/basiclayout/development.ini
  25. +1 −1 docs/tutorials/wiki2/src/basiclayout/production.ini
  26. +1 −0 docs/tutorials/wiki2/src/basiclayout/setup.py
  27. +1 −1 docs/tutorials/wiki2/src/models/development.ini
  28. +1 −1 docs/tutorials/wiki2/src/models/production.ini
  29. +1 −0 docs/tutorials/wiki2/src/models/setup.py
  30. +1 −1 docs/tutorials/wiki2/src/tests/development.ini
  31. +1 −1 docs/tutorials/wiki2/src/tests/production.ini
  32. +1 −0 docs/tutorials/wiki2/src/tests/setup.py
  33. +1 −1 docs/tutorials/wiki2/src/views/development.ini
  34. +1 −1 docs/tutorials/wiki2/src/views/production.ini
  35. +1 −0 docs/tutorials/wiki2/src/views/setup.py
  36. +13 −28 docs/whatsnew-1.3.rst
  37. +1 −1 pyramid/scaffolds/alchemy/development.ini_tmpl
  38. +1 −1 pyramid/scaffolds/alchemy/production.ini_tmpl
  39. +1 −0 pyramid/scaffolds/alchemy/setup.py_tmpl
  40. +1 −1 pyramid/scaffolds/starter/development.ini_tmpl
  41. +1 −1 pyramid/scaffolds/starter/production.ini_tmpl
  42. +5 −1 pyramid/scaffolds/starter/setup.py_tmpl
  43. +1 −1 pyramid/scaffolds/zodb/development.ini_tmpl
  44. +1 −1 pyramid/scaffolds/zodb/production.ini_tmpl
  45. +1 −0 pyramid/scaffolds/zodb/setup.py_tmpl
View
@@ -10,6 +10,8 @@ Features
of the instance. Common use-cases for this would be to get a database
connection for the request or identify the current user.
+- Use the ``waitress`` WSGI server instead of ``wsgiref`` in scaffolding.
+
1.3a3 (2011-12-21)
==================
@@ -10,7 +10,7 @@ pyramid.default_locale_name = en
pyramid.includes = pyramid_debugtoolbar
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -9,7 +9,7 @@ pyramid.debug_templates = false
pyramid.default_locale_name = en
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
View
@@ -888,33 +888,11 @@ Using an Alternate WSGI Server
The code generated by :app:`Pyramid` scaffolding assumes that you will be
using the ``pserve`` command to start your application while you do
-development. The default rendering of Pyramid scaffolding uses the *wsgiref*
-WSGI server, which is a server that is ill-suited for production usage: its
-main feature is that it works on all platforms and all systems, making it a
-good choice as a default server from the perspective of Pyramid's developers.
-
-To use a server more suitable for production, you have a number of choices.
-Replace the ``use = egg:pyramid#wsgref`` line in your ``production.ini`` with
-one of the following.
-
-``use = egg:Paste#http``
-
- ``paste.httpserver`` is Windows, UNIX, and Python 2 compatible. You'll
- need to ``easy_install Paste`` into your Pyramid virtualenv for this server
- to work.
-
-``use = egg:pyramid#cherrypy``
-
- The ``CherryPy`` WSGI server is Windows, UNIX, Python 2, and Python 3
- compatible. You'll need to ``easy_install CherryPy`` into your Pyramid
- virtualenv for this server to work.
-
-The servers described above are typically both faster and more secure than
-the default WSGI server used by Pyramid. Pyramid does not depend on either
-because Paste doesn't run on Python 3 (and Pyramid must) and the CherryPy
-server is not distributed separately from the CherryPy web framework (and it
-would be an awkward dependency to have a web framework rely on another web
-framework for just its server component).
+development. The default rendering of Pyramid scaffolding uses the
+*waitress* WSGI server, which is a server that is suited for production
+usage. It's not very fast, or very featureful: its main feature is that it
+works on all platforms and all systems, making it a good choice as a default
+server from the perspective of Pyramid's developers.
``pserve`` is by no means the only way to start up and serve a :app:`Pyramid`
application. As we saw in :ref:`firstapp_chapter`, ``pserve`` needn't be
View
@@ -133,8 +133,8 @@ Here's a high-level time-ordered overview of what happens when you press
far as ``pserve`` is concerned, it is "just another WSGI application".
#. ``pserve`` starts the WSGI *server* defined within the ``[server:main]``
- section. In our case, this is the ``egg:pyramid#wsgiref`` server (``use =
- egg:pyramid#wsgiref``), and it will listen on all interfaces (``host =
+ section. In our case, this is the Waitress server (``use =
+ egg:waitress#main``), and it will listen on all interfaces (``host =
0.0.0.0``), on port number 6543 (``port = 6543``). The server code itself
is what prints ``serving on 0.0.0.0:6543 view at http://127.0.0.1:6543``.
The server serves the application, and the application is running, waiting
@@ -13,7 +13,7 @@ tm.attempts = 3
zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,7 +12,7 @@ tm.attempts = 3
zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,6 +12,7 @@
'pyramid_tm',
'pyramid_debugtoolbar',
'ZODB3',
+ 'waitress',
'docutils',
]
@@ -13,7 +13,7 @@ tm.attempts = 3
zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,7 +12,7 @@ tm.attempts = 3
zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,6 +12,7 @@
'pyramid_tm',
'pyramid_debugtoolbar',
'ZODB3',
+ 'waitress',
]
setup(name='tutorial',
@@ -13,7 +13,7 @@ tm.attempts = 3
zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,7 +12,7 @@ tm.attempts = 3
zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,6 +12,7 @@
'pyramid_tm',
'pyramid_debugtoolbar',
'ZODB3',
+ 'waitress',
]
setup(name='tutorial',
@@ -13,7 +13,7 @@ tm.attempts = 3
zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,7 +12,7 @@ tm.attempts = 3
zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,6 +12,7 @@
'pyramid_tm',
'pyramid_debugtoolbar',
'ZODB3',
+ 'waitress',
'docutils',
'WebTest', # add this
]
@@ -13,7 +13,7 @@ tm.attempts = 3
zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,7 +12,7 @@ tm.attempts = 3
zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,6 +12,7 @@
'pyramid_tm',
'pyramid_debugtoolbar',
'ZODB3',
+ 'waitress',
'docutils',
]
@@ -13,7 +13,7 @@ pyramid.includes = pyramid_debugtoolbar
sqlalchemy.url = sqlite:///%(here)s/tutorial.db
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,7 +12,7 @@ pyramid.includes = pyramid_tm
sqlalchemy.url = sqlite:///%(here)s/tutorial.db
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -15,6 +15,7 @@
'pyramid_debugtoolbar',
'zope.sqlalchemy',
'docutils',
+ 'waitress',
]
if sys.version_info[:3] < (2,5,0):
@@ -13,7 +13,7 @@ pyramid.includes = pyramid_debugtoolbar
sqlalchemy.url = sqlite:///%(here)s/tutorial.db
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,7 +12,7 @@ pyramid.includes = pyramid_tm
sqlalchemy.url = sqlite:///%(here)s/tutorial.db
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -14,6 +14,7 @@
'pyramid_tm',
'pyramid_debugtoolbar',
'zope.sqlalchemy',
+ 'waitress',
]
if sys.version_info[:3] < (2,5,0):
@@ -13,7 +13,7 @@ pyramid.includes = pyramid_debugtoolbar
sqlalchemy.url = sqlite:///%(here)s/tutorial.db
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,7 +12,7 @@ pyramid.includes = pyramid_tm
sqlalchemy.url = sqlite:///%(here)s/tutorial.db
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -14,6 +14,7 @@
'pyramid_tm',
'pyramid_debugtoolbar',
'zope.sqlalchemy',
+ 'waitress',
]
if sys.version_info[:3] < (2,5,0):
@@ -13,7 +13,7 @@ pyramid.includes = pyramid_debugtoolbar
sqlalchemy.url = sqlite:///%(here)s/tutorial.db
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,7 +12,7 @@ pyramid.includes = pyramid_tm
sqlalchemy.url = sqlite:///%(here)s/tutorial.db
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -14,6 +14,7 @@
'pyramid_tm',
'pyramid_debugtoolbar',
'zope.sqlalchemy',
+ 'waitress',
'docutils',
'WebTest', # add this
]
@@ -13,7 +13,7 @@ pyramid.includes = pyramid_debugtoolbar
sqlalchemy.url = sqlite:///%(here)s/tutorial.db
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -12,7 +12,7 @@ pyramid.includes = pyramid_tm
sqlalchemy.url = sqlite:///%(here)s/tutorial.db
[server:main]
-use = egg:pyramid#wsgiref
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
@@ -14,6 +14,7 @@
'pyramid_tm',
'pyramid_debugtoolbar',
'zope.sqlalchemy',
+ 'waitress',
'docutils',
]
Oops, something went wrong.

0 comments on commit 030d106

Please sign in to comment.