diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-11-29 18:20:44 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-11-29 18:20:44 +0000 |
| commit | 95205583fbd6677f415eb7e62ea4b49b297642f4 (patch) | |
| tree | 8fa867d6d1640e444a272ac2264218c49c177901 /CHANGES.txt | |
| parent | 52ced090679517fab87066fc1345f8740f821244 (diff) | |
| download | pyramid-95205583fbd6677f415eb7e62ea4b49b297642f4.tar.gz pyramid-95205583fbd6677f415eb7e62ea4b49b297642f4.tar.bz2 pyramid-95205583fbd6677f415eb7e62ea4b49b297642f4.zip | |
Meh.
Diffstat (limited to 'CHANGES.txt')
| -rw-r--r-- | CHANGES.txt | 55 |
1 files changed, 45 insertions, 10 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 3464bf2ef..94779ecf4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,11 +5,12 @@ Bug Fixes --------- - Trying to use an HTTP method name string such as ``GET`` as a - ``request_type`` predicate caused a startup time failure when it was - encountered in imperative configuration or in a decorator (symptom: - ``Type Error: Required specification must be a specification``). - This now works again, although ``request_method`` is a more modern - predicate. + ``request_type`` predicate argument caused a startup time failure + when it was encountered in imperative configuration or in a + decorator (symptom: ``Type Error: Required specification must be a + specification``). This now works again, although ``request_method`` + is now the preferred predicate argument for associating a view + configuration with an HTTP request method. 1.2a1 (2009-11-28) ================== @@ -17,6 +18,39 @@ Bug Fixes Features -------- +- An imperative configuration mode. + + A ``repoze.bfg`` application can now begin its life as a single + Python file. Later, the application might evolve into a set of + Python files in a package. Even later, it might start making use of + other configuration features, such as ``ZCML``. But neither the use + of a package nor the use of non-imperative configuration is required + to create a simple ``repoze.bfg`` application any longer. + + Imperative configuration makes ``repoze.bfg`` competetive with + "microframeworks" such as `Bottle <http://bottle.paws.de/>`_ and + `Tornado <http://www.tornadoweb.org/>`_. ``repoze.bfg`` has a good + deal of functionality that most microframeworks lack, so this is + hopefully a "best of both worlds" feature. + + The simplest possible ``repoze.bfg`` application is now: + + .. code-block:: python + :linenos: + + from webob import Response + from wsgiref import simple_server + from repoze.bfg.configuration import Configurator + + def hello_world(request): + return Response('Hello world!') + + if __name__ == '__main__': + config = Configurator() + config.add_view(hello_world) + app = config.make_wsgi_app() + simple_server.make_server('', 8080, app).serve_forever() + - A new class now exists: ``repoze.bfg.configuration.Configurator``. This class forms the basis for sharing machinery between "imperatively" configured applications and traditional @@ -44,14 +78,15 @@ Features default-created registry if ``registry`` is ``None``) instead of the registry returned by ``zope.component.getGlobalSiteManager``, causing the Zope Component Architecture API (``getSiteManager``, - ``getAdapter``, ``getUtility``, and so on) to use the registry we're - using for testing instead of the global ZCA registry. + ``getAdapter``, ``getUtility``, and so on) to use the testing + registry instead of the global ZCA registry. - The ``repoze.bfg.testing.tearDown`` function now accepts an ``unhook_zca`` argument. If this argument is ``True`` (the - default), ``zope.component.getSiteManager.reset()`` will be called, - causing the "base" registry to once again start returnining the - result of ``zope.component.getSiteManager``. + default), ``zope.component.getSiteManager.reset()`` will be called. + This will cause the result of the ``zope.component.getSiteManager`` + function to be the global ZCA registry (the result of + ``zope.component.getGlobalSiteManager``) once again. - The ``run.py`` module in various ``repoze.bfg`` ``paster`` templates now use a ``repoze.bfg.configuration.Configurator`` class instead of |
