summaryrefslogtreecommitdiff
path: root/docs/whatsnew-1.2.rst
AgeCommit message (Collapse)Author
2019-07-27Fix typosMin ho Kim
2018-11-27Fix links after running linkcheck, excluding HISTORY.txt, a local link, and ↵Steve Piercy
a bad link in WebOb docs
2016-01-03fix grammar on whatsnew document titlesMichael Merickel
2013-04-01remove extra wordMichael Merickel
2013-04-01Consistently link middleware term to the glossaryCatalin Iacob
2013-04-01fix some cross-referencesTshepang Lekhonkhobe
2011-12-01https://docs.pylonsproject.org to http://docs.pylonsproject.org as ↵Chris Davies
readthedocs.org doesn't support https
2011-09-16spelling error fixes issue #280Michael Merickel
2011-09-12call out the debug toolbar explicitlyChris McDonough
2011-09-12gardenChris McDonough
2011-09-07gardenChris McDonough
2011-09-06prep for 1.2a6Chris McDonough
2011-09-03add a changelog entry for work done on this branchChris McDonough
2011-08-31- Undeprecated ``pyramid.traversal.find_model``,Chris McDonough
``pyramid.traversal.model_path``, ``pyramid.traversal.model_path_tuple``, and ``pyramid.url.model_url``, which were all deprecated in Pyramid 1.0. There's just not much cost to keeping them around forever as aliases to their renamed ``resource_*`` prefixed functions. - Undeprecated ``pyramid.view.bfg_view``, which was deprecated in Pyramid 1.0. This is a low-cost alias to ``pyramid.view.view_config`` which we'll just keep around forever.
2011-08-31- The ``request_method`` predicate argument toChris McDonough
``pyramid.config.Configurator.add_view`` and ``pyramid.config.Configurator.add_route`` is now permitted to be a tuple of HTTP method names. Previously it was restricted to being a string representing a single HTTP method name. - Move add_view tests and tween tests to more reasonable places.
2011-08-31- Support an ``onerror`` keyword argument toChris McDonough
``pyramid.config.Configurator.scan()``. This onerror keyword argument is passed to ``venusian.Scanner.scan()`` to influence error behavior when an exception is raised during scanning. - Pyramid now requires Venusian 1.0a1 or better to support the ``onerror`` keyword argument to ``pyramid.config.Configurator.scan``. - Move test fixtures around so test_config tests are not looking "up" for fixtures.
2011-08-23add explanationsChris McDonough
2011-08-23add changesChris McDonough
2011-08-21add a whatsnew-1.2 docChris McDonough
2010-10-25convert remainder of docs to use pyramid instead of repoze.bfgChris McDonough
2010-02-10Prep for release.Chris McDonough
2010-01-11Merge of andrew-docs branch.Chris McDonough
2009-12-22Roles.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-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- Added "Thread Locals" narrative chapter to documentation, and addedChris McDonough
a API chapter documenting the ``repoze.bfg.threadlocals`` module.
2009-12-07Grr.Chris McDonough
2009-12-07Add a note about hooking the ZCA.Chris McDonough
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-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-29Meh.Chris McDonough
2009-11-29Sigh.Chris McDonough
2009-11-28- Unit tests which use ``zope.testing.cleanup.cleanUp`` for theChris McDonough
purpose of isolating tests from one another may now begin to fail due to lack of isolation between tests. Here's why: In repoze.bfg 1.1 and prior, the registry returned by ``repoze.bfg.threadlocal.get_current_registry`` when no other registry had been pushed on to the threadlocal stack was the ``zope.component.globalregistry.base`` global registry (aka the result of ``zope.component.getGlobalSiteManager()``). In repoze.bfg 1.2+, however, the registry returned in this situation is the new module-scope ``repoze.bfg.registry.global_registry`` object. The ``zope.testing.cleanup.cleanUp`` function clears the ``zope.component.globalregistry.base`` global registry unconditionally. However, it does not know about the ``repoze.bfg.registry.global_registry`` object, so it does not clear it. If you use the ``zope.testing.cleanup.cleanUp`` function in the ``setUp`` of test cases in your unit test suite instead of using the (more correct as of 1.1) ``repoze.bfg.testing.setUp``, you will need to replace all calls to ``zope.testing.cleanup.cleanUp`` with a call to ``repoze.bfg.testing.setUp``. If replacing all calls to ``zope.testing.cleanup.cleanUp`` with a call to ``repoze.bfg.testing.setUp`` is infeasible, you can put this bit of code somewhere that is executed exactly **once** (*not* for each test in a test suite; in the `` __init__.py`` of your package would be a reasonable place):: import zope.testing.cleanup from repoze.bfg.testing import setUp zope.testing.cleanup.addCleanUp(setUp) - When there is no "current registry" in the ``repoze.bfg.threadlocal.manager`` threadlocal data structure (this is the case when there is no "current request" or we're not in the midst of a ``r.b.testing.setUp``-bounded unit test), the ``.get`` method of the manager returns a data structure containing a *global* registry. In previous releases, this function returned the global Zope "base" registry: the result of ``zope.component.getGlobalSiteManager``, which is an instance of the ``zope.component.registry.Component`` class. In this release, however, the global registry returns a globally importable instance of the ``repoze.bfg.registry.Registry`` class. This registry instance can always be imported as ``repoze.bfg.registry.global_registry``. Effectively, this means that when you call ``repoze.bfg.threadlocal.get_current_registry`` when no request or ``setUp`` bounded unit test is in effect, you will always get back the global registry that lives in ``repoze.bfg.registry.global_registry``. It also means that :mod:`repoze.bfg` APIs that *call* ``get_current_registry`` will use this registry. This change was made because :mod:`repoze.bfg` now expects the registry it uses to have a slightly different API than a bare instance of ``zope.component.registry.Components``.
2009-11-28Rearrange.Chris McDonough
2009-11-28Add a what's new document.Chris McDonough