diff options
| author | Chris McDonough <chrism@plope.com> | 2011-04-22 13:42:19 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-04-22 13:42:19 -0400 |
| commit | ed7ffe0e2065100f551793b3774656d8bdde0fb0 (patch) | |
| tree | 53637b76d148774c5a7c3b9e103373e33e6c2f9e /CHANGES.txt | |
| parent | c150d77248653172b487326a1059b8c0bc5056e4 (diff) | |
| download | pyramid-ed7ffe0e2065100f551793b3774656d8bdde0fb0.tar.gz pyramid-ed7ffe0e2065100f551793b3774656d8bdde0fb0.tar.bz2 pyramid-ed7ffe0e2065100f551793b3774656d8bdde0fb0.zip | |
- Make sure deprecation warnings aren't raised when tests are run.
- Modify documentation for cross-referencing.
- Use add_view(viewname) syntax rather than add_view(view=viewname)
syntax for normalization.
- Use warnings.warn rather than zope.deprecated in order to make
testing easier.
- Move tests which test deprecated methods of configurator to a
separate test case.
Diffstat (limited to 'CHANGES.txt')
| -rw-r--r-- | CHANGES.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index c0108ff3a..9e967e5c5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -162,6 +162,30 @@ Deprecations ``request.response_content_type = 'abc'`` should be changed to ``request.response.content_type = 'abc'``). +- Passing view-related parameters to + ``pyramid.config.Configurator.add_route`` is now deprecated. Previously, a + view was permitted to be connected to a route using a set of ``view*`` + parameters passed to the ``add_route`` method of the Configurator. This + was a shorthand which replaced the need to perform a subsequent call to + ``add_view``. For example, it was valid (and often recommended) to do:: + + config.add_route('home', '/', view='mypackage.views.myview', + view_renderer='some/renderer.pt') + + Passing ``view*`` arguments to ``add_route`` is now deprecated in favor of + connecting a view to a predefined route via ``Configurator.add_view`` using + the route's ``route_name`` parameter. As a result, the above example + should now be spelled:: + + config.add_route('home', '/') + config.add_view('mypackage.views.myview', route_name='home') + renderer='some/renderer.pt') + + This deprecation was done to reduce confusion observed in IRC, as well as + to (eventually) reduce documentation burden. A deprecation warning is now + issued when any view-related parameter is passed to + ``Configurator.add_route``. + Behavior Changes ---------------- |
