Skip to content

Commit

Permalink
Added support for gevent! v0.6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
toastdriven committed Jun 20, 2010
1 parent 9cb0b47 commit cd9876c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/alternate_servers.py
Expand Up @@ -16,3 +16,4 @@ def index(request):
# run_itty(server='flup')
# run_itty(server='paste')
# run_itty(server='gunicorn')
# run_itty(server='gevent')
8 changes: 7 additions & 1 deletion itty.py
Expand Up @@ -33,7 +33,7 @@ def index(request):
from cgi import parse_qs

__author__ = 'Daniel Lindsley'
__version__ = ('0', '6', '7')
__version__ = ('0', '6', '8')
__license__ = 'BSD'


Expand Down Expand Up @@ -545,6 +545,11 @@ def gunicorn_adapter(host, port):
arbiter.run()


def gevent_adapter(host, port):
from gevent import wsgi
wsgi.WSGIServer((host, int(port)), handle_request).serve_forever()


WSGI_ADAPTERS = {
'wsgiref': wsgiref_adapter,
'appengine': appengine_adapter,
Expand All @@ -555,6 +560,7 @@ def gunicorn_adapter(host, port):
'diesel': diesel_adapter,
'tornado': tornado_adapter,
'gunicorn': gunicorn_adapter,
'gevent': gevent_adapter,
}


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -12,7 +12,7 @@

setup(
name='itty',
version='0.6.7',
version='0.6.8',
description='The itty-bitty Python web framework.',
long_description=long_desc,
author='Daniel Lindsley',
Expand Down

0 comments on commit cd9876c

Please sign in to comment.