diff --git a/docs/source/conf.py b/docs/source/conf.py index fede3f1..a2c6fcf 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -49,9 +49,9 @@ copyright = u'2010, Jonathan LaCour' # built documents. # # The short X.Y version. -version = '0.1.0' +version = '0.2a' # The full version, including alpha/beta/rc tags. -release = '0.1.0' +release = '0.2a' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/deployment.rst b/docs/source/deployment.rst index f1be089..1b1598a 100644 --- a/docs/source/deployment.rst +++ b/docs/source/deployment.rst @@ -88,9 +88,9 @@ Common Recipes Apache + mod_wsgi +++++++++++++++++ `mod_wsgi `_ is a popular Apache module -which can be used to host any WSGI-compatible Python applicationa. +which can be used to host any WSGI-compatible Python application. -uwsgi + cherokee +uWSGI + cherokee ++++++++++++++++ `uWSGI `_ is a fast, self-healing and developer/sysadmin-friendly application container server coded in pure C. It @@ -102,10 +102,10 @@ implemented entirely in C, and has no dependencies beyond a standard C library. Gunicorn + nginx ++++++++++++++++ -`Gunicorn `__, or "Green Unicorn", is a WSGI HTTP Server for +`Gunicorn `__, or "Green Unicorn", is a WSGI HTTP Server for UNIX. It’s a pre-fork worker model ported from Ruby’s Unicorn project. It supports both eventlet and greenlet. -`nginx `_ is a web and a reverse proxy server for HTTP, SMTP, POP3 and IMAP +`nginx `_ is a web and reverse proxy server for HTTP, SMTP, POP3 and IMAP protocols, with a strong focus on high concurrency, performance and low memory usage. diff --git a/pecan/core.py b/pecan/core.py index 2e0f29c..0184764 100644 --- a/pecan/core.py +++ b/pecan/core.py @@ -16,6 +16,7 @@ except ImportError: # pragma: no cover from json import loads # noqa import urllib +import sys # make sure that json is defined in mimetypes add_type('application/json', '.json', True) @@ -213,14 +214,11 @@ class Pecan(object): name = '.'.join(parts[:-1]) fromlist = parts[-1:] - try: - module = __import__(name, fromlist=fromlist) - kallable = getattr(module, parts[-1]) - msg = "%s does not represent a callable class or function." - assert hasattr(kallable, '__call__'), msg % item - return kallable() - except AttributeError: - raise ImportError('No item named %s' % item) + module = __import__(name, fromlist=fromlist) + kallable = getattr(module, parts[-1]) + msg = "%s does not represent a callable class or function." + assert hasattr(kallable, '__call__'), msg % item + return kallable() raise ImportError('No item named %s' % item) diff --git a/setup.py b/setup.py index 7b9ebb8..506f702 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand -version = '0.1.0' +version = '0.2a' # # determine requirements