summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-01-15Test coverage.Chris McDonough
2009-01-15- Instead of invariably using ``webob.Request`` as the "requestChris McDonough
factory" (e.g. in the ``Router`` class) and ``webob.Response`` and the "response factory" (e.g. in ``render_template_to_response``), allow both to be overridden via a ZCML utility hook. See the "Using ZCML Hooks" chapter of the documentation for more information.
2009-01-13Prep for 0.6.2.Chris McDonough
2009-01-12Ignore .coverage.Chris McDonough
2009-01-12- An interface specific to the HTTP verb (GET/PUT/POST/DELETE/HEAD) isChris McDonough
attached to each request object on ingress. The HTTP-verb-related interfaces are defined in ``repoze.bfg.interfaces`` and are ``IGETRequest``, ``IPOSTRequest``, ``IPUTRequest``, ``IDELETERequest`` and ``IHEADRequest``. These interfaces can be specified as the ``request_type`` attribute of a bfg view declaration. A view naming a specific HTTP-verb-matching interface will be found only if the view is defined with a request_type that matches the HTTP verb in the incoming request. The more general ``IRequest`` interface can be used as the request_type to catch all requests (and this is indeed the default). All requests implement ``IRequest``. The HTTP-verb-matching idea was pioneered by `repoze.bfg.restrequest <http://pypi.python.org/pypi/repoze.bfg.restrequest/1.0.1>`_ . That package is no longer required, but still functions fine.
2009-01-12Only pop the registry stack if we've pushed on to it in makeRegistry.Chris McDonough
2009-01-12- Make the (internal) thread local registry manager maintain a stackChris McDonough
of registries in order to make it possible to call one BFG application from inside another.
2009-01-11Better docstrings.Chris McDonough
2009-01-11Unused import.Chris McDonough
2009-01-11Better coverage.Chris McDonough
2009-01-11Tweaks.Chris McDonough
2009-01-11- Improve test coverage.Chris McDonough
- Remove old cold which attempts to recover from trying to unpickle a ``z3c.pt`` template; Chameleon has been the templating engine for a good long time now. Running repoze.bfg against a sandbox that has pickled ``z3c.pt`` templates it will now just fail with an unpickling error, but can be fixed by deleting the template cache files.
2009-01-11Make clearer what ``name`` means within the __call__ method.Chris McDonough
2009-01-11- Tests can be run with coverage output if you've got ``nose``Chris McDonough
installed in the interpreter which you use to run tests. Using an interpreter with ``nose`` installed, do ``python setup.py nosetests`` within a checkout of the ``repoze.bfg`` package to see test coverage output.
2009-01-11Fix docs and templates to account for deprecation of get_options.Chris McDonough
2009-01-11Note template name.Chris McDonough
2009-01-11Clean up.Chris McDonough
2009-01-11Merge router-simplify branch. Changelog below.Chris McDonough
Bug Fixes --------- - Fix a bug where the Paste configuration's ``unicode_path_segments`` (and os.environ's ``BFG_UNICODE_PATH_SEGMENTS``) may have been defaulting to false in some circumstances. It now always defaults to true, matching the documentation and intent. - The ``repoze.bfg.traversal.find_model`` API did not work properly when passed a ``path`` argument which was unicode and contained high-order bytes when the ``unicode_path_segments`` or ``BFG_UNICODE_PATH_SEGMENTS`` configuration variables were "true". - A new module was added: ``repoze.bfg.settings``. This contains deployment-settings-related code. Behavior Changes ---------------- - The ``make_app`` callable within ``repoze.bfg.router`` now registers the ``root_policy`` argument as a utility (unnamed, using the new ``repoze.bfg.interfaces.IRootFactory`` as a provides interface) rather than passing it as the first argument to the ``repoze.bfg.router.Router`` class. As a result the ``repoze.bfg.router.Router`` router class only accepts a single argument: ``registry``. The ``repoze.bfg.router.Router`` class retrieves the root policy via a utility lookup now. The ``repoze.bfg.router.make_app`` API also now performs some important application registrations that were previously handled inside ``repoze.bfg.registry.makeRegistry``. - The ``repoze.bfg.settings.Settings`` class (an instance of which is registered as a utility providing ``repoze.bfg.interfaces.ISettings`` when any application is started) now automatically calls ``repoze.bfg.settings.get_options`` on the options passed to its constructor. This means that usage of ``get_options`` within an application's ``make_app`` function is no longer required (the "raw" ``options`` dict or None may be passed). Deprecations ------------ - Moved the ``repoze.bfg.registry.Settings`` class. This has been moved to ``repoze.bfg.settings.Settings``. A deprecation warning is issued when it is imported from the older location. - Moved the ``repoze.bfg.registry.get_options`` function This has been moved to ``repoze.bfg.settings.get_options``. A deprecation warning is issued when it is imported from the older location. - The ``repoze.bfg.interfaces.IRootPolicy`` interface was renamed within the interfaces package. It has been renamed to ``IRootFactory``. A deprecation warning is issued when it is imported from the older location.
2009-01-09Unused imports.Chris McDonough
2009-01-08Fixed incorrect import. Patch contributed by Peter Koppatz.Malthe Borch
2009-01-08Fixed typo. Patch contributed by Peter Koppatz.Malthe Borch
2009-01-07(no commit message)Tres Seaver
2009-01-07Add a 'post' argument to the DummyRequest ctor.Tres Seaver
2009-01-07Add better testing for DummyRequest; fix a bug in cookie init.Tres Seaver
2009-01-07(no commit message)Chris McDonough
2009-01-07Note existence of the ZODB template.Chris McDonough
2009-01-07Move change history down into its own section.Chris McDonough
2009-01-07- Add a method named ``assert_`` to the DummyTemplateRenderer. ThisChris McDonough
method accepts keyword arguments. Each key/value pair in the keyword arguments causes an assertion to be made that the renderer received this key with a value equal to the asserted value. - Projects generated by the paster templates now use the ``DummyTemplateRenderer.assert_`` method in their view tests.
2009-01-07Depend on repoze.tm instead of repoze.tm2 (we don't need the extra ↵Chris McDonough
``transaction`` egg if we've got the one from ZODB 3.8.1). Add a closer.
2009-01-07Add repoze.tm2 to setup.py / INI file, so changes get saved.Tres Seaver
2009-01-07Duelling commits! (already noted above)Chris McDonough
2009-01-06Test with seq and dict; use a unicode val with a space in it for maximum ↵Chris McDonough
deliciousness.
2009-01-06Note extended return value from get_options.Tres Seaver
2009-01-06Added ``__len__`` and ``__nonzero__`` to ``repoze.bfg.testing:DummyModel``.Tres Seaver
2009-01-06- The ``repoze.bfg.registry.get_options`` callable used to return onlyChris McDonough
framework-specific keys and values in the dictionary it returned. It now returns all the keys and values in the dictionary it is passed *plus* any framework-specific settings culled from the environment. As a side effect, all PasteDeploy application-specific config file settings are made available as attributes of the ``ISettings`` utility from within BFG.
2009-01-06Get new paster template accounted against unreleased version; fix inclusion ↵Tres Seaver
of changelog in docs.
2009-01-06Renamed the existing BFG paster template to ``bfg_starter``.Tres Seaver
Added another template showing default ZODB setup using ``repoze.zodbconn``.
2009-01-06ReST-ify, use ISO dates.Tres Seaver
2009-01-06Prepare for additional paster templates.Tres Seaver
2009-01-06Prep for 0.6.1.Chris McDonough
2009-01-06Make this part of the class docstring.Chris McDonough
2009-01-06 - A ``static`` helper class was added to the ``repoze.bfg.views``Chris McDonough
module. Instances of this class are willing to act as BFG views which return static resources using files on disk. See the :mod:`repoze.bfg.view` docs for more info.
2009-01-06Be more specific.Chris McDonough
2009-01-05 New ModulesChris McDonough
- A new module ``repoze.bfg.url`` has been added. It contains the ``model_url`` API (moved from ``repoze.bfg.traversal``) and an implementation of ``urlencode`` (like Python's ``urllib.urlencode``) which can handle Unicode keys and values in parameters to the ``query`` argument. Deprecations - The ``model_url`` function has been moved from ``repoze.bfg.traversal`` into ``repoze.bfg.url``. It can still be imported from ``repoze.bfg.traversal`` but an import from ``repoze.bfg.traversal`` will emit a DeprecationWarning. Features - The ``repoze.bfg.url.model_url`` API (nee' ``repoze.bfg.traversal.model_url``) now accepts and honors a keyword argument named ``query``. The value of this argument will be used to compose a query string, which will be attached to the generated URL before it is returned. See the API docs (in the docs directory or `on the web <http://static.repoze.org/bfgdocs>`_) for more information.
2008-12-26Bump doc revision up.Chris McDonough
2008-12-26Prep for 0.6.Chris McDonough
2008-12-26Depend on Zope packages expliticly instead of having them come from ↵Chris McDonough
chameleon automagically.
2008-12-23Unused function.Chris McDonough
2008-12-23 - The BFG ``view`` ZCML directive no longer callsChris McDonough
``zope.component.interface.provideInterface`` for the ``for`` interface. We don't support ``provideInterface`` in BFG because it mutates the global registry.
2008-12-23This stuff should have never been checked in; it's in repoze.zcml now.Chris McDonough