summaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2009-10-17Be more explicit.Chris McDonough
2009-10-16Prep for 1.1a6.Chris McDonough
2009-10-16- Add ``zcml_configure`` to ``repoze.bfg.testing`` module API. ThisChris McDonough
function populates a component registry from a ZCML file for testing purposes.
2009-10-16- Added "Creating Integration Tests" section to unit testing narrativeChris McDonough
documentation chapter.
2009-10-15FeaturesChris McDonough
-------- - Add ``setUp`` and ``tearDown`` functions to the ``repoze.bfg.testing`` module. Using ``setUp`` in a test setup and ``tearDown`` in a test teardown is now the recommended way to do component registry setup and teardown. Previously, it was recommended that a single function named ``repoze.bfg.testing.cleanUp`` be called in both the test setup and tear down. ``repoze.bfg.testing.cleanUp`` still exists (and will exist "forever" due to its widespread use); it is now just an alias for ``repoze.bfg.testing.setUp`` and is nominally deprecated. - The BFG component registry is now available in view and event subscriber code as an attribute of the request ie. ``request.registry``. This fact is currently undocumented except for this note, because BFG developers never need to interact with the registry directly anywhere else. - The BFG component registry now inherits from ``dict``, meaning that it can optionally be used as a simple dictionary. *Component* registrations performed against it via e.g. ``registerUtility``, ``registerAdapter``, and similar API methods are kept in a completely separate namespace than its dict members, so using the its component API methods won't effect the keys and values in the dictionary namespace. Likewise, though the component registry "happens to be" a dictionary, use of mutating dictionary methods such as ``__setitem__`` will have no influence on any component registrations made against it. In other words, the registry object you obtain via e.g. ``repoze.bfg.threadlocal.get_current_registry`` or ``request.registry`` happens to be both a component registry and a dictionary, but using its component-registry API won't impact data added to it via its dictionary API and vice versa. This is a forward compatibility move based on the goals of "marco". Documentation ------------- - Various tutorial test modules updated to use ``repoze.bfg.testing.setUp`` and ``repoze.bfg.testing.tearDown`` methods in order to encourage this as best practice going forward. Backwards Incompatibilities --------------------------- - Importing ``getSiteManager`` and ``get_registry`` from ``repoze.bfg.registry`` is no longer supported. These imports were deprecated in repoze.bfg 1.0. Import of ``getSiteManager`` should be done as ``from zope.component import getSiteManager``. Import of ``get_registry`` should be done as ``from repoze.bfg.threadlocal import get_current_registry``. This was done to prevent a circular import dependency. - Code bases which alternately invoke both ``zope.testing.cleanup.cleanUp`` and ``repoze.bfg.testing.cleanUp`` (treating them equivalently, using them interchangeably) in the setUp/tearDown of unit tests will begin to experience test failures due to lack of test isolation. The "right" mechanism is ``repoze.bfg.testing.cleanUp`` (or the combination of ``repoze.bfg.testing.setUp`` and ``repoze.bfg.testing.tearDown``). but a good number of legacy codebases will use ``zope.testing.cleanup.cleanUp`` instead. We support ``zope.testing.cleanup.cleanUp`` but not in combination with ``repoze.bfg.testing.cleanUp`` in the same codebase. You should use one or the other test cleanup function in a single codebase, but not both. Internal -------- - Created new ``repoze.bfg.configuration`` module which assumes responsibilities previously held by the ``repoze.bfg.registry`` and ``repoze.bfg.router`` modules (avoid a circular import dependency). - The result of the ``zope.component.getSiteManager`` function in unit tests set up with ``repoze.bfg.testing.cleanUp`` or ``repoze.bfg.testing.setUp`` will be an instance of ``repoze.bfg.registry.Registry`` instead of the global ``zope.component.globalregistry.base`` registry. This also means that the threadlocal ZCA API functions such as ``getAdapter`` and ``getUtility`` as well as internal BFG machinery (such as ``model_url`` and ``route_url``) will consult this registry within unit tests. This is a forward compatibility move based on the goals of "marco". - Removed ``repoze.bfg.testing.addCleanUp`` function and associated module-scope globals. This was never an API.
2009-10-14- Add ``xhr``, ``accept``, and ``header`` view configurationChris McDonough
predicates to ZCML view declaration, ZCML route declaration, and ``bfg_view`` decorator. See the ``Views`` narrative documentation chapter for more information about these predicates.
2009-10-11Use 1.1 index.Chris McDonough
Explain where "request" comes from in templates.
2009-10-11Include vhosting info for modwsgi.Chris McDonough
2009-10-11Protip from Graham.Chris McDonough
2009-10-10Prep for 1.1a5.Chris McDonough
2009-10-10Move to renderers.Chris McDonough
2009-10-10Move to renderers.Chris McDonough
2009-10-10Move to renderers. Add tests.Chris McDonough
2009-10-10Move to renderers.Chris McDonough
Add tests.
2009-10-10- Add a new ``repoze.bfg.testing`` API: ``registerRoute``, forChris McDonough
registering routes to satisfy calls to e.g. ``repoze.bfg.url.route_url`` in unit tests.
2009-10-10cleanUp is no longer necessary.Chris McDonough
2009-10-10More renderer conversions.Chris McDonough
2009-10-10- The ``notfound`` and ``forbidden`` ZCML directives now accept theChris McDonough
following addtional attributes: ``attr``, ``renderer``, and ``wrapper``. These have the same meaning as they do in the context of a ZCML ``view`` directive.
2009-10-10Use a renderer.Chris McDonough
2009-10-10Rely on new attrs of notfound_view so we can use a renderer.Chris McDonough
2009-10-10Convert bfgwiki to use renderers.Chris McDonough
2009-10-10Tweaks.Chris McDonough
2009-10-09Fix in the face of renderers.Chris McDonough
2009-10-09Normalize.Chris McDonough
2009-10-09Remove comment.Chris McDonough
2009-10-09Use renderers.Chris McDonough
2009-10-09view -> static directive.Chris McDonough
2009-10-09view -> static directive.Chris McDonough
2009-10-09route -> static directive.Chris McDonough
2009-10-09Protip from elpargo.Chris McDonough
2009-10-09Fix ordering.Chris McDonough
2009-10-04(no commit message)Chris McDonough
2009-09-30Mention modwsgi.Chris McDonough
2009-09-30Put labels on arrows.Chris McDonough
2009-09-30- Add a diagram which explains the operation of the BFG router to theChris McDonough
"Router" narrative chapter.
2009-09-30- Describe "request-only" view calling conventions inside theChris McDonough
urldispatch narrative chapter, where it's most helpful.
2009-09-30Note.Chris McDonough
2009-09-30Fix.Chris McDonough
2009-09-30Add narrative docs about the append_slash_notfound_view.Chris McDonough
2009-09-30- For behavior like Django's ``APPEND_SLASH=True``, use theChris McDonough
``repoze.bfg.view.append_slash_notfound_view`` view as the Not Found view in your application. When this view is the Not Found view (indicating that no view was found), and any routes have been defined in the configuration of your application, if the value of ``PATH_INFO`` does not already end in a slash, and if the value of ``PATH_INFO`` *plus* a slash matches any route's path, do an HTTP redirect to the slash-appended PATH_INFO. Note that this will *lose* ``POST`` data information (turning it into a GET), so you shouldn't rely on this to redirect POST requests.
2009-09-30- The import of ``repoze.bfg.view.NotFound`` is deprecated in favor ofChris McDonough
``repoze.bfg.exceptions.NotFound``. The old location still functions, but emits a deprecation warning. - The import of ``repoze.bfg.security.Unauthorized`` is deprecated in favor of ``repoze.bfg.exceptions.Forbidden``. The old location still functions but emits a deprecation warning. The rename from ``Unauthorized`` to ``Forbidden`` brings parity to the the name of the exception and the system view it invokes when raised. - New ``repoze.bfg.exceptions`` module was created to house exceptions that were previously sprinkled through various modules. - An ``exceptions`` API chapter was added, documenting the new ``repoze.bfg.exceptions`` module.
2009-09-26Added missing word found by Stephen WaterburyCarlos de la Guardia
2009-09-24Merge jpenny changes.Chris McDonough
2009-09-24Add traversal diagram.Chris McDonough
2009-09-23Prep for 1.1a4.Chris McDonough
2009-09-21Fix docs after updates.Chris McDonough
2009-09-19(no commit message)Chris McDonough
2009-09-19Typos.Chris McDonough
2009-09-19- Added a tutorial which explains how to use ``repoze.session``Chris McDonough
(ZODB-based sessions) in a ZODB-based repoze.bfg app.
2009-09-19- Added a tutorial which explains how to add ZEO to a ZODB-basedChris McDonough
``repoze.bfg`` application.