Pyramid default wsgi server...

392 views
Skip to first unread message

Chris McDonough

unread,
Dec 31, 2011, 6:08:43 AM12/31/11
to pylons-discuss
FYI, in the next 1.3a release of Pyramid, I'm going to switch its
scaffolds over to using the new-ish "waitress" server as the default
WSGI server.

http://readthedocs.org/docs/waitress/en/latest/

http://pypi.python.org/pypi/waitress/0.2

This will be an improvement over the status quo. We are currently
forced to use wsgiref in 1.3 (which is single-threaded and not suitable
for production) because it's the only standalone pure-Python web server
that will run under both Python 2 and Python 3. Waitress isn't exactly
a speed demon, but it's suitable for both development and production,
and runs on all the platforms we care about.

- C


Joshua Partogi

unread,
Dec 31, 2011, 11:38:52 AM12/31/11
to pylons-discuss
I am getting this error:
LookupError: Entry point 'wsgiref' not found in egg 'waitress' (dir: /
usr/python2.6/site-packages/waitress-0.2-py2.6.egg; protocols:
paste.server_factory, paste.server_runner; entry_points: )

Is this known?

Chris McDonough

unread,
Dec 31, 2011, 5:08:06 PM12/31/11
to pylons-...@googlegroups.com
On Sat, 2011-12-31 at 08:38 -0800, Joshua Partogi wrote:
> I am getting this error:
> LookupError: Entry point 'wsgiref' not found in egg 'waitress' (dir: /
> usr/python2.6/site-packages/waitress-0.2-py2.6.egg; protocols:
> paste.server_factory, paste.server_runner; entry_points: )

"getting this error"

My best guess. You have this:

egg:waitress#wsgiref

Instead of:

egg:waitress#main

In some .ini file. But who knows.

John Anderson

unread,
Dec 31, 2011, 5:41:14 PM12/31/11
to pylons-...@googlegroups.com, Chris McDonough
So what is the reasoning behind needing a production ready webserver
included with the framework by default? Couldn't we just include
something lightweight that works for development and allow people to
make their own decision on what webserver they would like to use?

For example, I use gunicorn for development and production, so there is
no reason to make that decision for me and include a separate webserver.

If Pyramid starts shipping with a production ready webserver that is
giving the impression that the pylons project will be
supporting/maintaining/improving that webserver. Is that something you
want?

Michael Merickel

unread,
Dec 31, 2011, 5:51:16 PM12/31/11
to pylons-...@googlegroups.com

I think the goal is something that won't just fold over in production. wsgiref is single threaded and in just no way capable of being deployed. This way if someone deploys it without knowing any better they at least have a chance.

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To post to this group, send email to pylons-...@googlegroups.com.
To unsubscribe from this group, send email to pylons-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.

John Anderson

unread,
Dec 31, 2011, 6:01:30 PM12/31/11
to pylons-...@googlegroups.com, Michael Merickel

On Dec 31, 2011 4:41 PM, "John Anderson" <son...@gmail.com> wrote:
So what is the reasoning behind needing a production ready webserver
included with the framework by default?  Couldn't we just include
something lightweight that works for development and allow people to
make their own decision on what webserver they would like to use?

On 12/31/2011 04:51 PM, Michael Merickel wrote:

I think the goal is something that won't just fold over in production. wsgiref is single threaded and in just no way capable of being deployed. This way if someone deploys it without knowing any better they at least have a chance.


I think what would match up more with pyramid's goals as a foundation for building frameworks, being minimal, and not making decisions for the developers would be to not ship a server at all and part of the documentation would be how to choose the webserver that is right for them.

Similar to how they have to choose a template engine, orm, form library, etc.

Chris McDonough

unread,
Dec 31, 2011, 6:17:21 PM12/31/11
to pylons-...@googlegroups.com, Michael Merickel

I wrote the server partly so I wouldn't have to write that
documentation, because keeping it in sync as the world turns is a losing
battle. Not that I probably won't have to write it anyway, but, at
least if I do, I'll be able to put it in the Cookbook, where it doesn't
matter too much when it's immediately out of date.

> Similar to how they have to choose a template engine, orm, form
> library, etc.

Note that only the scaffolding will depend on waitress, so I think this
is consistent. Scaffolding is all about making these sorts of choices.
There's really no other standalone server except wsgiref that works
across the platforms we need to support, and wsgiref blows; it's totally
unsuitable for any sort of production system. It'd be a special kind of
hell to specialize scaffolding rendering per-platform to choose "the
best" server for that platform.

- C


Mike Orr

unread,
Dec 31, 2011, 7:15:59 PM12/31/11
to pylons-...@googlegroups.com
On Sat, Dec 31, 2011 at 3:08 AM, Chris McDonough <chr...@plope.com> wrote:
> FYI, in the next 1.3a release of Pyramid, I'm going to switch its
> scaffolds over to using the new-ish "waitress" server as the default
> WSGI server.
>
> http://readthedocs.org/docs/waitress/en/latest/
>
> http://pypi.python.org/pypi/waitress/0.2
>
> This will be an improvement over the status quo.

It essentially brings us back to the status quo ante, which was
PasteHTTPServer. How does Waitress compare to it, and is it
mullti-threaded too?

--
Mike Orr <slugg...@gmail.com>

Chris McDonough

unread,
Dec 31, 2011, 7:31:04 PM12/31/11
to pylons-...@googlegroups.com
On Sat, 2011-12-31 at 16:15 -0800, Mike Orr wrote:
> On Sat, Dec 31, 2011 at 3:08 AM, Chris McDonough <chr...@plope.com> wrote:
> > FYI, in the next 1.3a release of Pyramid, I'm going to switch its
> > scaffolds over to using the new-ish "waitress" server as the default
> > WSGI server.
> >
> > http://readthedocs.org/docs/waitress/en/latest/
> >
> > http://pypi.python.org/pypi/waitress/0.2
> >
> > This will be an improvement over the status quo.
>
> It essentially brings us back to the status quo ante, which was
> PasteHTTPServer.

Sorry, I meant the status quot in 1.3, which is is wsgiref.

> How does Waitress compare to it, and is it
> mullti-threaded too?

It's about the same performance and feature wise (except no SSL).
Multithreaded, yes.

- C


Joshua Partogi

unread,
Jan 1, 2012, 12:18:02 AM1/1/12
to pylons-discuss
Darn, how could I didn't copy-paste it correctly. Thanks Chris.
Reply all
Reply to author
Forward
0 new messages