summaryrefslogtreecommitdiff
path: root/CHANGES.txt
AgeCommit message (Collapse)Author
2010-01-04Prep for 1.2a10.Chris McDonough
2010-01-03Renderings.Chris McDonough
2010-01-03(no commit message)Chris McDonough
2010-01-03(no commit message)Chris McDonough
2010-01-03FeaturesChris McDonough
-------- - The ``Configurator.add_view`` method now accepts an argument named ``context``. This is an alias for the older argument named ``for_``; it is preferred over ``for_``, but ``for_`` will continue to be supported "forever". - The ``view`` ZCML directive now accepts an attribute named ``context``. This is an alias for the older attribute named ``for``; it is preferred over ``for``, but ``for`` will continue to be supported "forever". - The ``Configurator.add_route`` method now accepts an argument named ``view_context``. This is an alias for the older argument named ``view_for``; it is preferred over ``view_for``, but ``view_for`` will continue to be supported "forever". - The ``route`` ZCML directive now accepts an attribute named ``view_context``. This is an alias for the older attribute named ``view_for``; it is preferred over ``view_for``, but ``view_for`` will continue to be supported "forever". Documentation and Paster Templates ---------------------------------- - All uses of the ``Configurator.add_view`` method that used its ``for_`` argument now use the ``context``argument instead. - All uses of the ``Configurator.add_route`` method that used its ``view_for`` argument now use the ``view_context``argument instead. - All uses of the ``view`` ZCML directive that used its ``for`` attribute now use the ``context`` attribute instead. - All uses of the ``route`` ZCML directive that used its ``view_for`` attribute now use the ``view_context`` attribute instead.
2009-12-30Less restrictive license; add Ian attribution.Chris McDonough
2009-12-27Prep for 1.2a9.Chris McDonough
2009-12-27- Added manual index entries to generated index.Chris McDonough
2009-12-27Latex rendering.Chris McDonough
Documentation licensing.
2009-12-26- Created new top-level documentation section: "ZCML Directives".Chris McDonough
This section contains detailed ZCML directive information, some of which was removed from various narrative chapters.
2009-12-25(no commit message)Chris McDonough
2009-12-24- Document the previously existing (but non-API)Chris McDonough
``repoze.bfg.configuration.Configurator.setup_registry`` method as an official API of a ``Configurator``.
2009-12-24Prep for 1.2a8.Chris McDonough
2009-12-23- The ``repoze.bfg.testing.registerRoutesMapper`` API (added in anChris McDonough
early 1.2 alpha) was deprecated. Its import now generates a deprecation warning. - Docs roles.
2009-12-23- Add ``hook_zca`` and ``unhook_zca`` methods to the ``Configurator``Chris McDonough
API. - Add roles to configurator API docs.
2009-12-23(no commit message)Chris McDonough
2009-12-21- The ``json`` renderer failed to set the response content type toChris McDonough
``application/json``. It now does, by setting ``request.response_content_type`` unless this attribute is already set. - The ``string`` renderer failed to set the response content type to ``text/plain``. It now does, by setting ``request.response_content_type`` unless this attribute is already set.
2009-12-20- Add a ``**kw`` arg to the ``Configurator.add_settings`` API.Chris McDonough
2009-12-20Prep for 1.2a7.Chris McDonough
2009-12-20(no commit message)Chris McDonough
2009-12-20Get rid of add_adapter and add_utility APIs (config.registry.registerAdapter ↵Chris McDonough
and config.registry.registerUtility will work).
2009-12-19- Add four new testing-related APIs to theChris McDonough
``repoze.bfg.configuration.Configurator`` class: ``testing_securitypolicy``, ``testing_models``, ``testing_add_subscriber``, and ``testing_add_template``. These were added in order to provide more direct access to the functionality of the ``repoze.bfg.testing`` APIs named ``registerDummySecurityPolicy``, ``registerModels``, ``registerEventListener``, and ``registerTemplateRenderer`` when a configurator is used. The ``testing`` APIs named are nominally deprecated (although they will likely remain around "forever", as they are in heavy use in the wild). - Doc-deprecated most helper functions in the ``repoze.bfg.testing`` module. These helper functions likely won't be removed any time soon, nor will they generate a warning any time soon, due to their heavy use in the wild, but equivalent behavior exists in methods of a Configurator.
2009-12-19- Add a new API to the ``repoze.bfg.configuration.Configurator``Chris McDonough
class: ``add_settings``. This API can be used to add "settings" (information returned within via the ``repoze.bfg.settings.get_settings`` API) after the configurator has been initially set up. This is most useful for testing purposes.
2009-12-19Add notes about nominal deprecations.Chris McDonough
2009-12-19- Add two new APIs to the ``repoze.bfg.configuration.Configurator``Chris McDonough
class: ``add_adapter`` and ``add_utility``. These, respectively, perform the same functions as the ``registerAdapter`` and ``registerUtility`` functions of a ZCA registry. They were added to allow for a more consistent testing API for applications that make use of the ZCA directly. - Cause the ``adapter``, ``utility``, and ``subscriber`` ZCML directives to use a ``Configurator`` instance and associated configurator APIs rather than a ZCA registry directly.
2009-12-19More docs.Chris McDonough
2009-12-19- Add a ``custom_predicates`` argument to the ``Configurator``Chris McDonough
``add_view`` method, the ``bfg_view`` decorator and the attribute list of the ZCML ``view`` directive. If ``custom_predicates`` is specified, it must be a sequence of predicate callables (a predicate callable accepts two arguments: ``context`` and ``request`` and returns ``True`` or ``False``). The associated view callable will only be invoked if all custom predicates return ``True``. Use one or more custom predicates when no existing predefined predicate is useful. Predefined and custom predicates can be mixed freely. - Add a ``custom_predicates`` argument to the ``Configurator`` ``add_route`` and the attribute list of the ZCML ``route`` directive. If ``custom_predicates`` is specified, it must be a sequence of predicate callables (a predicate callable accepts two arguments: ``context`` and ``request`` and returns ``True`` or ``False``). The associated route will match will only be invoked if all custom predicates return ``True``, else route matching continues. Use one or more custom predicates when no existing predefined predicate is useful. Predefined and custom predicates can be mixed freely.
2009-12-18Prep for 1.2a6.Chris McDonough
2009-12-17FeaturesChris McDonough
-------- - The ``Configurator`` object now has two new methods: ``begin`` and ``end``. The ``begin`` method is meant to be called before any "configuration" begins (e.g. before ``add_view``, et. al are called). The ``end`` method is meant to be called after all "configuration" is complete. Previously, before there was imperative configuration at all (1.1 and prior), configuration begin and end was invariably implied by the process of loading a ZCML file. When a ZCML load happened, the threadlocal data structure containing the request and registry was modified before the load, and torn down after the load, making sure that all framework code that needed ``get_current_registry`` for the duration of the ZCML load was satisfied. Some API methods called during imperative configuration, (such as ``Configurator.add_view`` when a renderer is involved) end up for historical reasons calling ``get_current_registry``. However, in 1.2a5 and below, the Configurator supplied no functionality that allowed people to make sure that ``get_current_registry`` returned the registry implied by the configurator being used. ``begin`` now serves this purpose. Inversely, ``end`` pops the thread local stack, undoing the actions of ``begin``. We make this boundary explicit to reduce the potential for confusion when the configurator is used in different circumstances (e.g. in unit tests and app code vs. just in initial app setup). Existing code written for 1.2a1-1.2a5 which does not call ``begin`` or ``end`` continues to work in the same manner it did before. It is however suggested that this code be changed to call ``begin`` and ``end`` to reduce the potential for confusion in the future. - All ``paster`` templates which generate an application skeleton now make use of the new ``begin`` and ``end`` methods of the Configurator they use in their respective copies of ``run.py`` and ``tests.py``. Documentation ------------- - All documentation that makes use of a ``Configurator`` object to do application setup and test setup now makes use of the new ``begin`` and ``end`` methods of the configurator. Bug Fixes --------- - When a ``repoze.bfg.exceptions.NotFound`` or ``repoze.bfg.exceptions.Forbidden`` *class* (as opposed to instance) was raised as an exception within a root factory (or route root factory), the exception would not be caught properly by the ``repoze.bfg.`` Router and it would propagate to up the call stack, as opposed to rendering the not found view or the forbidden view as would have been expected.
2009-12-17(no commit message)Chris McDonough
2009-12-17- When Chameleon page or text templates were added imperatively (viaChris McDonough
``Configurator.add_view`` or some derivative), they too-eagerly attempted to look up the ``reload_templates`` setting via ``get_settings``, meaning they were always registered in non-auto-reload-mode (the default). Each now waits until its respective ``template`` attribute is accessed to look up the value.
2009-12-16Bug FixesChris McDonough
--------- - When a route with the same name as a previously registered route was added, the old route was not removed from the mapper's routelist. Symptom: the old registered route would be used (and possibly matched) during route lookup when it should not have had a chance to ever be used.
2009-12-10Rendering.Chris McDonough
2009-12-10Prep for 1.2a5.Chris McDonough
2009-12-10- Added a "Special Exceptions" section to the "Views" narrativeChris McDonough
documentation chapter explaining the effect of raising ``repoze.bfg.exceptions.NotFound`` and ``repoze.bfg.exceptions.Forbidden`` from within view code. - When the ``repoze.bfg.exceptions.NotFound`` or ``repoze.bfg.exceptions.Forbidden`` error is raised from within a custom root factory or the ``factory`` of a route, the appropriate response is now sent to the requesting user agent (the result of the notfound view or the forbidden view, respectively). When these errors are raised from within a root factory, the ``context`` passed to the notfound or forbidden view will be ``None``. Also, the request will not be decorated with ``view_name``, ``subpath``, ``context``, etc. as would normally be the case if traversal had been allowed to take place.
2009-12-09- A new dependency on the ``twill`` package was added to theChris McDonough
``setup.py`` ``tests_require`` argument (Twill will only be downloaded when :mod:`repoze.bfg` ``setup.py test`` or ``setup.py nosetests`` is invoked).
2009-12-09- Added "Thread Locals" narrative chapter to documentation, and addedChris McDonough
a API chapter documenting the ``repoze.bfg.threadlocals`` module.
2009-12-09- Remove explanation of changing the request type in a new requestChris McDonough
event subscriber, as other predicates are now usually an easier way to get this done.
2009-12-09- The exception class representing the error raised by various methodsChris McDonough
of a ``Configurator`` is now importable as ``repoze.bfg.exceptions.ConfigurationError``.
2009-12-09- General documentation freshening which takes imperativeChris McDonough
configuration into account in more places and uses glossary references more liberally.
2009-12-07Prep for 1.2a4.Chris McDonough
2009-12-04- Operation on GAE was broken, presumably because theChris McDonough
``repoze.bfg.configuration`` module began to attempt to import the ``repoze.bfg.chameleon_zpt`` and ``repoze.bfg.chameleon_text`` modules, and these cannot be used on non-CPython platforms. It now tolerates startup time import failures for these modules, and only raise an import error when a template from one of these packages is actually used.
2009-12-03- ``repoze.bfg.testing.DummyModel`` now accepts a new constructorChris McDonough
keyword argument: ``__provides__``. If this constructor argument is provided, it should be an interface or a tuple of interfaces. The resulting model will then provide these interfaces (they will be attached to the constructed model via ``zope.interface.alsoProvides``).
2009-12-03Rendering.Chris McDonough
2009-12-02Prep for 1.2a3.Chris McDonough
2009-12-02- When two views were registered with differering ``for`` interfacesChris McDonough
or classes, and the ``for`` of first view registered was a superclass of the second, the ``repoze.bfg` view machinery would incorrectly associate the two views with the same "multiview". Multiviews are meant to be collections of views that have *exactly* the same for/request/viewname values, without taking inheritance into account. Symptom: wrong view callable found even when you had correctly specified a ``for_`` interface/class during view configuration for one or both view configurations.
2009-12-02- The ``repoze.bfg.url.route_url`` function inappropriately passedChris McDonough
along ``_query`` and/or ``_anchor`` arguments to the ``mapper.generate`` function, resulting in blowups.
2009-12-01- The ``repoze.bfg.templating`` module has been removed; it had beenChris McDonough
deprecated in 1.1 and hasn't possessed any APIs since before 1.0.
2009-11-29Prep for 1.2a2.Chris McDonough
2009-11-29- Fixed "Startup" narrative documentation chapter; it was explainingChris McDonough
"the old way" an application constructor worked.