Michael Merickel
2017-01-25 263308594666398bf2a9edb6ee2fac9ddc71bfdf
commit | author | age
4b818c 1 1.5 (2014-04-08)
CM 2 ================
3
170486 4 - Python 3.4 compatibility.
SP 5
4b818c 6 - Avoid crash in ``pserve --reload`` under Py3k, when iterating over possibly
CM 7   mutated ``sys.modules``.
8
9 - ``UnencryptedCookieSessionFactoryConfig`` failed if the secret contained
10   higher order characters. See https://github.com/Pylons/pyramid/issues/1246
11
12 - Fixed a bug in ``UnencryptedCookieSessionFactoryConfig`` and
13   ``SignedCookieSessionFactory`` where ``timeout=None`` would cause a new
14   session to always be created. Also in ``SignedCookieSessionFactory`` a
15   ``reissue_time=None`` would cause an exception when modifying the session.
16   See https://github.com/Pylons/pyramid/issues/1247
17
18 - Updated docs and scaffolds to keep in step with new 2.0 release of
19   ``Lingua``.  This included removing all ``setup.cfg`` files from scaffolds
20   and documentation environments.
21
22 1.5b1 (2014-02-08)
23 ==================
24
25 Features
26 --------
27
28 - We no longer eagerly clear ``request.exception`` and ``request.exc_info`` in
29   the exception view tween.  This makes it possible to inspect exception
30   information within a finished callback.  See
31   https://github.com/Pylons/pyramid/issues/1223.
32
33 1.5a4 (2014-01-28)
34 ==================
35
36 Features
37 --------
38
39 - Updated scaffolds with new theme, fixed documentation and sample project.
40
41 Bug Fixes
42 ---------
43
44 - Depend on a newer version of WebOb so that we pull in some crucial bug-fixes
45   that were showstoppers for functionality in Pyramid.
46
47 - Add a trailing semicolon to the JSONP response. This fixes JavaScript syntax
48   errors for old IE versions. See https://github.com/Pylons/pyramid/pull/1205
49
50 - Fix a memory leak when the configurator's ``set_request_property`` method was
51   used or when the configurator's ``add_request_method`` method was used with
52   the ``property=True`` attribute.  See
53   https://github.com/Pylons/pyramid/issues/1212 .
54
55 1.5a3 (2013-12-10)
56 ==================
57
58 Features
59 --------
60
61 - An authorization API has been added as a method of the
62   request: ``request.has_permission``.
63
64   ``request.has_permission`` is a method-based alternative to the
65   ``pyramid.security.has_permission`` API and works exactly the same.  The
66   older API is now deprecated.
67
68 - Property API attributes have been added to the request for easier access to
69   authentication data: ``request.authenticated_userid``,
70   ``request.unauthenticated_userid``, and ``request.effective_principals``.
71
72   These are analogues, respectively, of
73   ``pyramid.security.authenticated_userid``,
74   ``pyramid.security.unauthenticated_userid``, and
75   ``pyramid.security.effective_principals``.  They operate exactly the same,
76   except they are attributes of the request instead of functions accepting a
77   request.  They are properties, so they cannot be assigned to.  The older
78   function-based APIs are now deprecated.
79
80 - Pyramid's console scripts (``pserve``, ``pviews``, etc) can now be run
81   directly, allowing custom arguments to be sent to the python interpreter
82   at runtime. For example::
83
84       python -3 -m pyramid.scripts.pserve development.ini
85
86 - Added a specific subclass of ``HTTPBadRequest`` named
87   ``pyramid.exceptions.BadCSRFToken`` which will now be raised in response
88   to failures in ``check_csrf_token``.
89   See https://github.com/Pylons/pyramid/pull/1149
90
91 - Added a new ``SignedCookieSessionFactory`` which is very similar to the
92   ``UnencryptedCookieSessionFactoryConfig`` but with a clearer focus on signing
93   content. The custom serializer arguments to this function should only focus
94   on serializing, unlike its predecessor which required the serializer to also
95   perform signing.  See https://github.com/Pylons/pyramid/pull/1142 .  Note
96   that cookies generated using ``SignedCookieSessionFactory`` are not
97   compatible with cookies generated using ``UnencryptedCookieSessionFactory``,
98   so existing user session data will be destroyed if you switch to it.
99
100 - Added a new ``BaseCookieSessionFactory`` which acts as a generic cookie
101   factory that can be used by framework implementors to create their own
102   session implementations. It provides a reusable API which focuses strictly
103   on providing a dictionary-like object that properly handles renewals,
104   timeouts, and conformance with the ``ISession`` API.
105   See https://github.com/Pylons/pyramid/pull/1142
106
107 - The anchor argument to ``pyramid.request.Request.route_url`` and
108   ``pyramid.request.Request.resource_url`` and their derivatives will now be
109   escaped via URL quoting to ensure minimal conformance.  See
110   https://github.com/Pylons/pyramid/pull/1183
111
112 - Allow sending of ``_query`` and ``_anchor`` options to
113   ``pyramid.request.Request.static_url`` when an external URL is being
114   generated.
115   See https://github.com/Pylons/pyramid/pull/1183
116
117 - You can now send a string as the ``_query`` argument to
118   ``pyramid.request.Request.route_url`` and
119   ``pyramid.request.Request.resource_url`` and their derivatives.  When a
120   string is sent instead of a list or dictionary. it is URL-quoted however it
121   does not need to be in ``k=v`` form.  This is useful if you want to be able
122   to use a different query string format than ``x-www-form-urlencoded``.  See
123   https://github.com/Pylons/pyramid/pull/1183
124
125 - ``pyramid.testing.DummyRequest`` now has a ``domain`` attribute to match the
126   new WebOb 1.3 API.  Its value is ``example.com``.
127
128 Bug Fixes
129 ---------
130
131 - Fix the ``pcreate`` script so that when the target directory name ends with a
132   slash it does not produce a non-working project directory structure.
133   Previously saying ``pcreate -s starter /foo/bar/`` produced different output
134   than  saying ``pcreate -s starter /foo/bar``.  The former did not work
135   properly.
136
137 - Fix the ``principals_allowed_by_permission`` method of
138   ``ACLAuthorizationPolicy`` so it anticipates a callable ``__acl__``
139   on resources.  Previously it did not try to call the ``__acl__``
140   if it was callable.
141
142 - The ``pviews`` script did not work when a url required custom request
143   methods in order to perform traversal. Custom methods and descriptors added
144   via ``pyramid.config.Configurator.add_request_method`` will now be present,
145   allowing traversal to continue.
146   See https://github.com/Pylons/pyramid/issues/1104
147
148 - Remove unused ``renderer`` argument from ``Configurator.add_route``.
149
150 - Allow the ``BasicAuthenticationPolicy`` to work with non-ascii usernames
151   and passwords. The charset is not passed as part of the header and different
152   browsers alternate between UTF-8 and Latin-1, so the policy now attempts
153   to decode with UTF-8 first, and will fallback to Latin-1.
154   See https://github.com/Pylons/pyramid/pull/1170
155
156 - The ``@view_defaults`` now apply to notfound and forbidden views
157   that are defined as methods of a decorated class.
158   See https://github.com/Pylons/pyramid/issues/1173
159
160 Documentation
161 -------------
162
163 - Added a "Quick Tutorial" to go with the Quick Tour
164
165 - Removed mention of ``pyramid_beaker`` from docs.  Beaker is no longer
166   maintained.  Point people at ``pyramid_redis_sessions`` instead.
167
168 - Add documentation for ``pyramid.interfaces.IRendererFactory`` and
169   ``pyramid.interfaces.IRenderer``.
170
171 Backwards Incompatibilities
172 ---------------------------
173
174 - The key/values in the ``_query`` parameter of ``request.route_url`` and the
175   ``query`` parameter of ``request.resource_url`` (and their variants), used
176   to encode a value of ``None`` as the string ``'None'``, leaving the resulting
177   query string to be ``a=b&key=None``. The value is now dropped in this
178   situation, leaving a query string of ``a=b&key=``.
179   See https://github.com/Pylons/pyramid/issues/1119
180
181 Deprecations
182 ------------
183
184 - Deprecate the ``pyramid.interfaces.ITemplateRenderer`` interface. It was
185   ill-defined and became unused when Mako and Chameleon template bindings were
186   split into their own packages.
187
188 - The ``pyramid.session.UnencryptedCookieSessionFactoryConfig`` API has been
189   deprecated and is superseded by the
190   ``pyramid.session.SignedCookieSessionFactory``.  Note that while the cookies
191   generated by the ``UnencryptedCookieSessionFactoryConfig``
192   are compatible with cookies generated by old releases, cookies generated by
193   the SignedCookieSessionFactory are not. See
194   https://github.com/Pylons/pyramid/pull/1142
195
196 - The ``pyramid.security.has_permission`` API is now deprecated.  Instead, use
197   the newly-added ``has_permission`` method of the request object.
198
199 - The ``pyramid.security.effective_principals`` API is now deprecated.
200   Instead, use the newly-added ``effective_principals`` attribute of the
201   request object.
202
203 - The ``pyramid.security.authenticated_userid`` API is now deprecated.
204   Instead, use the newly-added ``authenticated_userid`` attribute of the
205   request object.
206
207 - The ``pyramid.security.unauthenticated_userid`` API is now deprecated.
208   Instead, use the newly-added ``unauthenticated_userid`` attribute of the
209   request object.
210
211 Dependencies
212 ------------
213
214 - Pyramid now depends on WebOb>=1.3 (it uses ``webob.cookies.CookieProfile``
215   from 1.3+).
216
217 1.5a2 (2013-09-22)
218 ==================
219
220 Features
221 --------
222
223 - Users can now provide dotted Python names to as the ``factory`` argument
224   the Configurator methods named ``add_{view,route,subscriber}_predicate``
225   (instead of passing the predicate factory directly, you can pass a
226   dotted name which refers to the factory).
227
228 Bug Fixes
229 ---------
230
231 - Fix an exception in ``pyramid.path.package_name`` when resolving the package
232   name for namespace packages that had no ``__file__`` attribute.
233
234 Backwards Incompatibilities
235 ---------------------------
236
237 - Pyramid no longer depends on or configures the Mako and Chameleon templating
238   system renderers by default.  Disincluding these templating systems by
239   default means that the Pyramid core has fewer dependencies and can run on
240   future platforms without immediate concern for the compatibility of its
241   templating add-ons.  It also makes maintenance slightly more effective, as
242   different people can maintain the templating system add-ons that they
243   understand and care about without needing commit access to the Pyramid core,
244   and it allows users who just don't want to see any packages they don't use
245   come along for the ride when they install Pyramid.
246
247   This means that upon upgrading to Pyramid 1.5a2+, projects that use either
248   of these templating systems will see a traceback that ends something like
249   this when their application attempts to render a Chameleon or Mako template::
250
251      ValueError: No such renderer factory .pt
252
253   Or::
254
255      ValueError: No such renderer factory .mako
256
257   Or::
258
259      ValueError: No such renderer factory .mak
260
261   Support for Mako templating has been moved into an add-on package named
262   ``pyramid_mako``, and support for Chameleon templating has been moved into
263   an add-on package named ``pyramid_chameleon``.  These packages are drop-in
264   replacements for the old built-in support for these templating langauges.
265   All you have to do is install them and make them active in your configuration
266   to register renderer factories for ``.pt`` and/or ``.mako`` (or ``.mak``) to
267   make your application work again.
268
269   To re-add support for Chameleon and/or Mako template renderers into your
270   existing projects, follow the below steps.
271
272   If you depend on Mako templates:
273
274   * Make sure the ``pyramid_mako`` package is installed.  One way to do this
275     is by adding ``pyramid_mako`` to the ``install_requires`` section of your
276     package's ``setup.py`` file and afterwards rerunning ``setup.py develop``::
277
278         setup(
279             #...
280             install_requires=[
281                 'pyramid_mako',         # new dependency
282                 'pyramid',
283                 #...
284             ],
285         )
286
287   * Within the portion of your application which instantiates a Pyramid
288     ``pyramid.config.Configurator`` (often the ``main()`` function in
289     your project's ``__init__.py`` file), tell Pyramid to include the
290     ``pyramid_mako`` includeme::
291
292         config = Configurator(.....)
293         config.include('pyramid_mako')
294
295   If you depend on Chameleon templates:
296
297   * Make sure the ``pyramid_chameleon`` package is installed.  One way to do
298     this is by adding ``pyramid_chameleon`` to the ``install_requires`` section
299     of your package's ``setup.py`` file and afterwards rerunning
300     ``setup.py develop``::
301
302         setup(
303             #...
304             install_requires=[
305                 'pyramid_chameleon',         # new dependency
306                 'pyramid',
307                 #...
308             ],
309         )
310
311   * Within the portion of your application which instantiates a Pyramid
312     ``~pyramid.config.Configurator`` (often the ``main()`` function in
313     your project's ``__init__.py`` file), tell Pyramid to include the
314     ``pyramid_chameleon`` includeme::
315
316         config = Configurator(.....)
317         config.include('pyramid_chameleon')
318
319   Note that it's also fine to install these packages into *older* Pyramids for
320   forward compatibility purposes.  Even if you don't upgrade to Pyramid 1.5
321   immediately, performing the above steps in a Pyramid 1.4 installation is
322   perfectly fine, won't cause any difference, and will give you forward
323   compatibility when you eventually do upgrade to Pyramid 1.5.
324
325   With the removal of Mako and Chameleon support from the core, some
326   unit tests that use the ``pyramid.renderers.render*`` methods may begin to
327   fail.  If any of your unit tests are invoking either
328   ``pyramid.renderers.render()``  or ``pyramid.renderers.render_to_response()``
329   with either Mako or Chameleon templates then the
330   ``pyramid.config.Configurator`` instance in effect during
331   the unit test should be also be updated to include the addons, as shown
332   above. For example::
333
334         class ATest(unittest.TestCase):
335             def setUp(self):
336                 self.config = pyramid.testing.setUp()
337                 self.config.include('pyramid_mako')
338
339             def test_it(self):
340                 result = pyramid.renderers.render('mypkg:templates/home.mako', {})
341
342   Or::
343
344         class ATest(unittest.TestCase):
345             def setUp(self):
346                 self.config = pyramid.testing.setUp()
347                 self.config.include('pyramid_chameleon')
348
349             def test_it(self):
350                 result = pyramid.renderers.render('mypkg:templates/home.pt', {})
351
352 - If you're using the Pyramid debug toolbar, when you upgrade Pyramid to
353   1.5a2+, you'll also need to upgrade the ``pyramid_debugtoolbar`` package to
354   at least version 1.0.8, as older toolbar versions are not compatible with
355   Pyramid 1.5a2+ due to the removal of Mako support from the core.  It's
356   fine to use this newer version of the toolbar code with older Pyramids too.
357
358 - Removed the ``request.response_*`` varying attributes. These attributes
359   have been deprecated since Pyramid 1.1, and as per the deprecation policy,
360   have now been removed.
361
362 - ``request.response`` will no longer be mutated when using the
363   ``pyramid.renderers.render()`` API.  Almost all renderers mutate the
364   ``request.response`` response object (for example, the JSON renderer sets
365   ``request.response.content_type`` to ``application/json``), but this is
366   only necessary when the renderer is generating a response; it was a bug
367   when it was done as a side effect of calling ``pyramid.renderers.render()``.
368
369 - Removed the ``bfg2pyramid`` fixer script.
370
371 - The ``pyramid.events.NewResponse`` event is now sent **after** response
372   callbacks are executed.  It previously executed before response callbacks
373   were executed.  Rationale: it's more useful to be able to inspect the response
374   after response callbacks have done their jobs instead of before.
375
376 - Removed the class named ``pyramid.view.static`` that had been deprecated
377   since Pyramid 1.1.  Instead use ``pyramid.static.static_view`` with
378   ``use_subpath=True`` argument.
379
380 - Removed the ``pyramid.view.is_response`` function that had been deprecated
381   since Pyramid 1.1.  Use the ``pyramid.request.Request.is_response`` method
382   instead.
383
384 - Removed the ability to pass the following arguments to
385   ``pyramid.config.Configurator.add_route``: ``view``, ``view_context``.
386   ``view_for``, ``view_permission``, ``view_renderer``, and ``view_attr``.
387   Using these arguments had been deprecated since Pyramid 1.1.  Instead of
388   passing view-related arguments to ``add_route``, use a separate call to
389   ``pyramid.config.Configurator.add_view`` to associate a view with a route
390   using its ``route_name`` argument.  Note that this impacts the
391   ``pyramid.config.Configurator.add_static_view`` function too, because it
392   delegates to ``add_route``.
393
394 - Removed the ability to influence and query a ``pyramid.request.Request``
395   object as if it were a dictionary.  Previously it was possible to use methods
396   like ``__getitem__``, ``get``, ``items``, and other dictlike methods to
397   access values in the WSGI environment.  This behavior had been deprecated
398   since Pyramid 1.1.  Use methods of ``request.environ`` (a real dictionary)
399   instead.
400
401 - Removed ancient backwards compatibily hack in
402   ``pyramid.traversal.DefaultRootFactory`` which populated the ``__dict__`` of
403   the factory with the matchdict values for compatibility with BFG 0.9.
404
405 - The ``renderer_globals_factory`` argument to the
406   ``pyramid.config.Configurator` constructor and its ``setup_registry`` method
407   has been removed.  The ``set_renderer_globals_factory`` method of
408   ``pyramid.config.Configurator`` has also been removed.  The (internal)
409   ``pyramid.interfaces.IRendererGlobals`` interface was also removed.  These
410   arguments, methods and interfaces had been deprecated since 1.1.  Use a
411   ``BeforeRender`` event subscriber as documented in the "Hooks" chapter of the
412   Pyramid narrative documentation instead of providing renderer globals values
413   to the configurator.
414
415 Deprecations
416 ------------
417
418 - The ``pyramid.config.Configurator.set_request_property`` method now issues
419   a deprecation warning when used.  It had been docs-deprecated in 1.4
420   but did not issue a deprecation warning when used.
421
422 1.5a1 (2013-08-30)
423 ==================
424
425 Features
426 --------
427
428 - A new http exception subclass named ``pyramid.httpexceptions.HTTPSuccessful``
429   was added.  You can use this class as the ``context`` of an exception
430   view to catch all 200-series "exceptions" (e.g. "raise HTTPOk").  This
431   also allows you to catch *only* the ``HTTPOk`` exception itself; previously
432   this was impossible because a number of other exceptions
433   (such as ``HTTPNoContent``) inherited from ``HTTPOk``, but now they do not.
434
435 - You can now generate "hybrid" urldispatch/traversal URLs more easily
436   by using the new ``route_name``, ``route_kw`` and ``route_remainder_name``
437   arguments to  ``request.resource_url`` and ``request.resource_path``.  See
438   the new section of the "Combining Traversal and URL Dispatch" documentation
439   chapter entitled  "Hybrid URL Generation".
440
441 - It is now possible to escape double braces in Pyramid scaffolds (unescaped,
442   these represent replacement values).  You can use ``\{\{a\}\}`` to
443   represent a "bare" ``{{a}}``.  See
444   https://github.com/Pylons/pyramid/pull/862
445
446 - Add ``localizer`` and ``locale_name`` properties (reified) to the request.
447   See https://github.com/Pylons/pyramid/issues/508.  Note that the
448   ``pyramid.i18n.get_localizer`` and ``pyramid.i18n.get_locale_name`` functions
449   now simply look up these properties on the request.
450
451 - Add ``pdistreport`` script, which prints the Python version in use, the
452   Pyramid version in use, and the version number and location of all Python
453   distributions currently installed.
454
455 - Add the ability to invert the result of any view, route, or subscriber
456   predicate using the ``not_`` class.  For example::
457
458      from pyramid.config import not_
459
460      @view_config(route_name='myroute', request_method=not_('POST'))
461      def myview(request): ...
462
463   The above example will ensure that the view is called if the request method
464   is not POST (at least if no other view is more specific).
465
466   The ``pyramid.config.not_`` class can be used against any value that is
467   a predicate value passed in any of these contexts:
468
469   - ``pyramid.config.Configurator.add_view``
470
471   - ``pyramid.config.Configurator.add_route``
472
473   - ``pyramid.config.Configurator.add_subscriber``
474
475   - ``pyramid.view.view_config``
476
477   - ``pyramid.events.subscriber``
478
479 - ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH``
480   requests.  See https://github.com/Pylons/pyramid/pull/1033.  add support for
481   submitting ``OPTIONS`` and ``PROPFIND`` requests, and  allow users to specify
482   basic authentication credentials in the request via a ``--login`` argument to
483   the script.  See https://github.com/Pylons/pyramid/pull/1039.
484
485 - ``ACLAuthorizationPolicy`` supports ``__acl__`` as a callable. This
486   removes the ambiguity between the potential ``AttributeError`` that would
487   be raised on the ``context`` when the property was not defined and the
488   ``AttributeError`` that could be raised from any user-defined code within
489   a dynamic property. It is recommended to define a dynamic ACL as a callable
490   to avoid this ambiguity. See https://github.com/Pylons/pyramid/issues/735.
491
492 - Allow a protocol-relative URL (e.g. ``//example.com/images``) to be passed to
493   ``pyramid.config.Configurator.add_static_view``. This allows
494   externally-hosted static URLs to be generated based on the current protocol.
495
496 - The ``AuthTktAuthenticationPolicy`` has two new options to configure its
497   domain usage:
498
499   * ``parent_domain``: if set the authentication cookie is set on
500     the parent domain. This is useful if you have multiple sites sharing the
501     same domain.
502   * ``domain``: if provided the cookie is always set for this domain, bypassing
503     all usual logic.
504
505   See https://github.com/Pylons/pyramid/pull/1028,
506   https://github.com/Pylons/pyramid/pull/1072 and
507   https://github.com/Pylons/pyramid/pull/1078.
508
509 - The ``AuthTktAuthenticationPolicy`` now supports IPv6 addresses when using
510   the ``include_ip=True`` option. This is possibly incompatible with
511   alternative ``auth_tkt`` implementations, as the specification does not
512   define how to properly handle IPv6. See
513   https://github.com/Pylons/pyramid/issues/831.
514
515 - Make it possible to use variable arguments via
516   ``pyramid.paster.get_appsettings``. This also allowed the generated
517   ``initialize_db`` script from the ``alchemy`` scaffold to grow support
518   for options in the form ``a=1 b=2`` so you can fill in
519   values in a parameterized ``.ini`` file, e.g.
520   ``initialize_myapp_db etc/development.ini a=1 b=2``.
521   See https://github.com/Pylons/pyramid/pull/911
522
523 - The ``request.session.check_csrf_token()`` method and the ``check_csrf`` view
524   predicate now take into account the value of the HTTP header named
525   ``X-CSRF-Token`` (as well as the ``csrf_token`` form parameter, which they
526   always did).  The header is tried when the form parameter does not exist.
527
528 - View lookup will now search for valid views based on the inheritance
529   hierarchy of the context. It tries to find views based on the most
530   specific context first, and upon predicate failure, will move up the
531   inheritance chain to test views found by the super-type of the context.
532   In the past, only the most specific type containing views would be checked
533   and if no matching view could be found then a PredicateMismatch would be
534   raised. Now predicate mismatches don't hide valid views registered on
535   super-types. Here's an example that now works::
536
537      class IResource(Interface):
538
539          ...
540
541      @view_config(context=IResource)
542      def get(context, request):
543
544          ...
545
546      @view_config(context=IResource, request_method='POST')
547      def post(context, request):
548
549          ...
550
551      @view_config(context=IResource, request_method='DELETE')
552      def delete(context, request):
553
554          ...
555
556      @implementer(IResource)
557      class MyResource:
558
559          ...
560
561      @view_config(context=MyResource, request_method='POST')
562      def override_post(context, request):
563
564          ...
565
566   Previously the override_post view registration would hide the get
567   and delete views in the context of MyResource -- leading to a
568   predicate mismatch error when trying to use GET or DELETE
569   methods. Now the views are found and no predicate mismatch is
570   raised.
571   See https://github.com/Pylons/pyramid/pull/786 and
572   https://github.com/Pylons/pyramid/pull/1004 and
573   https://github.com/Pylons/pyramid/pull/1046
574
575 - The ``pserve`` command now takes a ``-v`` (or ``--verbose``) flag and a
576   ``-q`` (or ``--quiet``) flag.  Output from running ``pserve`` can be
577   controlled using these flags.  ``-v`` can be specified multiple times to
578   increase verbosity.  ``-q`` sets verbosity to ``0`` unconditionally.  The
579   default verbosity level is ``1``.
580
581 - The ``alchemy`` scaffold tests now provide better coverage.  See
582   https://github.com/Pylons/pyramid/pull/1029
583
584 - The ``pyramid.config.Configurator.add_route`` method now supports being
585   called with an external URL as pattern. See
586   https://github.com/Pylons/pyramid/issues/611 and the documentation section
587   in the "URL Dispatch" chapter entitled "External Routes" for more information.
588
589 Bug Fixes
590 ---------
591
592 - It was not possible to use ``pyramid.httpexceptions.HTTPException`` as
593   the ``context`` of an exception view as very general catchall for
594   http-related exceptions when you wanted that exception view to override the
595   default exception view.  See https://github.com/Pylons/pyramid/issues/985
596
597 - When the ``pyramid.reload_templates`` setting was true, and a Chameleon
598   template was reloaded, and the renderer specification named a macro
599   (e.g. ``foo#macroname.pt``), renderings of the template after the template
600   was reloaded due to a file change would produce the entire template body
601   instead of just a rendering of the macro.  See
602   https://github.com/Pylons/pyramid/issues/1013.
603
604 - Fix an obscure problem when combining a virtual root with a route with a
605   ``*traverse`` in its pattern.  Now the traversal path generated in
606   such a configuration will be correct, instead of an element missing
607   a leading slash.
608
609 - Fixed a Mako renderer bug returning a tuple with a previous defname value
610   in some circumstances. See https://github.com/Pylons/pyramid/issues/1037
611   for more information.
612
613 - Make the ``pyramid.config.assets.PackageOverrides`` object implement the API
614   for ``__loader__`` objects specified in PEP 302.  Proxies to the
615   ``__loader__`` set by the importer, if present; otherwise, raises
616   ``NotImplementedError``.  This makes Pyramid static view overrides work
617   properly under Python 3.3 (previously they would not).  See
618   https://github.com/Pylons/pyramid/pull/1015 for more information.
619
620 - ``mako_templating``: added defensive workaround for non-importability of
621   ``mako`` due to upstream ``markupsafe`` dropping Python 3.2 support.  Mako
622   templating will no longer work under the combination of MarkupSafe 0.17 and
623   Python 3.2 (although the combination of MarkupSafe 0.17 and Python 3.3 or any
624   supported Python 2 version will work OK).
625
626 - Spaces and dots may now be in mako renderer template paths. This was
627   broken when support for the new makodef syntax was added in 1.4a1.
628   See https://github.com/Pylons/pyramid/issues/950
629
630 - ``pyramid.debug_authorization=true`` will now correctly print out
631   ``Allowed`` for views registered with ``NO_PERMISSION_REQUIRED`` instead
632   of invoking the ``permits`` method of the authorization policy.
633   See https://github.com/Pylons/pyramid/issues/954
634
635 - Pyramid failed to install on some systems due to being packaged with
636   some test files containing higher order characters in their names. These
637   files have now been removed. See
638   https://github.com/Pylons/pyramid/issues/981
639
640 - ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so code under
641   Python 3 would use ``__len__`` to find truthiness; this usually caused an
642   instance of DummyResource to be "falsy" instead of "truthy".  See
643   https://github.com/Pylons/pyramid/pull/1032
644
645 - The ``alchemy`` scaffold would break when the database was MySQL during
646   tables creation.  See https://github.com/Pylons/pyramid/pull/1049
647
648 - The ``current_route_url`` method now attaches the query string to the URL by
649   default. See
650   https://github.com/Pylons/pyramid/issues/1040
651
652 - Make ``pserve.cherrypy_server_runner`` Python 3 compatible. See
653   https://github.com/Pylons/pyramid/issues/718
654
655 Backwards Incompatibilities
656 ---------------------------
657
658 - Modified the ``current_route_url`` method in pyramid.Request. The method
659   previously returned the URL without the query string by default, it now does
660   attach the query string unless it is overriden.
661
662 - The ``route_url`` and ``route_path`` APIs no longer quote ``/``
663   to ``%2F`` when a replacement value contains a ``/``.  This was pointless,
664   as WSGI servers always unquote the slash anyway, and Pyramid never sees the
665   quoted value.
666
667 - It is no longer possible to set a ``locale_name`` attribute of the request,
668   nor is it possible to set a ``localizer`` attribute of the request.  These
669   are now "reified" properties that look up a locale name and localizer
670   respectively using the machinery described in the "Internationalization"
671   chapter of the documentation.
672
673 - If you send an ``X-Vhm-Root`` header with a value that ends with a slash (or
674   any number of slashes), the trailing slash(es) will be removed before a URL
675   is generated when you use use ``request.resource_url`` or
676   ``request.resource_path``.  Previously the virtual root path would not have
677   trailing slashes stripped, which would influence URL generation.
678
679 - The ``pyramid.interfaces.IResourceURL`` interface has now grown two new
680   attributes: ``virtual_path_tuple`` and ``physical_path_tuple``.  These should
681   be the tuple form of the resource's path (physical and virtual).
682
4a86b2 683 1.4 (2012-12-18)
CM 684 ================
685
686 Docs
687 ----
688
689 - Fix functional tests in the ZODB tutorial
690
691 1.4b3 (2012-12-10)
692 ==================
693
694 - Packaging release only, no code changes.  1.4b2 was a brownbag release due to
695   missing directories in the tarball.
696
697 1.4b2 (2012-12-10)
698 ==================
699
700 Docs
701 ----
702
703 - Scaffolding is now PEP-8 compliant (at least for a brief shining moment).
704
705 - Tutorial improvements.
706
707 Backwards Incompatibilities
708 ---------------------------
709
710 - Modified the ``_depth`` argument to ``pyramid.view.view_config`` to accept
711   a value relative to the invocation of ``view_config`` itself. Thus, when it
712   was previously expecting a value of ``1`` or greater, to reflect that
713   the caller of ``view_config`` is 1 stack frame away from ``venusian.attach``,
714   this implementation detail is now hidden.
715
716 - Modified the ``_backframes`` argument to ``pyramid.util.action_method`` in a
717   similar way to the changes described to ``_depth`` above.  This argument
718   remains undocumented, but might be used in the wild by some insane person.
719
720 1.4b1 (2012-11-21)
721 ==================
722
723 Features
724 --------
725
726 - Small microspeed enhancement which anticipates that a
727   ``pyramid.response.Response`` object is likely to be returned from a view.
728   Some code is shortcut if the class of the object returned by a view is this
729   class.  A similar microoptimization was done to
730   ``pyramid.request.Request.is_response``.
731
732 - Make it possible to use variable arguments on ``p*`` commands (``pserve``,
733   ``pshell``, ``pviews``, etc) in the form ``a=1 b=2`` so you can fill in
734   values in parameterized ``.ini`` file, e.g. ``pshell etc/development.ini
735   http_port=8080``.  See https://github.com/Pylons/pyramid/pull/714
736
737 - A somewhat advanced and obscure feature of Pyramid event handlers is their
738   ability to handle "multi-interface" notifications.  These notifications have
739   traditionally presented multiple objects to the subscriber callable.  For
740   instance, if an event was sent by code like this::
741
742      registry.notify(event, context)
743
744   In the past, in order to catch such an event, you were obligated to write and
745   register an event subscriber that mentioned both the event and the context in
746   its argument list::
747
748      @subscriber([SomeEvent, SomeContextType])
749      def asubscriber(event, context):
750          pass
751
752   In many subscriber callables registered this way, it was common for the logic
753   in the subscriber callable to completely ignore the second and following
754   arguments (e.g. ``context`` in the above example might be ignored), because
755   they usually existed as attributes of the event anyway.  You could usually
756   get the same value by doing ``event.context`` or similar.
757
758   The fact that you needed to put an extra argument which you usually ignored
759   in the subscriber callable body was only a minor annoyance until we added
760   "subscriber predicates", used to narrow the set of circumstances under which
761   a subscriber will be executed, in a prior 1.4 alpha release.  Once those were
762   added, the annoyance was escalated, because subscriber predicates needed to
763   accept the same argument list and arity as the subscriber callables that they
764   were configured against.  So, for example, if you had these two subscriber
765   registrations in your code::
766
767      @subscriber([SomeEvent, SomeContextType])
768      def asubscriber(event, context):
769          pass
770
771      @subscriber(SomeOtherEvent)
772      def asubscriber(event):
773          pass
774
775   And you wanted to use a subscriber predicate::
776
777      @subscriber([SomeEvent, SomeContextType], mypredicate=True)
778      def asubscriber1(event, context):
779          pass
780
781      @subscriber(SomeOtherEvent, mypredicate=True)
782      def asubscriber2(event):
783          pass
784
785   If an existing ``mypredicate`` subscriber predicate had been written in such
786   a way that it accepted only one argument in its ``__call__``, you could not
787   use it against a subscription which named more than one interface in its
788   subscriber interface list.  Similarly, if you had written a subscriber
789   predicate that accepted two arguments, you couldn't use it against a
790   registration that named only a single interface type.
791
792   For example, if you created this predicate::
793
794     class MyPredicate(object):
795         # portions elided...
796         def __call__(self, event):
797             return self.val == event.context.foo
798
799   It would not work against a multi-interface-registered subscription, so in
800   the above example, when you attempted to use it against ``asubscriber1``, it
801   would fail at runtime with a TypeError, claiming something was attempting to
802   call it with too many arguments.
803
804   To hack around this limitation, you were obligated to design the
805   ``mypredicate`` predicate to expect to receive in its ``__call__`` either a
806   single ``event`` argument (a SomeOtherEvent object) *or* a pair of arguments
807   (a SomeEvent object and a SomeContextType object), presumably by doing
808   something like this::
809
810     class MyPredicate(object):
811         # portions elided...
812         def __call__(self, event, context=None):
813             return self.val == event.context.foo
814
815   This was confusing and bad.
816
817   In order to allow people to ignore unused arguments to subscriber callables
818   and to normalize the relationship between event subscribers and subscriber
819   predicates, we now allow both subscribers and subscriber predicates to accept
820   only a single ``event`` argument even if they've been subscribed for
821   notifications that involve multiple interfaces.  Subscribers and subscriber
822   predicates that accept only one argument will receive the first object passed
823   to ``notify``; this is typically (but not always) the event object.  The
824   other objects involved in the subscription lookup will be discarded.  You can
825   now write an event subscriber that accepts only ``event`` even if it
826   subscribes to multiple interfaces::
827
828      @subscriber([SomeEvent, SomeContextType])
829      def asubscriber(event):
830          # this will work!
831
832   This prevents you from needing to match the subscriber callable parameters to
833   the subscription type unnecessarily, especially when you don't make use of
834   any argument in your subscribers except for the event object itself.
835
836   Note, however, that if the event object is not the first
837   object in the call to ``notify``, you'll run into trouble.  For example, if
838   notify is called with the context argument first::
839
840      registry.notify(context, event)
841
842   You won't be able to take advantage of the event-only feature.  It will
843   "work", but the object received by your event handler won't be the event
844   object, it will be the context object, which won't be very useful::
845
846      @subscriber([SomeContextType, SomeEvent])
847      def asubscriber(event):
848          # bzzt! you'll be getting the context here as ``event``, and it'll
849          # be useless
850
851   Existing multiple-argument subscribers continue to work without issue, so you
852   should continue use those if your system notifies using multiple interfaces
853   and the first interface is not the event interface.  For example::
854
855      @subscriber([SomeContextType, SomeEvent])
856      def asubscriber(context, event):
857          # this will still work!
858
859   The event-only feature makes it possible to use a subscriber predicate that
860   accepts only a request argument within both multiple-interface subscriber
861   registrations and single-interface subscriber registrations.  You needn't
862   make slightly different variations of predicates depending on the
863   subscription type arguments.  Instead, just write all your subscriber
864   predicates so they only accept ``event`` in their ``__call__`` and they'll be
865   useful across all registrations for subscriptions that use an event as their
866   first argument, even ones which accept more than just ``event``.
867
868   However, the same caveat applies to predicates as to subscriber callables: if
869   you're subscribing to a multi-interface event, and the first interface is not
870   the event interface, the predicate won't work properly.  In such a case,
871   you'll need to match the predicate ``__call__`` argument ordering and
872   composition to the ordering of the interfaces.  For example, if the
873   registration for the subscription uses ``[SomeContext, SomeEvent]``, you'll
874   need to reflect that in the ordering of the parameters of the predicate's
875   ``__call__`` method::
876
877         def __call__(self, context, event):
878             return event.request.path.startswith(self.val)
879
880   tl;dr: 1) When using multi-interface subscriptions, always use the event type
881   as the first subscription registration argument and 2) When 1 is true, use
882   only ``event`` in your subscriber and subscriber predicate parameter lists,
883   no matter how many interfaces the subscriber is notified with.  This
884   combination will result in the maximum amount of reusability of subscriber
885   predicates and the least amount of thought on your part.  Drink responsibly.
886
887 Bug Fixes
888 ---------
889
890 - A failure when trying to locate the attribute ``__text__`` on route and view
891   predicates existed when the ``debug_routematch`` setting was true or when the
892   ``pviews`` command was used. See https://github.com/Pylons/pyramid/pull/727
893
894 Documentation
895 -------------
896
897 - Sync up tutorial source files with the files that are rendered by the
898   scaffold that each uses.
899
900 1.4a4 (2012-11-14)
901 ==================
902
903 Features
904 --------
905
906 - ``pyramid.authentication.AuthTktAuthenticationPolicy`` has been updated to
907   support newer hashing algorithms such as ``sha512``. Existing applications
908   should consider updating if possible for improved security over the default
909   md5 hashing.
910
911 - Added an ``effective_principals`` route and view predicate.
912
913 - Do not allow the userid returned from the ``authenticated_userid`` or the
914   userid that is one of the list of principals returned by
915   ``effective_principals`` to be either of the strings ``system.Everyone`` or
916   ``system.Authenticated`` when any of the built-in authorization policies that
917   live in ``pyramid.authentication`` are in use.  These two strings are
918   reserved for internal usage by Pyramid and they will not be accepted as valid
919   userids.
920
921 - Slightly better debug logging from
922   ``pyramid.authentication.RepozeWho1AuthenticationPolicy``.
923
924 - ``pyramid.security.view_execution_permitted`` used to return ``True`` if no
925   view could be found. It now raises a ``TypeError`` exception in that case, as
926   it doesn't make sense to assert that a nonexistent view is
927   execution-permitted. See https://github.com/Pylons/pyramid/issues/299.
928
929 - Allow a ``_depth`` argument to ``pyramid.view.view_config``, which will
930   permit limited composition reuse of the decorator by other software that
931   wants to provide custom decorators that are much like view_config.
932
933 - Allow an iterable of decorators to be passed to
934   ``pyramid.config.Configurator.add_view``. This allows views to be wrapped
935   by more than one decorator without requiring combining the decorators
936   yourself.
937
938 Bug Fixes
939 ---------
940
941 - In the past if a renderer returned ``None``, the body of the resulting
942   response would be set explicitly to the empty string.  Instead, now, the body
943   is left unchanged, which allows the renderer to set a body itself by using
944   e.g. ``request.response.body = b'foo'``.  The body set by the renderer will
945   be unmolested on the way out.  See
946   https://github.com/Pylons/pyramid/issues/709
947
948 - In uncommon cases, the ``pyramid_excview_tween_factory`` might have
949   inadvertently raised a ``KeyError`` looking for ``request_iface`` as an
950   attribute of the request.  It no longer fails in this case.  See
951   https://github.com/Pylons/pyramid/issues/700
952
953 - Be more tolerant of potential error conditions in ``match_param`` and
954   ``physical_path`` predicate implementations; instead of raising an exception,
955   return False.
956
957 - ``pyramid.view.render_view`` was not functioning properly under Python 3.x
958   due to a byte/unicode discrepancy. See
959   https://github.com/Pylons/pyramid/issues/721
960
961 Deprecations
962 ------------
963
964 - ``pyramid.authentication.AuthTktAuthenticationPolicy`` will emit a warning if
965   an application is using the policy without explicitly passing a ``hashalg``
966   argument. This is because the default is "md5" which is considered
967   theoretically subject to collision attacks. If you really want "md5" then you
968   must specify it explicitly to get rid of the warning.
969
970 Documentation
971 -------------
972
973 - All of the tutorials that use
974   ``pyramid.authentication.AuthTktAuthenticationPolicy`` now explicitly pass
975   ``sha512`` as a ``hashalg`` argument.
976
977
978 Internals
979 ---------
980
981 - Move ``TopologicalSorter`` from ``pyramid.config.util`` to ``pyramid.util``,
982   move ``CyclicDependencyError`` from ``pyramid.config.util`` to
983   ``pyramid.exceptions``, rename ``Singleton`` to ``Sentinel`` and move from
984   ``pyramid.config.util`` to ``pyramid.util``; this is in an effort to
985   move that stuff that may be an API one day out of ``pyramid.config.util``,
986   because that package should never be imported from non-Pyramid code.
987   TopologicalSorter is still not an API, but may become one.
988
989 - Get rid of shady monkeypatching of ``pyramid.request.Request`` and
990   ``pyramid.response.Response`` done within the ``__init__.py`` of Pyramid.
991   Webob no longer relies on this being done.  Instead, the ResponseClass
992   attribute of the Pyramid Request class is assigned to the Pyramid response
993   class; that's enough to satisfy WebOb and behave as it did before with the
994   monkeypatching.
995
996 1.4a3 (2012-10-26)
997 ==================
998
999 Bug Fixes
1000 ---------
1001
1002 - The match_param predicate's text method was fixed to sort its values.
1003   Part of https://github.com/Pylons/pyramid/pull/705
1004
1005 - 1.4a ``pyramid.scripting.prepare`` behaved differently than 1.3 series
1006   function of same name.  In particular, if passed a request, it would not
1007   set the ``registry`` attribute of the request like 1.3 did.  A symptom
1008   would be that passing a request to ``pyramid.paster.bootstrap`` (which uses
1009   the function) that did not have a ``registry`` attribute could assume that
1010   the registry would be attached to the request by Pyramid.  This assumption
1011   could be made in 1.3, but not in 1.4.  The assumption can now be made in
1012   1.4 too (a registry is attached to a request passed to bootstrap or
1013   prepare).
1014
1015 - When registering a view configuration that named a Chameleon ZPT renderer
1016   with a macro name in it (e.g. ``renderer='some/template#somemacro.pt``) as
1017   well as a view configuration without a macro name in it that pointed to the
1018   same template (e.g. ``renderer='some/template.pt'``), internal caching could
1019   confuse the two, and your code might have rendered one instead of the
1020   other.
1021
1022 Features
1023 --------
1024
1025 - Allow multiple values to be specified to the ``request_param`` view/route
1026   predicate as a sequence.  Previously only a single string value was allowed.
1027   See https://github.com/Pylons/pyramid/pull/705
1028
1029 - Comments with references to documentation sections placed in scaffold
1030   ``.ini`` files.
1031
1032 - Added an HTTP Basic authentication policy
1033   at ``pyramid.authentication.BasicAuthAuthenticationPolicy``.
1034
1035 - The Configurator ``testing_securitypolicy`` method now returns the policy
1036   object it creates.
1037
1038 - The Configurator ``testing_securitypolicy`` method accepts two new
1039   arguments: ``remember_result`` and ``forget_result``.  If supplied, these
1040   values influence the result of the policy's ``remember`` and ``forget``
1041   methods, respectively.
1042
1043 - The DummySecurityPolicy created by ``testing_securitypolicy`` now sets a
1044   ``forgotten`` value on the policy (the value ``True``) when its ``forget``
1045   method is called.
1046
1047 - The DummySecurityPolicy created by ``testing_securitypolicy`` now sets a
1048   ``remembered`` value on the policy, which is the value of the ``principal``
1049   argument it's called with when its ``remember`` method is called.
1050
1051 - New ``physical_path`` view predicate.  If specified, this value should be a
1052   string or a tuple representing the physical traversal path of the context
1053   found via traversal for this predicate to match as true.  For example:
1054   ``physical_path='/'`` or ``physical_path='/a/b/c'`` or ``physical_path=('',
1055   'a', 'b', 'c')``.  This is not a path prefix match or a regex, it's a
1056   whole-path match.  It's useful when you want to always potentially show a
1057   view when some object is traversed to, but you can't be sure about what kind
1058   of object it will be, so you can't use the ``context`` predicate.  The
1059   individual path elements inbetween slash characters or in tuple elements
1060   should be the Unicode representation of the name of the resource and should
1061   not be encoded in any way.
1062
1063 1.4a2 (2012-09-27)
1064 ==================
1065
1066 Bug Fixes
1067 ---------
1068
1069 - When trying to determine Mako defnames and Chameleon macro names in asset
1070   specifications, take into account that the filename may have a hyphen in
1071   it.  See https://github.com/Pylons/pyramid/pull/692
1072
1073 Features
1074 --------
1075
1076 - A new ``pyramid.session.check_csrf_token`` convenience function was added.
1077
1078 - A ``check_csrf`` view predicate was added.  For example, you can now do
1079   ``config.add_view(someview, check_csrf=True)``.  When the predicate is
1080   checked, if the ``csrf_token`` value in ``request.params`` matches the CSRF
1081   token in the request's session, the view will be permitted to execute.
1082   Otherwise, it will not be permitted to execute.
1083
1084 - Add ``Base.metadata.bind = engine`` to alchemy template, so that tables
1085   defined imperatively will work.
1086
1087 Documentation
1088 -------------
1089
1090 - update wiki2 SQLA tutorial with the changes required after inserting
1091   ``Base.metadata.bind = engine`` into the alchemy scaffold.
1092
1093 1.4a1 (2012-09-16)
1094 ==================
1095
1096 Bug Fixes
1097 ---------
1098
1099 - Forward port from 1.3 branch: When no authentication policy was configured,
1100   a call to ``pyramid.security.effective_principals`` would unconditionally
1101   return the empty list.  This was incorrect, it should have unconditionally
1102   returned ``[Everyone]``, and now does.
1103
1104 - Explicit url dispatch regexes can now contain colons.
1105   https://github.com/Pylons/pyramid/issues/629
1106
1107 - On at least one 64-bit Ubuntu system under Python 3.2, using the
1108   ``view_config`` decorator caused a ``RuntimeError: dictionary changed size
1109   during iteration`` exception.  It no longer does.  See
1110   https://github.com/Pylons/pyramid/issues/635 for more information.
1111
1112 - In Mako Templates lookup, check if the uri is already adjusted and bring
1113   it back to an asset spec. Normally occurs with inherited templates or
1114   included components.
1115   https://github.com/Pylons/pyramid/issues/606
1116   https://github.com/Pylons/pyramid/issues/607
1117
1118 - In Mako Templates lookup, check for absolute uri (using mako directories)
1119   when mixing up inheritance with asset specs.
1120   https://github.com/Pylons/pyramid/issues/662
1121
1122 - HTTP Accept headers were not being normalized causing potentially
1123   conflicting view registrations to go unnoticed. Two views that only
1124   differ in the case ('text/html' vs. 'text/HTML') will now raise an error.
1125   https://github.com/Pylons/pyramid/pull/620
1126
1127 - Forward-port from 1.3 branch: when registering multiple views with an
1128   ``accept`` predicate in a Pyramid application runing under Python 3, you
1129   might have received a ``TypeError: unorderable types: function() <
1130   function()`` exception.
1131
1132 Features
1133 --------
1134
170486 1135 - Python 3.3 compatibility.
SP 1136
4a86b2 1137 - Configurator.add_directive now accepts arbitrary callables like partials or
CM 1138   objects implementing ``__call__`` which dont have ``__name__`` and
1139   ``__doc__`` attributes.  See https://github.com/Pylons/pyramid/issues/621
1140   and https://github.com/Pylons/pyramid/pull/647.
1141
1142 - Third-party custom view, route, and subscriber predicates can now be added
1143   for use by view authors via
1144   ``pyramid.config.Configurator.add_view_predicate``,
1145   ``pyramid.config.Configurator.add_route_predicate`` and
1146   ``pyramid.config.Configurator.add_subscriber_predicate``.  So, for example,
1147   doing this::
1148
1149      config.add_view_predicate('abc', my.package.ABCPredicate)
1150
1151   Might allow a view author to do this in an application that configured that
1152   predicate::
1153
1154      @view_config(abc=1)
1155
1156   Similar features exist for ``add_route``, and ``add_subscriber``.  See
1157   "Adding A Third Party View, Route, or Subscriber Predicate" in the Hooks
1158   chapter for more information.
1159
1160   Note that changes made to support the above feature now means that only
1161   actions registered using the same "order" can conflict with one another.
1162   It used to be the case that actions registered at different orders could
1163   potentially conflict, but to my knowledge nothing ever depended on this
1164   behavior (it was a bit silly).
1165
1166 - Custom objects can be made easily JSON-serializable in Pyramid by defining
1167   a ``__json__`` method on the object's class. This method should return
1168   values natively serializable by ``json.dumps`` (such as ints, lists,
1169   dictionaries, strings, and so forth).
1170
1171 - The JSON renderer now allows for the definition of custom type adapters to
1172   convert unknown objects to JSON serializations.
1173
1174 - As of this release, the ``request_method`` predicate, when used, will also
1175   imply that ``HEAD`` is implied when you use ``GET``.  For example, using
1176   ``@view_config(request_method='GET')`` is equivalent to using
1177   ``@view_config(request_method=('GET', 'HEAD'))``.  Using
1178   ``@view_config(request_method=('GET', 'POST')`` is equivalent to using
1179   ``@view_config(request_method=('GET', 'HEAD', 'POST')``.  This is because
1180   HEAD is a variant of GET that omits the body, and WebOb has special support
1181   to return an empty body when a HEAD is used.
1182
1183 - ``config.add_request_method`` has been introduced to support extending
1184   request objects with arbitrary callables. This method expands on the
1185   previous ``config.set_request_property`` by supporting methods as well as
1186   properties. This method now causes less code to be executed at
1187   request construction time than ``config.set_request_property`` in
1188   version 1.3.
1189
1190 - Don't add a ``?`` to URLs generated by ``request.resource_url`` if the
1191   ``query`` argument is provided but empty.
1192
1193 - Don't add a ``?`` to URLs generated by ``request.route_url`` if the
1194   ``_query`` argument is provided but empty.
1195
1196 - The static view machinery now raises (rather than returns) ``HTTPNotFound``
1197   and ``HTTPMovedPermanently`` exceptions, so these can be caught by the
1198   Not Found View (and other exception views).
1199
1200 - The Mako renderer now supports a def name in an asset spec.  When the def
1201   name is present in the asset spec, the system will render the template def
1202   within the template and will return the result. An example asset spec is
1203   ``package:path/to/template#defname.mako``. This will render the def named
1204   ``defname`` inside the ``template.mako`` template instead of rendering the
1205   entire template.  The old way of returning a tuple in the form
1206   ``('defname', {})`` from the view is supported for backward compatibility,
1207
1208 - The Chameleon ZPT renderer now accepts a macro name in an asset spec.  When
1209   the macro name is present in the asset spec, the system will render the
1210   macro listed as a ``define-macro`` and return the result instead of
1211   rendering the entire template.  An example asset spec:
1212   ``package:path/to/template#macroname.pt``.  This will render the macro
1213   defined as ``macroname`` within the ``template.pt`` template instead of the
1214   entire templae.
1215
1216 - When there is a predicate mismatch exception (seen when no view matches for
1217   a given request due to predicates not working), the exception now contains
1218   a textual description of the predicate which didn't match.
1219
1220 - An ``add_permission`` directive method was added to the Configurator.  This
1221   directive registers a free-standing permission introspectable into the
1222   Pyramid introspection system.  Frameworks built atop Pyramid can thus use
1223   the ``permissions`` introspectable category data to build a
1224   comprehensive list of permissions supported by a running system.  Before
1225   this method was added, permissions were already registered in this
1226   introspectable category as a side effect of naming them in an ``add_view``
1227   call, this method just makes it possible to arrange for a permission to be
1228   put into the ``permissions`` introspectable category without naming it
1229   along with an associated view.  Here's an example of usage of
1230   ``add_permission``::
1231
1232       config = Configurator()
1233       config.add_permission('view')
1234
1235 - The ``UnencryptedCookieSessionFactoryConfig`` now accepts
1236   ``signed_serialize`` and ``signed_deserialize`` hooks which may be used
1237   to influence how the sessions are marshalled (by default this is done
1238   with HMAC+pickle).
1239
1240 - ``pyramid.testing.DummyRequest`` now supports methods supplied by the
1241   ``pyramid.util.InstancePropertyMixin`` class such as ``set_property``.
1242
1243 - Request properties and methods added via ``config.set_request_property`` or
1244   ``config.add_request_method`` are now available to tweens.
1245
1246 - Request properties and methods added via ``config.set_request_property`` or
1247   ``config.add_request_method`` are now available in the request object
1248   returned from ``pyramid.paster.bootstrap``.
1249
1250 - ``request.context`` of environment request during ``bootstrap`` is now the
1251   root object if a context isn't already set on a provided request.
1252
1253 - The ``pyramid.decorator.reify`` function is now an API, and was added to
1254   the API documentation.
1255
1256 - Added the ``pyramid.testing.testConfig`` context manager, which can be used
1257   to generate a configurator in a test, e.g. ``with testing.testConfig(...):``.
1258
1259 - Users can now invoke a subrequest from within view code using a new
1260   ``request.invoke_subrequest`` API.
1261
1262 Deprecations
1263 ------------
1264
1265 - The ``pyramid.config.Configurator.set_request_property`` has been
1266   documentation-deprecated.  The method remains usable but the more
1267   featureful ``pyramid.config.Configurator.add_request_method`` should be
1268   used in its place (it has all of the same capabilities but can also extend
1269   the request object with methods).
1270
1271 Backwards Incompatibilities
1272 ---------------------------
1273
1274 - The Pyramid router no longer adds the values ``bfg.routes.route`` or
1275   ``bfg.routes.matchdict`` to the request's WSGI environment dictionary.
1276   These values were docs-deprecated in ``repoze.bfg`` 1.0 (effectively seven
1277   minor releases ago).  If your code depended on these values, use
1278   request.matched_route and request.matchdict instead.
1279
1280 - It is no longer possible to pass an environ dictionary directly to
1281   ``pyramid.traversal.ResourceTreeTraverser.__call__`` (aka
1282   ``ModelGraphTraverser.__call__``).  Instead, you must pass a request
1283   object.  Passing an environment instead of a request has generated a
1284   deprecation warning since Pyramid 1.1.
1285
1286 - Pyramid will no longer work properly if you use the
1287   ``webob.request.LegacyRequest`` as a request factory.  Instances of the
1288   LegacyRequest class have a ``request.path_info`` which return a string.
1289   This Pyramid release assumes that ``request.path_info`` will
1290   unconditionally be Unicode.
1291
1292 - The functions from ``pyramid.chameleon_zpt`` and ``pyramid.chameleon_text``
1293   named ``get_renderer``, ``get_template``, ``render_template``, and
1294   ``render_template_to_response`` have been removed.  These have issued a
1295   deprecation warning upon import since Pyramid 1.0.  Use
1296   ``pyramid.renderers.get_renderer()``,
1297   ``pyramid.renderers.get_renderer().implementation()``,
1298   ``pyramid.renderers.render()`` or ``pyramid.renderers.render_to_response``
1299   respectively instead of these functions.
1300
1301 - The ``pyramid.configuration`` module was removed.  It had been deprecated
1302   since Pyramid 1.0 and printed a deprecation warning upon its use.  Use
1303   ``pyramid.config`` instead.
1304
1305 - The ``pyramid.paster.PyramidTemplate`` API was removed.  It had been
1306   deprecated since Pyramid 1.1 and issued a warning on import.  If your code
1307   depended on this, adjust your code to import
1308   ``pyramid.scaffolds.PyramidTemplate`` instead.
1309
1310 - The ``pyramid.settings.get_settings()`` API was removed.  It had been
1311   printing a deprecation warning since Pyramid 1.0.  If your code depended on
1312   this API, use ``pyramid.threadlocal.get_current_registry().settings``
1313   instead or use the ``settings`` attribute of the registry available from
1314   the request (``request.registry.settings``).
1315
1316 - These APIs from the ``pyramid.testing`` module were removed.  They have
1317   been printing deprecation warnings since Pyramid 1.0:
1318
1319   * ``registerDummySecurityPolicy``, use
1320     ``pyramid.config.Configurator.testing_securitypolicy`` instead.
1321
1322   * ``registerResources`` (aka ``registerModels``, use
1323     ``pyramid.config.Configurator.testing_resources`` instead.
1324
1325   * ``registerEventListener``, use
1326     ``pyramid.config.Configurator.testing_add_subscriber`` instead.
1327
1328   * ``registerTemplateRenderer`` (aka `registerDummyRenderer``), use
1329     ``pyramid.config.Configurator.testing_add_template`` instead.
1330
1331   * ``registerView``, use ``pyramid.config.Configurator.add_view`` instead.
1332
1333   * ``registerUtility``, use
1334     ``pyramid.config.Configurator.registry.registerUtility`` instead.
1335
1336   * ``registerAdapter``, use
1337     ``pyramid.config.Configurator.registry.registerAdapter`` instead.
1338
1339   * ``registerSubscriber``, use
1340     ``pyramid.config.Configurator.add_subscriber`` instead.
1341
1342   * ``registerRoute``, use
1343     ``pyramid.config.Configurator.add_route`` instead.
1344
1345   * ``registerSettings``, use
1346     ``pyramid.config.Configurator.add_settings`` instead.
1347
1348 - In Pyramid 1.3 and previous, the ``__call__`` method of a Response object
1349   was invoked before any finished callbacks were executed.  As of this
1350   release, the ``__call__`` method of a Response object is invoked *after*
1351   finished callbacks are executed.  This is in support of the
1352   ``request.invoke_subrequest`` feature.
1353
1354 - The 200-series exception responses named ``HTTPCreated``, ``HTTPAccepted``, 
1355   ``HTTPNonAuthoritativeInformation``, ``HTTPNoContent``, ``HTTPResetContent``,
1356   and ``HTTPPartialContent`` in ``pyramid.httpexceptions`` no longer inherit
1357   from ``HTTPOk``.  Instead they inherit from a new base class named 
1358   ``HTTPSuccessful``.  This will have no effect on you unless you've registered
1359   an exception view for ``HTTPOk`` and expect that exception view to
1360   catch all the aforementioned exceptions.
1361
1362 Documentation
1363 -------------
1364
1365 - Added an "Upgrading Pyramid" chapter to the narrative documentation.  It
1366   describes how to cope with deprecations and removals of Pyramid APIs and
1367   how to show Pyramid-generated deprecation warnings while running tests and
1368   while running a server.
1369
1370 - Added a "Invoking a Subrequest" chapter to the documentation.  It describes
1371   how to use the new ``request.invoke_subrequest`` API.
1372
1373 Dependencies
1374 ------------
1375
1376 - Pyramid now requires WebOb 1.2b3+ (the prior Pyramid release only relied on
1377   1.2dev+).  This is to ensure that we obtain a version of WebOb that returns
1378   ``request.path_info`` as text.
1379
2c949d 1380 1.3 (2012-03-21)
CM 1381 ================
1382
1383 Bug Fixes
1384 ---------
1385
1386 - When ``pyramid.wsgi.wsgiapp2`` calls the downstream WSGI app, the app's
1387   environ will no longer have (deprecated and potentially misleading)
1388   ``bfg.routes.matchdict`` or ``bfg.routes.route`` keys in it.  A symptom of
1389   this bug would be a ``wsgiapp2``-wrapped Pyramid app finding the wrong view
1390   because it mistakenly detects that a route was matched when, in fact, it
1391   was not.
1392
1393 - The fix for issue https://github.com/Pylons/pyramid/issues/461 (which made
1394   it possible for instance methods to be used as view callables) introduced a
1395   backwards incompatibility when methods that declared only a request
1396   argument were used.  See https://github.com/Pylons/pyramid/issues/503
1397
1398 1.3b3 (2012-03-17)
1399 ==================
1400
1401 Bug Fixes
1402 ---------
1403
1404 - ``config.add_view(<aninstancemethod>)`` raised AttributeError involving
1405   ``__text__``.  See https://github.com/Pylons/pyramid/issues/461
1406
1407 - Remove references to do-nothing ``pyramid.debug_templates`` setting in all
1408   Pyramid-provided ``.ini`` files.  This setting previously told Chameleon to
1409   render better exceptions; now Chameleon always renders nice exceptions
1410   regardless of the value of this setting.
1411
1412 Scaffolds
1413 ---------
1414
1415 - The ``alchemy`` scaffold now shows an informative error message in the
1416   browser if the person creating the project forgets to run the
1417   initialization script.
1418
1419 - The ``alchemy`` scaffold initialization script is now called
1420   ``initialize_<projectname>_db`` instead of ``populate_<projectname>``.
1421
1422 Documentation
1423 -------------
1424
1425 - Wiki tutorials improved due to collaboration at PyCon US 2012 sprints.
1426
1427 1.3b2 (2012-03-02)
1428 ==================
1429
1430 Bug Fixes
1431 ---------
1432
1433 - The method ``pyramid.request.Request.partial_application_url`` is no longer
1434   in the API docs.  It was meant to be a private method; its publication in
1435   the documentation as an API method was a mistake, and it has been renamed
1436   to something private.
1437
1438 - When a static view was registered using an absolute filesystem path on
1439   Windows, the ``request.static_url`` function did not work to generate URLs
1440   to its resources.  Symptom: "No static URL definition matching
1441   c:\\foo\\bar\\baz".
1442
1443 - Make all tests pass on Windows XP.
1444
1445 - Bug in ACL authentication checking on Python 3: the ``permits`` and
1446   ``principals_allowed_by_permission`` method of
1447   ``pyramid.authorization.ACLAuthenticationPolicy`` could return an
1448   inappropriate ``True`` value when a permission on an ACL was a string
1449   rather than a sequence, and then only if the ACL permission string was a
1450   substring of the ``permission`` value passed to the function.
1451
1452   This bug effects no Pyramid deployment under Python 2; it is a bug that
1453   exists only in deployments running on Python 3.  It has existed since
1454   Pyramid 1.3a1.
1455
1456   This bug was due to the presence of an ``__iter__`` attribute on strings
1457   under Python 3 which is not present under strings in Python 2.
1458
1459 1.3b1 (2012-02-26)
1460 ==================
1461
1462 Bug Fixes
1463 ---------
1464
1465 - ``pyramid.config.Configurator.with_package`` didn't work if the
1466   Configurator was an old-style ``pyramid.configuration.Configurator``
1467   instance.
1468
1469 - Pyramid authorization policies did not show up in the introspector.
1470
1471 Deprecations
1472 ------------
1473
1474 - All references to the ``tmpl_context`` request variable were removed from
1475   the docs.  Its existence in Pyramid is confusing for people who were never
1476   Pylons users.  It was added as a porting convenience for Pylons users in
1477   Pyramid 1.0, but it never caught on because the Pyramid rendering system is
1478   a lot different than Pylons' was, and alternate ways exist to do what it
1479   was designed to offer in Pylons.  It will continue to exist "forever" but
1480   it will not be recommended or mentioned in the docs.
1481
1482 1.3a9 (2012-02-22)
1483 ==================
1484
1485 Features
1486 --------
1487
1488 - Add an ``introspection`` boolean to the Configurator constructor.  If this
1489   is ``True``, actions registered using the Configurator will be registered
1490   with the introspector.  If it is ``False``, they won't.  The default is
1491   ``True``.  Setting it to ``False`` during action processing will prevent
1492   introspection for any following registration statements, and setting it to
1493   ``True`` will start them up again.  This addition is to service a
1494   requirement that the debug toolbar's own views and methods not show up in
1495   the introspector.
1496
1497 - New API: ``pyramid.config.Configurator.add_notfound_view``.  This is a
1498   wrapper for ``pyramid.Config.configurator.add_view`` which provides easy
1499   append_slash support and does the right thing about permissions.  It should
1500   be preferred over calling ``add_view`` directly with
1501   ``context=HTTPNotFound`` as was previously recommended.
1502
1503 - New API: ``pyramid.view.notfound_view_config``.  This is a decorator
1504   constructor like ``pyramid.view.view_config`` that calls
1505   ``pyramid.config.Configurator.add_notfound_view`` when scanned.  It should
1506   be preferred over using ``pyramid.view.view_config`` with
1507   ``context=HTTPNotFound`` as was previously recommended.
1508
1509 - New API: ``pyramid.config.Configurator.add_forbidden_view``.  This is a
1510   wrapper for ``pyramid.Config.configurator.add_view`` which does the right
1511   thing about permissions.  It should be preferred over calling ``add_view``
1512   directly with ``context=HTTPForbidden`` as was previously recommended.
1513
1514 - New API: ``pyramid.view.forbidden_view_config``.  This is a decorator
1515   constructor like ``pyramid.view.view_config`` that calls
1516   ``pyramid.config.Configurator.add_forbidden_view`` when scanned.  It should
1517   be preferred over using ``pyramid.view.view_config`` with
1518   ``context=HTTPForbidden`` as was previously recommended.
1519
1520 - New APIs: ``pyramid.response.FileResponse`` and
1521   ``pyramid.response.FileIter``, for usage in views that must serve files
1522   "manually".
1523
1524 Backwards Incompatibilities
1525 ---------------------------
1526
1527 - Remove ``pyramid.config.Configurator.with_context`` class method.  It was
1528   never an API, it is only used by ``pyramid_zcml`` and its functionality has
1529   been moved to that package's latest release.  This means that you'll need
1530   to use the 0.9.2 or later release of ``pyramid_zcml`` with this release of
1531   Pyramid.
1532
1533 - The ``introspector`` argument to the ``pyramid.config.Configurator``
1534   constructor API has been removed.  It has been replaced by the boolean
1535   ``introspection`` flag.
1536
1537 - The ``pyramid.registry.noop_introspector`` API object has been removed.
1538
1539 - The older deprecated ``set_notfound_view`` Configurator method is now an
1540   alias for the new ``add_notfound_view`` Configurator method.  Likewise, the
1541   older deprecated ``set_forbidden_view`` is now an alias for the new
1542   ``add_forbidden_view``. This has the following impact: the ``context`` sent
1543   to views with a ``(context, request)`` call signature registered via the
1544   ``set_notfound_view`` or ``set_forbidden_view`` will now be an exception
1545   object instead of the actual resource context found.  Use
1546   ``request.context`` to get the actual resource context.  It's also
1547   recommended to disuse ``set_notfound_view`` in favor of
1548   ``add_notfound_view``, and disuse ``set_forbidden_view`` in favor of
1549   ``add_forbidden_view`` despite the aliasing.
1550
1551 Deprecations
1552 ------------
1553
1554 - The API documentation for ``pyramid.view.append_slash_notfound_view`` and
1555   ``pyramid.view.AppendSlashNotFoundViewFactory`` was removed.  These names
1556   still exist and are still importable, but they are no longer APIs.  Use
1557   ``pyramid.config.Configurator.add_notfound_view(append_slash=True)`` or
1558   ``pyramid.view.notfound_view_config(append_slash=True)`` to get the same
1559   behavior.
1560
1561 - The ``set_forbidden_view`` and ``set_notfound_view`` methods of the
1562   Configurator were removed from the documentation.  They have been
1563   deprecated since Pyramid 1.1.
1564
1565 Bug Fixes
1566 ---------
1567
1568 - The static file response object used by ``config.add_static_view`` opened
1569   the static file twice, when it only needed to open it once.
1570
1571 - The AppendSlashNotFoundViewFactory used request.path to match routes.  This
1572   was wrong because request.path contains the script name, and this would
1573   cause it to fail in circumstances where the script name was not empty.  It
1574   should have used request.path_info, and now does.
1575
1576 Documentation
1577 -------------
1578
1579 - Updated the "Creating a Not Found View" section of the "Hooks" chapter,
1580   replacing explanations of registering a view using ``add_view`` or
1581   ``view_config`` with ones using ``add_notfound_view`` or
1582   ``notfound_view_config``.
1583
1584 - Updated the "Creating a Not Forbidden View" section of the "Hooks" chapter,
1585   replacing explanations of registering a view using ``add_view`` or
1586   ``view_config`` with ones using ``add_forbidden_view`` or
1587   ``forbidden_view_config``.
1588
1589 - Updated the "Redirecting to Slash-Appended Routes" section of the "URL
1590   Dispatch" chapter, replacing explanations of registering a view using
1591   ``add_view`` or ``view_config`` with ones using ``add_notfound_view`` or
1592   ``notfound_view_config``
1593
1594 - Updated all tutorials to use ``pyramid.view.forbidden_view_config`` rather
1595   than ``pyramid.view.view_config`` with an HTTPForbidden context.
1596
1597 1.3a8 (2012-02-19)
1598 ==================
1599
1600 Features
1601 --------
1602
1603 - The ``scan`` method of a ``Configurator`` can be passed an ``ignore``
1604   argument, which can be a string, a callable, or a list consisting of
1605   strings and/or callables.  This feature allows submodules, subpackages, and
1606   global objects from being scanned.  See
1607   http://readthedocs.org/docs/venusian/en/latest/#ignore-scan-argument for
1608   more information about how to use the ``ignore`` argument to ``scan``.
1609
1610 - Better error messages when a view callable returns a value that cannot be
1611   converted to a response (for example, when a view callable returns a
1612   dictionary without a renderer defined, or doesn't return any value at all).
1613   The error message now contains information about the view callable itself
1614   as well as the result of calling it.
1615
1616 - Better error message when a .pyc-only module is ``config.include`` -ed.
1617   This is not permitted due to error reporting requirements, and a better
1618   error message is shown when it is attempted.  Previously it would fail with
1619   something like "AttributeError: 'NoneType' object has no attribute
1620   'rfind'".
1621
1622 - Add ``pyramid.config.Configurator.add_traverser`` API method.  See the
1623   Hooks narrative documentation section entitled "Changing the Traverser" for
1624   more information.  This is not a new feature, it just provides an API for
1625   adding a traverser without needing to use the ZCA API.
1626
1627 - Add ``pyramid.config.Configurator.add_resource_url_adapter`` API method.
1628   See the Hooks narrative documentation section entitled "Changing How
1629   pyramid.request.Request.resource_url Generates a URL" for more information.
1630   This is not a new feature, it just provides an API for adding a resource
1631   url adapter without needing to use the ZCA API.
1632
1633 - The system value ``req`` is now supplied to renderers as an alias for
1634   ``request``.  This means that you can now, for example, in a template, do
1635   ``req.route_url(...)`` instead of ``request.route_url(...)``.  This is
1636   purely a change to reduce the amount of typing required to use request
1637   methods and attributes from within templates.  The value ``request`` is
1638   still available too, this is just an alternative.
1639
1640 - A new interface was added: ``pyramid.interfaces.IResourceURL``.  An adapter
1641   implementing its interface can be used to override resource URL generation
1642   when ``request.resource_url`` is called.  This interface replaces the
1643   now-deprecated ``pyramid.interfaces.IContextURL`` interface.
1644
1645 - The dictionary passed to a resource's ``__resource_url__`` method (see
1646   "Overriding Resource URL Generation" in the "Resources" chapter) now
1647   contains an ``app_url`` key, representing the application URL generated
1648   during ``request.resource_url``.  It represents a potentially customized
1649   URL prefix, containing potentially custom scheme, host and port information
1650   passed by the user to ``request.resource_url``.  It should be used instead
1651   of ``request.application_url`` where necessary.
1652
1653 - The ``request.resource_url`` API now accepts these arguments: ``app_url``,
1654   ``scheme``, ``host``, and ``port``.  The app_url argument can be used to
1655   replace the URL prefix wholesale during url generation.  The ``scheme``,
1656   ``host``, and ``port`` arguments can be used to replace the respective
1657   default values of ``request.application_url`` partially.
1658
1659 - A new API named ``request.resource_path`` now exists.  It works like
1660   ``request.resource_url`` but produces a relative URL rather than an
1661   absolute one.
1662
1663 - The ``request.route_url`` API now accepts these arguments: ``_app_url``,
1664   ``_scheme``, ``_host``, and ``_port``.  The ``_app_url`` argument can be
1665   used to replace the URL prefix wholesale during url generation.  The
1666   ``_scheme``, ``_host``, and ``_port`` arguments can be used to replace the
1667   respective default values of ``request.application_url`` partially.
1668
1669 Backwards Incompatibilities
1670 ---------------------------
1671
1672 - The ``pyramid.interfaces.IContextURL`` interface has been deprecated.
1673   People have been instructed to use this to register a resource url adapter
1674   in the "Hooks" chapter to use to influence ``request.resource_url`` URL
1675   generation for resources found via custom traversers since Pyramid 1.0.
1676
1677   The interface still exists and registering such an adapter still works, but
1678   this interface will be removed from the software after a few major Pyramid
1679   releases.  You should replace it with an equivalent
1680   ``pyramid.interfaces.IResourceURL`` adapter, registered using the new
1681   ``pyramid.config.Configurator.add_resource_url_adapter`` API.  A
1682   deprecation warning is now emitted when a
1683   ``pyramid.interfaces.IContextURL`` adapter is found when
1684   ``request.resource_url`` is called.
1685
1686 Documentation
1687 -------------
1688
1689 - Don't create a ``session`` instance in SQLA Wiki tutorial, use raw
1690   ``DBSession`` instead (this is more common in real SQLA apps).
1691
1692 Scaffolding
1693 -----------
1694
1695 - Put ``pyramid.includes`` targets within ini files in scaffolds on separate
1696   lines in order to be able to tell people to comment out only the
1697   ``pyramid_debugtoolbar`` line when they want to disable the toolbar.
1698
1699 Dependencies
1700 ------------
1701
1702 - Depend on ``venusian`` >= 1.0a3 to provide scan ``ignore`` support.
1703
1704 Internal
1705 --------
1706
1707 - Create a "MakoRendererFactoryHelper" that provides customizable settings
1708   key prefixes.  Allows settings prefixes other than "mako." to be used to
1709   create different factories that don't use the global mako settings.  This
1710   will be useful for the debug toolbar, which can currently be sabotaged by
1711   someone using custom mako configuration settings.
1712
1713 1.3a7 (2012-02-07)
1714 ==================
1715
1716 Features
1717 --------
1718
1719 - More informative error message when a ``config.include`` cannot find an
1720   ``includeme``.  See https://github.com/Pylons/pyramid/pull/392.
1721
1722 - Internal: catch unhashable discriminators early (raise an error instead of
1723   allowing them to find their way into resolveConflicts).
1724
1725 - The `match_param` view predicate now accepts a string or a tuple.
1726   This replaces the broken behavior of accepting a dict. See
1727   https://github.com/Pylons/pyramid/issues/425 for more information.
1728
1729 Bug Fixes
1730 ---------
1731
1732 - The process will now restart when ``pserve`` is used with the ``--reload``
1733   flag when the ``development.ini`` file (or any other .ini file in use) is
1734   changed.  See https://github.com/Pylons/pyramid/issues/377 and
1735   https://github.com/Pylons/pyramid/pull/411
1736
1737 - The ``prequest`` script would fail when used against URLs which did not
1738   return HTML or text.  See https://github.com/Pylons/pyramid/issues/381
1739
1740 Backwards Incompatibilities
1741 ---------------------------
1742
1743 - The `match_param` view predicate no longer accepts a dict. This will
1744   have no negative affect because the implementation was broken for
1745   dict-based arguments.
1746
1747 Documentation
1748 -------------
1749
1750 - Add a traversal hello world example to the narrative docs.
1751
1752 1.3a6 (2012-01-20)
1753 ==================
1754
1755 Features
1756 --------
1757
1758 - New API: ``pyramid.config.Configurator.set_request_property``. Add lazy
1759   property descriptors to a request without changing the request factory.
1760   This method provides conflict detection and is the suggested way to add
1761   properties to a request.
1762
1763 - Responses generated by Pyramid's ``static_view`` now use
1764   a ``wsgi.file_wrapper`` (see
1765   http://www.python.org/dev/peps/pep-0333/#optional-platform-specific-file-handling)
1766   when one is provided by the web server.
1767
1768 Bug Fixes
1769 ---------
1770
1771 - Views registered with an ``accept`` could not be overridden correctly with
1772   a different view that had the same predicate arguments.  See
1773   https://github.com/Pylons/pyramid/pull/404 for more information.
1774
1775 - When using a dotted name for a ``view`` argument to
1776   ``Configurator.add_view`` that pointed to a class with a ``view_defaults``
1777   decorator, the view defaults would not be applied.  See
1778   https://github.com/Pylons/pyramid/issues/396 .
1779
1780 - Static URL paths were URL-quoted twice.  See
1781   https://github.com/Pylons/pyramid/issues/407 .
1782
1783 1.3a5 (2012-01-09)
1784 ==================
1785
1786 Bug Fixes
1787 ---------
1788
1789 - The ``pyramid.view.view_defaults`` decorator did not work properly when
1790   more than one view relied on the defaults being different for configuration
1791   conflict resolution.  See https://github.com/Pylons/pyramid/issues/394.
1792
1793 Backwards Incompatibilities
1794 ---------------------------
1795
1796 - The ``path_info`` route and view predicates now match against
1797   ``request.upath_info`` (Unicode) rather than ``request.path_info``
1798   (indeterminate value based on Python 3 vs. Python 2).  This has to be done
1799   to normalize matching on Python 2 and Python 3.
1800
1801 1.3a4 (2012-01-05)
1802 ==================
1803
1804 Features
1805 --------
1806
1807 - New API: ``pyramid.request.Request.set_property``. Add lazy property
1808   descriptors to a request without changing the request factory. New
1809   properties may be reified, effectively caching the value for the lifetime
1810   of the instance. Common use-cases for this would be to get a database
1811   connection for the request or identify the current user.
1812
1813 - Use the ``waitress`` WSGI server instead of ``wsgiref`` in scaffolding.
1814
1815 Bug Fixes
1816 ---------
1817
1818 - The documentation of ``pyramid.events.subscriber`` indicated that using it
1819   as a decorator with no arguments like this::
1820
1821     @subscriber()
1822     def somefunc(event):
1823         pass
1824
1825   Would register ``somefunc`` to receive all events sent via the registry,
1826   but this was untrue.  Instead, it would receive no events at all.  This has
1827   now been fixed and the code matches the documentation.  See also
1828   https://github.com/Pylons/pyramid/issues/386
1829
1830 - Literal portions of route patterns were not URL-quoted when ``route_url``
1831   or ``route_path`` was used to generate a URL or path.
1832
1833 - The result of ``route_path`` or ``route_url`` might have been ``unicode``
1834   or ``str`` depending on the input.  It is now guaranteed to always be
1835   ``str``.
1836
1837 - URL matching when the pattern contained non-ASCII characters in literal
1838   parts was indeterminate.  Now the pattern supplied to ``add_route`` is
1839   assumed to be either: a ``unicode`` value, or a ``str`` value that contains
1840   only ASCII characters.  If you now want to match the path info from a URL
1841   that contains high order characters, you can pass the Unicode
1842   representation of the decoded path portion in the pattern.
1843
1844 - When using a ``traverse=`` route predicate, traversal would fail with a
1845   URLDecodeError if there were any high-order characters in the traversal
1846   pattern or in the matched dynamic segments.
1847
1848 - Using a dynamic segment named ``traverse`` in a route pattern like this::
1849
1850     config.add_route('trav_route', 'traversal/{traverse:.*}')
1851
1852   Would cause a ``UnicodeDecodeError`` when the route was matched and the
1853   matched portion of the URL contained any high-order characters.  See
1854   https://github.com/Pylons/pyramid/issues/385 .
1855
1856 - When using a ``*traverse`` stararg in a route pattern, a URL that matched
1857   that possessed a ``@@`` in its name (signifying a view name) would be
1858   inappropriately quoted by the traversal machinery during traversal,
1859   resulting in the view not being found properly. See
1860   https://github.com/Pylons/pyramid/issues/382 and
1861   https://github.com/Pylons/pyramid/issues/375 .
1862
1863 Backwards Incompatibilities
1864 ---------------------------
1865
1866 - String values passed to ``route_url`` or ``route_path`` that are meant to
1867   replace "remainder" matches will now be URL-quoted except for embedded
1868   slashes. For example::
1869
1870      config.add_route('remain', '/foo*remainder')
1871      request.route_path('remain', remainder='abc / def')
1872      # -> '/foo/abc%20/%20def'
1873
1874   Previously string values passed as remainder replacements were tacked on
1875   untouched, without any URL-quoting.  But this doesn't really work logically
1876   if the value passed is Unicode (raw unicode cannot be placed in a URL or in
1877   a path) and it is inconsistent with the rest of the URL generation
1878   machinery if the value is a string (it won't be quoted unless by the
1879   caller).
1880
1881   Some folks will have been relying on the older behavior to tack on query
1882   string elements and anchor portions of the URL; sorry, you'll need to
1883   change your code to use the ``_query`` and/or ``_anchor`` arguments to
1884   ``route_path`` or ``route_url`` to do this now.
1885
1886 - If you pass a bytestring that contains non-ASCII characters to
1887   ``add_route`` as a pattern, it will now fail at startup time.  Use Unicode
1888   instead.
1889
1890 1.3a3 (2011-12-21)
1891 ==================
1892
1893 Features
1894 --------
1895
1896 - Added a ``prequest`` script (along the lines of ``paster request``).  It is
1897   documented in the "Command-Line Pyramid" chapter in the section entitled
1898   "Invoking a Request".
1899
1900 - Add undocumented ``__discriminator__`` API to derived view callables.
1901   e.g. ``adapters.lookup(...).__discriminator__(context, request)``.  It will
1902   be used by superdynamic systems that require the discriminator to be used
1903   for introspection after manual view lookup.
1904
1905 Bug Fixes
1906 ---------
1907
1908 - Normalized exit values and ``-h`` output for all ``p*`` scripts
1909   (``pviews``, ``proutes``, etc).
1910
1911 Documentation
1912 -------------
1913
1914 - Added a section named "Making Your Script into a Console Script" in the
1915   "Command-Line Pyramid" chapter.
1916
1917 - Removed the "Running Pyramid on Google App Engine" tutorial from the main
1918   docs.  It survives on in the Cookbook
cd8ac8 1919   (http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae.html).
2c949d 1920   Rationale: it provides the correct info for the Python 2.5 version of GAE
CM 1921   only, and this version of Pyramid does not support Python 2.5.
1922
1923 1.3a2 (2011-12-14)
1924 ==================
1925
1926 Features
1927 --------
1928
1929 - New API: ``pyramid.view.view_defaults``. If you use a class as a view, you
1930   can use the new ``view_defaults`` class decorator on the class to provide
1931   defaults to the view configuration information used by every
1932   ``@view_config`` decorator that decorates a method of that class.  It also
1933   works against view configurations involving a class made imperatively.
1934
1935 - Added a backwards compatibility knob to ``pcreate`` to emulate ``paster
1936   create`` handling for the ``--list-templates`` option.
1937
1938 - Changed scaffolding machinery around a bit to make it easier for people who
1939   want to have extension scaffolds that can work across Pyramid 1.0.X, 1.1.X,
1940   1.2.X and 1.3.X.  See the new "Creating Pyramid Scaffolds" chapter in the
1941   narrative documentation for more info.
1942
1943 Documentation
1944 -------------
1945
1946 - Added documentation to "View Configuration" narrative documentation chapter
1947   about ``view_defaults`` class decorator.
1948
1949 - Added API docs for ``view_defaults`` class decorator.
1950
1951 - Added an API docs chapter for ``pyramid.scaffolds``.
1952
1953 - Added a narrative docs chapter named "Creating Pyramid Scaffolds".
1954
1955 Backwards Incompatibilities
1956 ---------------------------
1957
1958 - The ``template_renderer`` method of ``pyramid.scaffolds.PyramidScaffold``
1959   was renamed to ``render_template``.  If you were overriding it, you're a
1960   bad person, because it wasn't an API before now.  But we're nice so we're
1961   letting you know.
1962
1963 1.3a1 (2011-12-09)
1964 ==================
1965
1966 Features
1967 --------
1968
1969 - Python 3.2 compatibility.
1970
1971 - New ``pyramid.compat`` module and API documentation which provides Python
1972   2/3 straddling support for Pyramid add-ons and development environments.
1973
1974 - A ``mako.directories`` setting is no longer required to use Mako templates
1975   Rationale: Mako template renderers can be specified using an absolute asset
1976   spec.  An entire application can be written with such asset specs,
1977   requiring no ordered lookup path.
1978
1979 - ``bpython`` interpreter compatibility in ``pshell``.  See the "Command-Line
1980   Pyramid" narrative docs chapter for more information.
1981
1982 - Added ``get_appsettings`` API function to the ``pyramid.paster`` module.
1983   This function returns the settings defined within an ``[app:...]`` section
1984   in a PasteDeploy ini file.
1985
1986 - Added ``setup_logging`` API function to the ``pyramid.paster`` module.
1987   This function sets up Python logging according to the logging configuration
1988   in a PasteDeploy ini file.
1989
1990 - Configuration conflict reporting is reported in a more understandable way
1991   ("Line 11 in file..." vs. a repr of a tuple of similar info).
1992
1993 - A configuration introspection system was added; see the narrative
1994   documentation chapter entitled "Pyramid Configuration Introspection" for
1995   more information.  New APIs: ``pyramid.registry.Introspectable``,
1996   ``pyramid.config.Configurator.introspector``,
1997   ``pyramid.config.Configurator.introspectable``,
1998   ``pyramid.registry.Registry.introspector``.
1999
2000 - Allow extra keyword arguments to be passed to the
2001   ``pyramid.config.Configurator.action`` method.
2002
2003 - New APIs: ``pyramid.path.AssetResolver`` and
2004   ``pyramid.path.DottedNameResolver``.  The former can be used to resolve
2005   asset specifications, the latter can be used to resolve dotted names to
2006   modules or packages.
2007
2008 Bug Fixes
2009 ---------
2010
2011 - Make test suite pass on 32-bit systems; closes #286.  closes #306.
2012   See also https://github.com/Pylons/pyramid/issues/286
2013
ef2a4a 2014 - The ``pyramid.view.view_config`` decorator did not accept a ``match_params``
2c949d 2015   predicate argument.  See https://github.com/Pylons/pyramid/pull/308
CM 2016
2017 - The AuthTktCookieHelper could potentially generate Unicode headers
2018   inappropriately when the ``tokens`` argument to remember was used.  See 
2019   https://github.com/Pylons/pyramid/pull/314.
2020
2021 - The AuthTktAuthenticationPolicy did not use a timing-attack-aware string
2022   comparator.  See https://github.com/Pylons/pyramid/pull/320 for more info.
2023
2024 - The DummySession in ``pyramid.testing`` now generates a new CSRF token if
2025   one doesn't yet exist.
2026
2027 - ``request.static_url`` now generates URL-quoted URLs when fed a ``path``
2028   argument which contains characters that are unsuitable for URLs.  See
2029   https://github.com/Pylons/pyramid/issues/349 for more info.
2030
2031 - Prevent a scaffold rendering from being named ``site`` (conflicts with
2032   Python internal site.py).
2033
2034 - Support for using instances as targets of the ``pyramid.wsgi.wsgiapp`` and
2035   ``pryramid.wsgi.wsgiapp2`` functions.
2036   See https://github.com/Pylons/pyramid/pull/370 for more info.
2037
2038 Backwards Incompatibilities
2039 ---------------------------
2040
2041 - Pyramid no longer runs on Python 2.5 (which includes the most recent
2042   release of Jython and the Python 2.5 version of GAE as of this writing).
2043
2044 - The ``paster`` command is no longer the documented way to create projects,
2045   start the server, or run debugging commands.  To create projects from
2046   scaffolds, ``paster create`` is replaced by the ``pcreate`` console script.
2047   To serve up a project, ``paster serve`` is replaced by the ``pserve``
2048   console script.  New console scripts named ``pshell``, ``pviews``,
2049   ``proutes``, and ``ptweens`` do what their ``paster <commandname>``
2050   equivalents used to do.  Rationale: the Paste and PasteScript packages do
2051   not run under Python 3.
2052
2053 - The default WSGI server run as the result of ``pserve`` from newly rendered
2054   scaffolding is now the ``wsgiref`` WSGI server instead of the
2055   ``paste.httpserver`` server.  Rationale: Rationale: the Paste and
2056   PasteScript packages do not run under Python 3.
2057
2058 - The ``pshell`` command (see "paster pshell") no longer accepts a
2059   ``--disable-ipython`` command-line argument.  Instead, it accepts a ``-p``
2060   or ``--python-shell`` argument, which can be any of the values ``python``,
2061   ``ipython`` or ``bpython``.
2062
2063 - Removed the ``pyramid.renderers.renderer_from_name`` function.  It has been
2064   deprecated since Pyramid 1.0, and was never an API.
2065
2066 - To use ZCML with versions of Pyramid >= 1.3, you will need ``pyramid_zcml``
2067   version >= 0.8 and ``zope.configuration`` version >= 3.8.0.  The
2068   ``pyramid_zcml`` package version 0.8 is backwards compatible all the way to
2069   Pyramid 1.0, so you won't be warned if you have older versions installed
2070   and upgrade Pyramid "in-place"; it may simply break instead.
2071
2072 Dependencies
2073 ------------
2074
2075 - Pyramid no longer depends on the ``zope.component`` package, except as a
2076   testing dependency.
2077
2078 - Pyramid now depends on a zope.interface>=3.8.0, WebOb>=1.2dev,
2079   repoze.lru>=0.4, zope.deprecation>=3.5.0, translationstring>=0.4 (for
2080   Python 3 compatibility purposes).  It also, as a testing dependency,
2081   depends on WebTest>=1.3.1 for the same reason.
2082
2083 - Pyramid no longer depends on the Paste or PasteScript packages.
2084
2085 Documentation
2086 -------------
2087
2088 - The SQLAlchemy Wiki tutorial has been updated.  It now uses
2089   ``@view_config`` decorators and an explicit database population script.
2090
2091 - Minor updates to the ZODB Wiki tutorial.
2092
2093 - A narrative documentation chapter named "Extending Pyramid Configuration"
2094   was added; it describes how to add a new directive, and how use the
2095   ``pyramid.config.Configurator.action`` method within custom directives.  It
2096   also describes how to add introspectable objects.
2097
2098 - A narrative documentation chapter named "Pyramid Configuration
2099   Introspection" was added.  It describes how to query the introspection
2100   system.
2101
2102 Scaffolds
2103 ---------
2104
2105 - Rendered scaffolds have now been changed to be more relocatable (fewer
2106   mentions of the package name within files in the package).
2107
2108 - The ``routesalchemy`` scaffold has been renamed ``alchemy``, replacing the
2109   older (traversal-based) ``alchemy`` scaffold (which has been retired).
2110
2111 - The ``starter`` scaffold now uses URL dispatch by default.
2112
e04cbb 2113 1.2 (2011-09-12)
CM 2114 ================
2115
2116 Features
2117 --------
2118
2119 - Route pattern replacement marker names can now begin with an underscore.
2120   See https://github.com/Pylons/pyramid/issues/276.
2121
2122 1.2b3 (2011-09-11)
2123 ==================
2124
2125 Bug Fixes
2126 ---------
2127
2128 - The route prefix was not taken into account when a static view was added in
2129   an "include".  See https://github.com/Pylons/pyramid/issues/266 .
2130
2131 1.2b2 (2011-09-08)
2132 ==================
2133
2134 Bug Fixes
2135 ---------
2136
2137 - The 1.2b1 tarball was a brownbag (particularly for Windows users) because
2138   it contained filenames with stray quotation marks in inappropriate places.
2139   We depend on ``setuptools-git`` to produce release tarballs, and when it
2140   was run to produce the 1.2b1 tarball, it didn't yet cope well with files
2141   present in git repositories with high-order characters in their filenames.
2142
2143 Documentation
2144 -------------
2145
2146 - Minor tweaks to the "Introduction" narrative chapter example app and
2147   wording.
2148
2149 1.2b1 (2011-09-08)
2150 ==================
2151
2152 Bug Fixes
2153 ---------
2154
2155 - Sometimes falling back from territory translations (``de_DE``) to language
2156   translations (``de``) would not work properly when using a localizer.  See
2157   https://github.com/Pylons/pyramid/issues/263
2158
2159 - The static file serving machinery could not serve files that started with a
2160   ``.`` (dot) character.
2161
2162 - Static files with high-order (super-ASCII) characters in their names could
2163   not be served by a static view.  The static file serving machinery
2164   inappropriately URL-quoted path segments in filenames when asking for files
2165   from the filesystem.
2166
2167 - Within ``pyramid.traversal.traversal_path`` , canonicalize URL segments
2168   from UTF-8 to Unicode before checking whether a segment matches literally
2169   one of ``.``, the empty string, or ``..`` in case there's some sneaky way
2170   someone might tunnel those strings via UTF-8 that don't match the literals
2171   before decoded.
2172
2173 Documentation
2174 -------------
2175
2176 - Added a "What Makes Pyramid Unique" section to the Introduction narrative
2177   chapter.
2178
2179 1.2a6 (2011-09-06)
2180 ==================
2181
2182 Bug Fixes
2183 ---------
2184
2185 - AuthTktAuthenticationPolicy with a ``reissue_time`` interfered with logout.
2186   See https://github.com/Pylons/pyramid/issues/262.
2187
2188 Internal
2189 --------
2190
2191 - Internalize code previously depended upon as imports from the
2192   ``paste.auth`` module (futureproof).
2193
2194 - Replaced use of ``paste.urlparser.StaticURLParser`` with a derivative of
2195   Chris Rossi's "happy" static file serving code (futureproof).
2196
2197 - Fixed test suite; on some systems tests would fail due to indeterminate
2198   test run ordering and a double-push-single-pop of a shared test variable.
2199
2200 Behavior Differences
2201 --------------------
2202
2203 - An ETag header is no longer set when serving a static file.  A
2204   Last-Modified header is set instead.
2205
2206 - Static file serving no longer supports the ``wsgi.file_wrapper`` extension.
2207
2208 - Instead of returning a ``403 Forbidden`` error when a static file is served
2209   that cannot be accessed by the Pyramid process' user due to file
2210   permissions, an IOError (or similar) will be raised.
2211
2212 Scaffolds
2213 ---------
2214
2215 - All scaffolds now send the ``cache_max_age`` parameter to the
2216   ``add_static_view`` method.
2217
2218 1.2a5 (2011-09-04)
2219 ==================
2220
2221 Bug Fixes
2222 ---------
2223
2224 - The ``route_prefix`` of a configurator was not properly taken into account
2225   when registering routes in certain circumstances.  See
2226   https://github.com/Pylons/pyramid/issues/260
2227
2228 Dependencies
2229 ------------
2230
2231 - The ``zope.configuration`` package is no longer a dependency.
2232
2233 1.2a4 (2011-09-02)
2234 ==================
2235
2236 Features
2237 --------
2238
2239 - Support an ``onerror`` keyword argument to
2240   ``pyramid.config.Configurator.scan()``.  This onerror keyword argument is
2241   passed to ``venusian.Scanner.scan()`` to influence error behavior when
2242   an exception is raised during scanning.
2243
2244 - The ``request_method`` predicate argument to
2245   ``pyramid.config.Configurator.add_view`` and
2246   ``pyramid.config.Configurator.add_route`` is now permitted to be a tuple of
2247   HTTP method names.  Previously it was restricted to being a string
2248   representing a single HTTP method name.
2249
2250 - Undeprecated ``pyramid.traversal.find_model``,
2251   ``pyramid.traversal.model_path``, ``pyramid.traversal.model_path_tuple``,
2252   and ``pyramid.url.model_url``, which were all deprecated in Pyramid 1.0.
2253   There's just not much cost to keeping them around forever as aliases to
2254   their renamed ``resource_*`` prefixed functions.
2255
2256 - Undeprecated ``pyramid.view.bfg_view``, which was deprecated in Pyramid
2257   1.0.  This is a low-cost alias to ``pyramid.view.view_config`` which we'll
2258   just keep around forever.
2259
2260 Dependencies
2261 ------------
2262
2263 - Pyramid now requires Venusian 1.0a1 or better to support the ``onerror``
2264   keyword argument to ``pyramid.config.Configurator.scan``.
2265
2266 1.2a3 (2011-08-29)
2267 ==================
2268
2269 Bug Fixes
2270 ---------
2271
2272 - Pyramid did not properly generate static URLs using
2273   ``pyramid.url.static_url`` when passed a caller-package relative path due
2274   to a refactoring done in 1.2a1.
2275
2276 - The ``settings`` object emitted a deprecation warning any time
2277   ``__getattr__`` was called upon it.  However, there are legitimate
2278   situations in which ``__getattr__`` is called on arbitrary objects
2279   (e.g. ``hasattr``).  Now, the ``settings`` object only emits the warning
2280   upon successful lookup.
2281
2282 Internal
2283 --------
2284
2285 - Use ``config.with_package`` in view_config decorator rather than
2286   manufacturing a new renderer helper (cleanup).
2287
2288 1.2a2 (2011-08-27)
2289 ==================
2290
2291 Bug Fixes
2292 ---------
2293
2294 - When a ``renderers=`` argument is not specified to the Configurator
2295   constructor, eagerly register and commit the default renderer set.  This
2296   permits the overriding of the default renderers, which was broken in 1.2a1
2297   without a commit directly after Configurator construction.
2298
2299 - Mako rendering exceptions had the wrong value for an error message.
2300
2301 - An include could not set a root factory successfully because the
2302   Configurator constructor unconditionally registered one that would be
2303   treated as if it were "the word of the user".
2304
2305 Features
2306 --------
2307
2308 - A session factory can now be passed in using the dotted name syntax.
2309
2310 1.2a1 (2011-08-24)
2311 ==================
2312
2313 Features
2314 --------
2315
2316 - The ``[pshell]`` section in an ini configuration file now treats a
2317   ``setup`` key as a dotted name that points to a callable that is passed the
2318   bootstrap environment.  It can mutate the environment as necessary for
2319   great justice.
2320
2321 - A new configuration setting named ``pyramid.includes`` is now available.
2322   It is described in the "Environment Variables and ``.ini`` Files Settings"
2323   narrative documentation chapter.
2324
2325 - Added a ``route_prefix`` argument to the
2326   ``pyramid.config.Configurator.include`` method.  This argument allows you
2327   to compose URL dispatch applications together.  See the section entitled
2328   "Using a Route Prefix to Compose Applications" in the "URL Dispatch"
2329   narrative documentation chapter.
2330
2331 - Added a ``pyramid.security.NO_PERMISSION_REQUIRED`` constant for use in
2332   ``permission=`` statements to view configuration.  This constant has a
2333   value of the string ``__no_permission_required__``.  This string value was
2334   previously referred to in documentation; now the documentation uses the
2335   constant.
2336
2337 - Added a decorator-based way to configure a response adapter:
2338   ``pyramid.response.response_adapter``.  This decorator has the same use as
2339   ``pyramid.config.Configurator.add_response_adapter`` but it's declarative.
2340
2341 - The ``pyramid.events.BeforeRender`` event now has an attribute named
2342   ``rendering_val``.  This can be used to introspect the value returned by a
2343   view in a BeforeRender subscriber.
2344
2345 - New configurator directive: ``pyramid.config.Configurator.add_tween``.
2346   This directive adds a "tween".  A "tween" is used to wrap the Pyramid
2347   router's primary request handling function.  This is a feature may be used
2348   by Pyramid framework extensions, to provide, for example, view timing
2349   support and as a convenient place to hang bookkeeping code.
2350
2351   Tweens are further described in the narrative docs section in the Hooks
2352   chapter, named "Registering Tweens".
2353
2354 - New paster command ``paster ptweens``, which prints the current "tween"
2355   configuration for an application.  See the section entitled "Displaying
2356   Tweens" in the Command-Line Pyramid chapter of the narrative documentation
2357   for more info.
2358
2359 - The Pyramid debug logger now uses the standard logging configuration
2360   (usually set up by Paste as part of startup).  This means that output from
2361   e.g. ``debug_notfound``, ``debug_authorization``, etc. will go to the
2362   normal logging channels.  The logger name of the debug logger will be the
2363   package name of the *caller* of the Configurator's constructor.
2364
2365 - A new attribute is available on request objects: ``exc_info``.  Its value
2366   will be ``None`` until an exception is caught by the Pyramid router, after
2367   which it will be the result of ``sys.exc_info()``.
2368
2369 - ``pyramid.testing.DummyRequest`` now implements the
2370   ``add_finished_callback`` and ``add_response_callback`` methods.
2371
2372 - New methods of the ``pyramid.config.Configurator`` class:
2373   ``set_authentication_policy`` and ``set_authorization_policy``.  These are
2374   meant to be consumed mostly by add-on authors.
2375
2376 - New Configurator method: ``set_root_factory``.
2377
2378 - Pyramid no longer eagerly commits some default configuration statements at
2379   Configurator construction time, which permits values passed in as
2380   constructor arguments (e.g. ``authentication_policy`` and
2381   ``authorization_policy``) to override the same settings obtained via an
2382   "include".
2383
2384 - Better Mako rendering exceptions via
2385   ``pyramid.mako_templating.MakoRenderingException``
2386
2387 - New request methods: ``current_route_url``, ``current_route_path``, and
2388   ``static_path``.
2389
2390 - New functions in ``pyramid.url``: ``current_route_path`` and
2391   ``static_path``.
2392
2393 - The ``pyramid.request.Request.static_url`` API (and its brethren
2394   ``pyramid.request.Request.static_path``, ``pyramid.url.static_url``, and
2395   ``pyramid.url.static_path``) now accept an asbolute filename as a "path"
2396   argument.  This will generate a URL to an asset as long as the filename is
2397   in a directory which was previously registered as a static view.
2398   Previously, trying to generate a URL to an asset using an absolute file
2399   path would raise a ValueError.
2400
2401 - The ``RemoteUserAuthenticationPolicy ``, ``AuthTktAuthenticationPolicy``,
2402   and ``SessionAuthenticationPolicy`` constructors now accept an additional
2403   keyword argument named ``debug``.  By default, this keyword argument is
2404   ``False``.  When it is ``True``, debug information will be sent to the
2405   Pyramid debug logger (usually on stderr) when the ``authenticated_userid``
2406   or ``effective_principals`` method is called on any of these policies.  The
2407   output produced can be useful when trying to diagnose
2408   authentication-related problems.
2409
2410 - New view predicate: ``match_param``.  Example: a view added via
2411   ``config.add_view(aview, match_param='action=edit')`` will be called only
2412   when the ``request.matchdict`` has a value inside it named ``action`` with
2413   a value of ``edit``.
2414
2415 Internal
2416 --------
2417
2418 - The Pyramid "exception view" machinery is now implemented as a "tween"
2419   (``pyramid.tweens.excview_tween_factory``).
2420
2421 - WSGIHTTPException (HTTPFound, HTTPNotFound, etc) now has a new API named
2422   "prepare" which renders the body and content type when it is provided with
2423   a WSGI environ.  Required for debug toolbar.
2424
2425 - Once ``__call__`` or ``prepare`` is called on a WSGIHTTPException, the body
2426   will be set, and subsequent calls to ``__call__`` will always return the
2427   same body.  Delete the body attribute to rerender the exception body.
2428
2429 - Previously the ``pyramid.events.BeforeRender`` event *wrapped* a dictionary
2430   (it addressed it as its ``_system`` attribute).  Now it *is* a dictionary
2431   (it inherits from ``dict``), and it's the value that is passed to templates
2432   as a top-level dictionary.
2433
2434 - The ``route_url``, ``route_path``, ``resource_url``, ``static_url``, and
2435   ``current_route_url`` functions in the ``pyramid.url`` package now delegate
2436   to a method on the request they've been passed, instead of the other way
2437   around.  The pyramid.request.Request object now inherits from a mixin named
2438   pyramid.url.URLMethodsMixin to make this possible, and all url/path
2439   generation logic is embedded in this mixin.
2440
2441 - Refactor ``pyramid.config`` into a package.
2442
2443 - Removed the ``_set_security_policies`` method of the Configurator.
2444
2445 - Moved the ``StaticURLInfo`` class from ``pyramid.static`` to
2446   ``pyramid.config.views``.
2447
2448 - Move the ``Settings`` class from ``pyramid.settings`` to
2449   ``pyramid.config.settings``.
2450
2451 - Move the ``OverrideProvider``, ``PackageOverrides``, ``DirectoryOverride``,
2452   and ``FileOverride`` classes from ``pyramid.asset`` to
2453   ``pyramid.config.assets``.
2454
2455 Deprecations
2456 ------------
2457
2458 - All Pyramid-related deployment settings (e.g. ``debug_all``,
2459   ``debug_notfound``) are now meant to be prefixed with the prefix
2460   ``pyramid.``.  For example: ``debug_all`` -> ``pyramid.debug_all``.  The
2461   old non-prefixed settings will continue to work indefinitely but supplying
2462   them may eventually print a deprecation warning.  All scaffolds and
2463   tutorials have been changed to use prefixed settings.
2464
2465 - The ``settings`` dictionary now raises a deprecation warning when you
2466   attempt to access its values via ``__getattr__`` instead of
2467   via ``__getitem__``.
2468
2469 Backwards Incompatibilities
2470 ---------------------------
2471
2472 - If a string is passed as the ``debug_logger`` parameter to a Configurator,
2473   that string is considered to be the name of a global Python logger rather
2474   than a dotted name to an instance of a logger.
2475
2476 - The ``pyramid.config.Configurator.include`` method now accepts only a
2477   single ``callable`` argument (a sequence of callables used to be
2478   permitted).  If you are passing more than one ``callable`` to
2479   ``pyramid.config.Configurator.include``, it will break.  You now must now
2480   instead make a separate call to the method for each callable.  This change
2481   was introduced to support the ``route_prefix`` feature of include.
2482
2483 - It may be necessary to more strictly order configuration route and view
2484   statements when using an "autocommitting" Configurator.  In the past, it
2485   was possible to add a view which named a route name before adding a route
2486   with that name when you used an autocommitting configurator.  For example::
2487
2488     config = Configurator(autocommit=True)
2489     config.add_view('my.pkg.someview', route_name='foo')
2490     config.add_route('foo', '/foo')
2491
2492   The above will raise an exception when the view attempts to add itself.
2493   Now you must add the route before adding the view::
2494
2495     config = Configurator(autocommit=True)
2496     config.add_route('foo', '/foo')
2497     config.add_view('my.pkg.someview', route_name='foo')
2498
2499   This won't effect "normal" users, only people who have legacy BFG codebases
2500   that used an autommitting configurator and possibly tests that use the
2501   configurator API (the configurator returned by ``pyramid.testing.setUp`` is
2502   an autocommitting configurator).  The right way to get around this is to
2503   use a non-autocommitting configurator (the default), which does not have
2504   these directive ordering requirements.
2505
2506 - The ``pyramid.config.Configurator.add_route`` directive no longer returns a
2507   route object.  This change was required to make route vs. view
2508   configuration processing work properly.
2509
2510 Documentation
2511 -------------
2512
2513 - Narrative and API documentation which used the ``route_url``,
2514   ``route_path``, ``resource_url``, ``static_url``, and ``current_route_url``
2515   functions in the ``pyramid.url`` package have now been changed to use
2516   eponymous methods of the request instead.
2517
2518 - Added a section entitled "Using a Route Prefix to Compose Applications" to
2519   the "URL Dispatch" narrative documentation chapter.
2520
2521 - Added a new module to the API docs: ``pyramid.tweens``.
2522
2523 - Added a "Registering Tweens" section to the "Hooks" narrative chapter.
2524
2525 - Added a "Displaying Tweens" section to the "Command-Line Pyramid" narrative
2526   chapter.
2527
2528 - Added documentation for the ``pyramid.tweens`` and ``pyramid.includes``
2529   configuration settings to the "Environment Variables and ``.ini`` Files
2530   Settings" chapter.
2531
2532 - Added a Logging chapter to the narrative docs (based on the Pylons logging
2533   docs, thanks Phil).
2534
2535 - Added a Paste chapter to the narrative docs (moved content from the Project
2536   chapter).
2537
2538 - Added the ``pyramid.interfaces.IDict`` interface representing the methods
2539   of a dictionary, for documentation purposes only (IMultiDict and
2540   IBeforeRender inherit from it).
2541
2542 - All tutorials now use - The ``route_url``, ``route_path``,
2543   ``resource_url``, ``static_url``, and ``current_route_url`` methods of the
2544   request rather than the function variants imported from ``pyramid.url``.
2545
2546 - The ZODB wiki tutorial now uses the ``pyramid_zodbconn`` package rather
2547   than the ``repoze.zodbconn`` package to provide ZODB integration.
2548
2549 Dependency Changes
2550 ------------------
2551
2552 - Pyramid now relies on PasteScript >= 1.7.4.  This version contains a
2553   feature important for allowing flexible logging configuration.
2554
2555 Scaffolds
2556 ----------
2557
2558 - All scaffolds now use the ``pyramid_tm`` package rather than the
2559   ``repoze.tm2`` middleware to manage transaction management.
2560
2561 - The ZODB scaffold now uses the ``pyramid_zodbconn`` package rather than the
2562   ``repoze.zodbconn`` package to provide ZODB integration.
2563
2564 - All scaffolds now use the ``pyramid_debugtoolbar`` package rather than the
2565   ``WebError`` package to provide interactive debugging features.
2566
2567 - Projects created via a scaffold no longer depend on the ``WebError``
2568   package at all; configuration in the ``production.ini`` file which used to
2569   require its ``error_catcher`` middleware has been removed.  Configuring
2570   error catching / email sending is now the domain of the ``pyramid_exclog``
cd8ac8 2571   package (see http://docs.pylonsproject.org/projects/pyramid_exclog/en/latest/).
e04cbb 2572
CM 2573 Bug Fixes
2574 ---------
2575
2576 - Fixed an issue with the default renderer not working at certain times.  See
2577   https://github.com/Pylons/pyramid/issues/249
2578
2579
bd9947 2580 1.1 (2011-07-22)
CM 2581 ================
2582
2583 Features
2584 --------
2585
2586 - Added the ``pyramid.renderers.null_renderer`` object as an API.  The null
2587   renderer is an object that can be used in advanced integration cases as
2588   input to the view configuration ``renderer=`` argument.  When the null
2589   renderer is used as a view renderer argument, Pyramid avoids converting the
2590   view callable result into a Response object.  This is useful if you want to
2591   reuse the view configuration and lookup machinery outside the context of
2592   its use by the Pyramid router.  This feature was added for consumption by
2593   the ``pyramid_rpc`` package, which uses view configuration and lookup
2594   outside the context of a router in exactly this way.  ``pyramid_rpc`` has
2595   been broken under 1.1 since 1.1b1; adding it allows us to make it work
2596   again.
2597
2598 - Change all scaffolding templates that point to docs.pylonsproject.org to
2599   use ``/projects/pyramid/current`` rather than ``/projects/pyramid/dev``.
2600
2601 Internals
2602 ---------
2603
2604 - Remove ``compat`` code that served only the purpose of providing backwards
2605   compatibility with Python 2.4.
2606
2607 - Add a deprecation warning for non-API function
2608   ``pyramid.renderers.renderer_from_name`` which has seen use in the wild.
2609
2610 - Add a ``clone`` method to ``pyramid.renderers.RendererHelper`` for use by
2611   the ``pyramid.view.view_config`` decorator.
2612
2613 Documentation
2614 -------------
2615
2616 - Fixed two typos in wiki2 (SQLA + URL Dispatch) tutorial.
2617
2618 - Reordered chapters in narrative section for better new user friendliness.
2619
2620 - Added more indexing markers to sections in documentation.
2621
2622 1.1b4 (2011-07-18)
2623 ==================
2624
2625 Documentation
2626 -------------
2627
2628 - Added a section entitled "Writing a Script" to the "Command-Line Pyramid"
2629   chapter.
2630
2631 Backwards Incompatibilities
2632 ---------------------------
2633
2634 - We added the ``pyramid.scripting.make_request`` API too hastily in 1.1b3.
2635   It has been removed.  Sorry for any inconvenience.  Use the
2636   ``pyramid.request.Request.blank`` API instead.
2637
2638 Features
2639 --------
2640
2641 - The ``paster pshell``, ``paster pviews``, and ``paster proutes`` commands
2642   each now under the hood uses ``pyramid.paster.bootstrap``, which makes it
2643   possible to supply an ``.ini`` file without naming the "right" section in
2644   the file that points at the actual Pyramid application.  Instead, you can
2645   generally just run ``paster {pshell|proutes|pviews} development.ini`` and
2646   it will do mostly the right thing.
2647
2648 Bug Fixes
2649 ---------
2650
2651 - Omit custom environ variables when rendering a custom exception template in
2652   ``pyramid.httpexceptions.WSGIHTTPException._set_default_attrs``;
2653   stringifying thse may trigger code that should not be executed; see
2654   https://github.com/Pylons/pyramid/issues/239
2655
2656 1.1b3 (2011-07-15)
2657 ==================
2658
2659 Features
2660 --------
2661
2662 - Fix corner case to ease semifunctional testing of views: create a new
2663   rendererinfo to clear out old registry on a rescan.  See
2664   https://github.com/Pylons/pyramid/pull/234.
2665
2666 - New API class: ``pyramid.static.static_view``.  This supersedes the
2667   deprecated ``pyramid.view.static`` class.  ``pyramid.static.static_view``
2668   by default serves up documents as the result of the request's
2669   ``path_info``, attribute rather than it's ``subpath`` attribute (the
2670   inverse was true of ``pyramid.view.static``, and still is).
2671   ``pyramid.static.static_view`` exposes a ``use_subpath`` flag for use when
2672   you want the static view to behave like the older deprecated version.
2673
2674 - A new API function ``pyramid.paster.bootstrap`` has been added to make
2675   writing scripts that bootstrap a Pyramid environment easier, e.g.::
2676
2677       from pyramid.paster import bootstrap
2678       info = bootstrap('/path/to/my/development.ini')
2679       request = info['request']
2680       print request.route_url('myroute')
2681
2682 - A new API function ``pyramid.scripting.prepare`` has been added.  It is a
2683   lower-level analogue of ``pyramid.paster.boostrap`` that accepts a request
2684   and a registry instead of a config file argument, and is used for the same
2685   purpose::
2686
2687       from pyramid.scripting import prepare
2688       info = prepare(registry=myregistry)
2689       request = info['request']
2690       print request.route_url('myroute')
2691
2692 - A new API function ``pyramid.scripting.make_request`` has been added.  The
2693   resulting request will have a ``registry`` attribute.  It is meant to be
2694   used in conjunction with ``pyramid.scripting.prepare`` and/or
2695   ``pyramid.paster.bootstrap`` (both of which accept a request as an
2696   argument)::
2697
2698       from pyramid.scripting import make_request
2699       request = make_request('/')
2700
2701 - New API attribute ``pyramid.config.global_registries`` is an iterable
2702   object that contains references to every Pyramid registry loaded into the
2703   current process via ``pyramid.config.Configurator.make_app``.  It also has
2704   a ``last`` attribute containing the last registry loaded.  This is used by
2705   the scripting machinery, and is available for introspection.
2706
2707 Deprecations
2708 ------------
2709
2710 - The ``pyramid.view.static`` class has been deprecated in favor of the newer
2711   ``pyramid.static.static_view`` class.  A deprecation warning is raised when
2712   it is used.  You should replace it with a reference to
2713   ``pyramid.static.static_view`` with the ``use_subpath=True`` argument.
2714
2715 Bug Fixes
2716 ---------
2717
2718 - Without a mo-file loaded for the combination of domain/locale,
2719   ``pyramid.i18n.Localizer.pluralize`` run using that domain/locale
2720   combination raised an inscrutable "translations object has no attr
2721   'plural'" error.  Now, instead it "works" (it uses a germanic pluralization
2722   by default).  It's nonsensical to try to pluralize something without
2723   translations for that locale/domain available, but this behavior matches
2724   the behavior of ``pyramid.i18n.Localizer.translate`` so it's at least
2725   consistent; see https://github.com/Pylons/pyramid/issues/235.
2726
2727 1.1b2 (2011-07-13)
2728 ==================
2729
2730 Features
2731 --------
2732
2733 - New environment setting ``PYRAMID_PREVENT_HTTP_CACHE`` and new
2734   configuration file value ``prevent_http_cache``.  These are synomymous and
2735   allow you to prevent HTTP cache headers from being set by Pyramid's
2736   ``http_cache`` machinery globally in a process.  see the "Influencing HTTP
2737   Caching" section of the "View Configuration" narrative chapter and the
2738   detailed documentation for this setting in the "Environment Variables and
2739   Configuration Settings" narrative chapter.
2740
2741 Behavior Changes
2742 ----------------
2743
2744 - Previously, If a ``BeforeRender`` event subscriber added a value via the
2745   ``__setitem__`` or ``update`` methods of the event object with a key that
2746   already existed in the renderer globals dictionary, a ``KeyError`` was
2747   raised.  With the deprecation of the "add_renderer_globals" feature of the
2748   configurator, there was no way to override an existing value in the
2749   renderer globals dictionary that already existed.  Now, the event object
2750   will overwrite an older value that is already in the globals dictionary
2751   when its ``__setitem__`` or ``update`` is called (as well as the new
2752   ``setdefault`` method), just like a plain old dictionary.  As a result, for
2753   maximum interoperability with other third-party subscribers, if you write
2754   an event subscriber meant to be used as a BeforeRender subscriber, your
2755   subscriber code will now need to (using ``.get`` or ``__contains__`` of the
2756   event object) ensure no value already exists in the renderer globals
2757   dictionary before setting an overriding value.
2758
2759 Bug Fixes
2760 ---------
2761
2762 - The ``Configurator.add_route`` method allowed two routes with the same
2763   route to be added without an intermediate ``config.commit()``.  If you now
2764   receive a ``ConfigurationError`` at startup time that appears to be
2765   ``add_route`` related, you'll need to either a) ensure that all of your
2766   route names are unique or b) call ``config.commit()`` before adding a
2767   second route with the name of a previously added name or c) use a
2768   Configurator that works in ``autocommit`` mode.
2769
2770 - The ``pyramid_routesalchemy`` and ``pyramid_alchemy`` scaffolds
2771   inappropriately used ``DBSession.rollback()`` instead of
2772   ``transaction.abort()`` in one place.
2773
2774 - We now clear ``request.response`` before we invoke an exception view; an
2775   exception view will be working with a request.response that has not been
2776   touched by any code prior to the exception.
2777
2778 - Views associated with routes with spaces in the route name may not have
2779   been looked up correctly when using Pyramid with ``zope.interface`` 3.6.4
2780   and better.  See https://github.com/Pylons/pyramid/issues/232.
2781
2782 Documentation
2783 -------------
2784
2785 - Wiki2 (SQLAlchemy + URL Dispatch) tutorial ``models.initialize_sql`` didn't
2786   match the ``pyramid_routesalchemy`` scaffold function of the same name; it
2787   didn't get synchronized when it was changed in the scaffold.
2788
2789 - New documentation section in View Configuration narrative chapter:
2790   "Influencing HTTP Caching".
2791
2792 1.1b1 (2011-07-10)
2793 ==================
2794
2795 Features
2796 --------
2797
2798 - It is now possible to invoke ``paster pshell`` even if the paste ini file
2799   section name pointed to in its argument is not actually a Pyramid WSGI
2800   application.  The shell will work in a degraded mode, and will warn the
2801   user.  See "The Interactive Shell" in the "Creating a Pyramid Project"
2802   narrative documentation section.
2803
2804 - ``paster pshell`` now offers more built-in global variables by default
2805   (including ``app`` and ``settings``).  See "The Interactive Shell" in the
2806   "Creating a Pyramid Project" narrative documentation section.
2807
2808 - It is now possible to add a ``[pshell]`` section to your application's .ini
2809   configuration file, which influences the global names available to a pshell
2810   session.  See "Extending the Shell" in the "Creating a Pyramid Project"
2811   narrative documentation chapter.
2812
2813 - The ``config.scan`` method has grown a ``**kw`` argument.  ``kw`` argument
2814   represents a set of keyword arguments to pass to the Venusian ``Scanner``
2815   object created by Pyramid.  (See the Venusian documentation for more
2816   information about ``Scanner``).
2817
2818 - New request property: ``json_body``. This property will return the
2819   JSON-decoded variant of the request body.  If the request body is not
2820   well-formed JSON, this property will raise an exception.
2821
2822 - A new value ``http_cache`` can be used as a view configuration
2823   parameter.
2824
2825   When you supply an ``http_cache`` value to a view configuration, the
2826   ``Expires`` and ``Cache-Control`` headers of a response generated by the
2827   associated view callable are modified.  The value for ``http_cache`` may be
2828   one of the following:
2829
2830   - A nonzero integer.  If it's a nonzero integer, it's treated as a number
2831     of seconds.  This number of seconds will be used to compute the
2832     ``Expires`` header and the ``Cache-Control: max-age`` parameter of
2833     responses to requests which call this view.  For example:
2834     ``http_cache=3600`` instructs the requesting browser to 'cache this
2835     response for an hour, please'.
2836
2837   - A ``datetime.timedelta`` instance.  If it's a ``datetime.timedelta``
2838     instance, it will be converted into a number of seconds, and that number
2839     of seconds will be used to compute the ``Expires`` header and the
2840     ``Cache-Control: max-age`` parameter of responses to requests which call
2841     this view.  For example: ``http_cache=datetime.timedelta(days=1)``
2842     instructs the requesting browser to 'cache this response for a day,
2843     please'.
2844
2845   - Zero (``0``).  If the value is zero, the ``Cache-Control`` and
2846     ``Expires`` headers present in all responses from this view will be
2847     composed such that client browser cache (and any intermediate caches) are
2848     instructed to never cache the response.
2849
2850   - A two-tuple.  If it's a two tuple (e.g. ``http_cache=(1,
2851     {'public':True})``), the first value in the tuple may be a nonzero
2852     integer or a ``datetime.timedelta`` instance; in either case this value
2853     will be used as the number of seconds to cache the response.  The second
2854     value in the tuple must be a dictionary.  The values present in the
2855     dictionary will be used as input to the ``Cache-Control`` response
2856     header.  For example: ``http_cache=(3600, {'public':True})`` means 'cache
2857     for an hour, and add ``public`` to the Cache-Control header of the
2858     response'.  All keys and values supported by the
2859     ``webob.cachecontrol.CacheControl`` interface may be added to the
2860     dictionary.  Supplying ``{'public':True}`` is equivalent to calling
2861     ``response.cache_control.public = True``.
2862
2863   Providing a non-tuple value as ``http_cache`` is equivalent to calling
2864   ``response.cache_expires(value)`` within your view's body.
2865
2866   Providing a two-tuple value as ``http_cache`` is equivalent to calling
2867   ``response.cache_expires(value[0], **value[1])`` within your view's body.
2868
2869   If you wish to avoid influencing, the ``Expires`` header, and instead wish
2870   to only influence ``Cache-Control`` headers, pass a tuple as ``http_cache``
2871   with the first element of ``None``, e.g.: ``(None, {'public':True})``.
2872
2873 Bug Fixes
2874 ---------
2875
2876 - Framework wrappers of the original view (such as http_cached and so on)
2877   relied on being able to trust that the response they were receiving was an
2878   IResponse.  It wasn't always, because the response was resolved by the
2879   router instead of early in the view wrapping process.  This has been fixed.
2880
2881 Documentation
2882 -------------
2883
2884 - Added a section in the "Webob" chapter named "Dealing With A JSON-Encoded
2885   Request Body" (usage of ``request.json_body``).
2886
2887 Behavior Changes
2888 ----------------
2889
2890 - The ``paster pshell``, ``paster proutes``, and ``paster pviews`` commands
2891   now take a single argument in the form ``/path/to/config.ini#sectionname``
2892   rather than the previous 2-argument spelling ``/path/to/config.ini
2893   sectionname``.  ``#sectionname`` may be omitted, in which case ``#main`` is
2894   assumed.
2895
2896 1.1a4 (2011-07-01)
2897 ==================
2898
2899 Bug Fixes
2900 ---------
2901
2902 - ``pyramid.testing.DummyRequest`` now raises deprecation warnings when
2903   attributes deprecated for ``pyramid.request.Request`` are accessed (like
2904   ``response_content_type``).  This is for the benefit of folks running unit
2905   tests which use DummyRequest instead of a "real" request, so they know
2906   things are deprecated without necessarily needing a functional test suite.
2907
2908 - The ``pyramid.events.subscriber`` directive behaved contrary to the
2909   documentation when passed more than one interface object to its
2910   constructor.  For example, when the following listener was registered::
2911
2912      @subscriber(IFoo, IBar)
2913      def expects_ifoo_events_and_ibar_events(event):
2914          print event
2915
2916   The Events chapter docs claimed that the listener would be registered and
2917   listening for both ``IFoo`` and ``IBar`` events.  Instead, it registered an
2918   "object event" subscriber which would only be called if an IObjectEvent was
2919   emitted where the object interface was ``IFoo`` and the event interface was
2920   ``IBar``.
2921
2922   The behavior now matches the documentation. If you were relying on the
2923   buggy behavior of the 1.0 ``subscriber`` directive in order to register an
2924   object event subscriber, you must now pass a sequence to indicate you'd
2925   like to register a subscriber for an object event. e.g.::
2926
2927      @subscriber([IFoo, IBar])
2928      def expects_object_event(object, event):
2929          print object, event
2930
2931 Features
2932 --------
2933
2934 - Add JSONP renderer (see "JSONP renderer" in the Renderers chapter of the
2935   documentation).
2936
2937 Deprecations
2938 ------------
2939
2940 - Deprecated the ``set_renderer_globals_factory`` method of the Configurator
2941   and the ``renderer_globals`` Configurator constructor parameter.
2942
2943 Documentation
2944 -------------
2945
2946 - The Wiki and Wiki2 tutorial "Tests" chapters each had two bugs: neither did
2947   told the user to depend on WebTest, and 2 tests failed in each as the
2948   result of changes to Pyramid itself.  These issues have been fixed.
2949
2950 - Move 1.0.X CHANGES.txt entries to HISTORY.txt.
2951
2952 1.1a3 (2011-06-26)
2953 ==================
2954
2955 Features
2956 --------
2957
2958 - Added ``mako.preprocessor`` config file parameter; allows for a Mako
2959   preprocessor to be specified as a Python callable or Python dotted name.
2960   See https://github.com/Pylons/pyramid/pull/183 for rationale.
2961
2962 Bug fixes
2963 ---------
2964
2965 - Pyramid would raise an AttributeError in the Configurator when attempting
2966   to set a ``__text__`` attribute on a custom predicate that was actually a
2967   classmethod.  See https://github.com/Pylons/pyramid/pull/217 .
2968
2969 - Accessing or setting deprecated response_* attrs on request
2970   (e.g. ``response_content_type``) now issues a deprecation warning at access
2971   time rather than at rendering time.
2972
2973 1.1a2 (2011-06-22)
2974 ==================
2975
2976 Bug Fixes
2977 ---------
2978
2979 - 1.1a1 broke Akhet by not providing a backwards compatibility import shim
2980   for ``pyramid.paster.PyramidTemplate``.  Now one has been added, although a
2981   deprecation warning is emitted when Akhet imports it.
2982
2983 - If multiple specs were provided in a single call to
2984   ``config.add_translation_dirs``, the directories were inserted into the
2985   beginning of the directory list in the wrong order: they were inserted in
2986   the reverse of the order they were provided in the ``*specs`` list (items
2987   later in the list were added before ones earlier in the list).  This is now
2988   fixed.
2989
2990 Backwards Incompatibilities
2991 ---------------------------
2992
2993 - The pyramid Router attempted to set a value into the key
2994   ``environ['repoze.bfg.message']`` when it caught a view-related exception
2995   for backwards compatibility with applications written for ``repoze.bfg``
2996   during error handling.  It did this by using code that looked like so::
2997
2998                     # "why" is an exception object
2999                     try: 
3000                         msg = why[0]
3001                     except:
3002                         msg = ''
3003
3004                     environ['repoze.bfg.message'] = msg
3005
3006   Use of the value ``environ['repoze.bfg.message']`` was docs-deprecated in
3007   Pyramid 1.0.  Our standing policy is to not remove features after a
3008   deprecation for two full major releases, so this code was originally slated
3009   to be removed in Pyramid 1.2.  However, computing the
3010   ``repoze.bfg.message`` value was the source of at least one bug found in
3011   the wild (https://github.com/Pylons/pyramid/issues/199), and there isn't a
3012   foolproof way to both preserve backwards compatibility and to fix the bug.
3013   Therefore, the code which sets the value has been removed in this release.
3014   Code in exception views which relies on this value's presence in the
3015   environment should now use the ``exception`` attribute of the request
3016   (e.g. ``request.exception[0]``) to retrieve the message instead of relying
3017   on ``request.environ['repoze.bfg.message']``.
3018
3019 1.1a1 (2011-06-20)
3020 ==================
3021
3022 Documentation
3023 -------------
3024
3025 - The term "template" used to refer to both "paster templates" and "rendered
3026   templates" (templates created by a rendering engine.  i.e. Mako, Chameleon,
3027   Jinja, etc.).  "Paster templates" will now be refered to as "scaffolds",
3028   whereas the name for "rendered templates" will remain as "templates."
3029
3030 - The ``wiki`` (ZODB+Traversal) tutorial was updated slightly.
3031
3032 - The ``wiki2`` (SQLA+URL Dispatch) tutorial was updated slightly.
3033
3034 - Make ``pyramid.interfaces.IAuthenticationPolicy`` and
3035   ``pyramid.interfaces.IAuthorizationPolicy`` public interfaces, and refer to
3036   them within the ``pyramid.authentication`` and ``pyramid.authorization``
3037   API docs.
3038
3039 - Render the function definitions for each exposed interface in
3040   ``pyramid.interfaces``.
3041
3042 - Add missing docs reference to
3043   ``pyramid.config.Configurator.set_view_mapper`` and refer to it within
3044   Hooks chapter section named "Using a View Mapper".
3045
3046 - Added section to the "Environment Variables and ``.ini`` File Settings"
3047   chapter in the narrative documentation section entitled "Adding a Custom
3048   Setting".
3049
3050 - Added documentation for a "multidict" (e.g. the API of ``request.POST``) as
3051   interface API documentation.
3052
3053 - Added a section to the "URL Dispatch" narrative chapter regarding the new
3054   "static" route feature.
3055
3056 - Added "What's New in Pyramid 1.1" to HTML rendering of documentation.
3057
3058 - Added API docs for ``pyramid.authentication.SessionAuthenticationPolicy``.
3059
3060 - Added API docs for ``pyramid.httpexceptions.exception_response``.
3061
3062 - Added "HTTP Exceptions" section to Views narrative chapter including a
3063   description of ``pyramid.httpexceptions.exception_response``.
3064
3065 Features
3066 --------
3067
3068 - Add support for language fallbacks: when trying to translate for a
3069   specific territory (such as ``en_GB``) fall back to translations
3070   for the language (ie ``en``). This brings the translation behaviour in line
3071   with GNU gettext and fixes partially translated texts when using C
3072   extensions.
3073
3074 - New authentication policy:
3075   ``pyramid.authentication.SessionAuthenticationPolicy``, which uses a session
3076   to store credentials.
3077
3078 - Accessing the ``response`` attribute of a ``pyramid.request.Request``
3079   object (e.g. ``request.response`` within a view) now produces a new
3080   ``pyramid.response.Response`` object.  This feature is meant to be used
3081   mainly when a view configured with a renderer needs to set response
3082   attributes: all renderers will use the Response object implied by
3083   ``request.response`` as the response object returned to the router.
3084
3085   ``request.response`` can also be used by code in a view that does not use a
3086   renderer, however the response object that is produced by
3087   ``request.response`` must be returned when a renderer is not in play (it is
3088   not a "global" response).
3089
3090 - Integers and longs passed as ``elements`` to ``pyramid.url.resource_url``
3091   or ``pyramid.request.Request.resource_url`` e.g. ``resource_url(context,
3092   request, 1, 2)`` (``1`` and ``2`` are the ``elements``) will now be
3093   converted implicitly to strings in the result.  Previously passing integers
3094   or longs as elements would cause a TypeError.
3095
3096 - ``pyramid_alchemy`` paster template now uses ``query.get`` rather than
3097   ``query.filter_by`` to take better advantage of identity map caching.
3098
3099 - ``pyramid_alchemy`` paster template now has unit tests.
3100
3101 - Added ``pyramid.i18n.make_localizer`` API (broken out from
3102   ``get_localizer`` guts).
3103
3104 - An exception raised by a NewRequest event subscriber can now be caught by
3105   an exception view.
3106
3107 - It is now possible to get information about why Pyramid raised a Forbidden
3108   exception from within an exception view.  The ``ACLDenied`` object returned
3109   by the ``permits`` method of each stock authorization policy
3110   (``pyramid.interfaces.IAuthorizationPolicy.permits``) is now attached to
3111   the Forbidden exception as its ``result`` attribute.  Therefore, if you've
3112   created a Forbidden exception view, you can see the ACE, ACL, permission,
3113   and principals involved in the request as
3114   eg. ``context.result.permission``, ``context.result.acl``, etc within the
3115   logic of the Forbidden exception view.
3116
3117 - Don't explicitly prevent the ``timeout`` from being lower than the
3118   ``reissue_time`` when setting up an ``AuthTktAuthenticationPolicy``
3119   (previously such a configuration would raise a ``ValueError``, now it's
3120   allowed, although typically nonsensical).  Allowing the nonsensical
3121   configuration made the code more understandable and required fewer tests.
3122
3123 - A new paster command named ``paster pviews`` was added.  This command
3124   prints a summary of potentially matching views for a given path.  See the
3125   section entitled "Displaying Matching Views for a Given URL" in the "View
3126   Configuration" chapter of the narrative documentation for more information.
3127
3128 - The ``add_route`` method of the Configurator now accepts a ``static``
3129   argument.  If this argument is ``True``, the added route will never be
3130   considered for matching when a request is handled.  Instead, it will only
3131   be useful for URL generation via ``route_url`` and ``route_path``.  See the
3132   section entitled "Static Routes" in the URL Dispatch narrative chapter for
3133   more information.
3134
3135 - A default exception view for the context
3136   ``pyramid.interfaces.IExceptionResponse`` is now registered by default.
3137   This means that an instance of any exception response class imported from
3138   ``pyramid.httpexceptions`` (such as ``HTTPFound``) can now be raised from
3139   within view code; when raised, this exception view will render the
3140   exception to a response.
3141
3142 - A function named ``pyramid.httpexceptions.exception_response`` is a
3143   shortcut that can be used to create HTTP exception response objects using
3144   an HTTP integer status code.
3145
3146 - The Configurator now accepts an additional keyword argument named
3147   ``exceptionresponse_view``.  By default, this argument is populated with a
3148   default exception view function that will be used when a response is raised
3149   as an exception. When ``None`` is passed for this value, an exception view
3150   for responses will not be registered.  Passing ``None`` returns the
3151   behavior of raising an HTTP exception to that of Pyramid 1.0 (the exception
3152   will propagate to middleware and to the WSGI server).
3153
3154 - The ``pyramid.request.Request`` class now has a ``ResponseClass`` interface
3155   which points at ``pyramid.response.Response``.
3156
3157 - The ``pyramid.response.Response`` class now has a ``RequestClass``
3158   interface which points at ``pyramid.request.Request``.
3159
3160 - It is now possible to return an arbitrary object from a Pyramid view
3161   callable even if a renderer is not used, as long as a suitable adapter to
3162   ``pyramid.interfaces.IResponse`` is registered for the type of the returned
3163   object by using the new
3164   ``pyramid.config.Configurator.add_response_adapter`` API.  See the section
3165   in the Hooks chapter of the documentation entitled "Changing How Pyramid
3166   Treats View Responses".
3167
3168 - The Pyramid router will now, by default, call the ``__call__`` method of
3169   WebOb response objects when returning a WSGI response.  This means that,
3170   among other things, the ``conditional_response`` feature of WebOb response
3171   objects will now behave properly.
3172
3173 - New method named ``pyramid.request.Request.is_response``.  This method
3174   should be used instead of the ``pyramid.view.is_response`` function, which
3175   has been deprecated.
3176
3177 Bug Fixes
3178 ---------
3179
3180 - URL pattern markers used in URL dispatch are permitted to specify a custom
3181   regex. For example, the pattern ``/{foo:\d+}`` means to match ``/12345``
3182   (foo==12345 in the match dictionary) but not ``/abc``. However, custom
3183   regexes in a pattern marker which used squiggly brackets did not work. For
3184   example, ``/{foo:\d{4}}`` would fail to match ``/1234`` and
3185   ``/{foo:\d{1,2}}`` would fail to match ``/1`` or ``/11``. One level of
3186   inner squiggly brackets is now recognized so that the prior two patterns
3187   given as examples now work. See also
3188   https://github.com/Pylons/pyramid/issues/#issue/123.
3189
3190 - Don't send port numbers along with domain information in cookies set by
3191   AuthTktCookieHelper (see https://github.com/Pylons/pyramid/issues/131).
3192
3193 - ``pyramid.url.route_path`` (and the shortcut
3194   ``pyramid.request.Request.route_url`` method) now include the WSGI
3195   SCRIPT_NAME at the front of the path if it is not empty (see
3196   https://github.com/Pylons/pyramid/issues/135).
3197
3198 - ``pyramid.testing.DummyRequest`` now has a ``script_name`` attribute (the
3199   empty string).
3200
3201 - Don't quote ``:@&+$,`` symbols in ``*elements`` passed to
3202   ``pyramid.url.route_url`` or ``pyramid.url.resource_url`` (see
3203   https://github.com/Pylons/pyramid/issues#issue/141).
3204
3205 - Include SCRIPT_NAME in redirects issued by
3206   ``pyramid.view.append_slash_notfound_view`` (see
3207   https://github.com/Pylons/pyramid/issues#issue/149).
3208
3209 - Static views registered with ``config.add_static_view`` which also included
3210   a ``permission`` keyword argument would not work as expected, because
3211   ``add_static_view`` also registered a route factory internally.  Because a
3212   route factory was registered internally, the context checked by the Pyramid
3213   permission machinery never had an ACL.  ``add_static_view`` no longer
3214   registers a route with a factory, so the default root factory will be used.
3215
3216 - ``config.add_static_view`` now passes extra keyword arguments it receives
3217   to ``config.add_route`` (calling add_static_view is mostly logically
3218   equivalent to adding a view of the type ``pyramid.static.static_view``
3219   hooked up to a route with a subpath).  This makes it possible to pass e.g.,
3220   ``factory=`` to ``add_static_view`` to protect a particular static view
3221   with a custom ACL.
3222
3223 - ``testing.DummyRequest`` used the wrong registry (the global registry) as
3224   ``self.registry`` if a dummy request was created *before* ``testing.setUp``
3225   was executed (``testing.setUp`` pushes a local registry onto the
3226   threadlocal stack). Fixed by implementing ``registry`` as a property for
3227   DummyRequest instead of eagerly assigning an attribute.
3228   See also https://github.com/Pylons/pyramid/issues/165
3229
3230 - When visiting a URL that represented a static view which resolved to a
3231   subdirectory, the ``index.html`` of that subdirectory would not be served
3232   properly.  Instead, a redirect to ``/subdir`` would be issued.  This has
3233   been fixed, and now visiting a subdirectory that contains an ``index.html``
3234   within a static view returns the index.html properly.  See also
3235   https://github.com/Pylons/pyramid/issues/67.
3236
3237 - Redirects issued by a static view did not take into account any existing
3238   ``SCRIPT_NAME`` (such as one set by a url mapping composite).  Now they do.
3239
3240 - The ``pyramid.wsgi.wsgiapp2`` decorator did not take into account the
3241   ``SCRIPT_NAME`` in the origin request.
3242
3243 - The ``pyramid.wsgi.wsgiapp2`` decorator effectively only worked when it
3244   decorated a view found via traversal; it ignored the ``PATH_INFO`` that was
3245   part of a url-dispatch-matched view.
3246
3247 Deprecations
3248 ------------
3249
3250 - Deprecated all assignments to ``request.response_*`` attributes (for
3251   example ``request.response_content_type = 'foo'`` is now deprecated).
3252   Assignments and mutations of assignable request attributes that were
3253   considered by the framework for response influence are now deprecated:
3254   ``response_content_type``, ``response_headerlist``, ``response_status``,
3255   ``response_charset``, and ``response_cache_for``.  Instead of assigning
3256   these to the request object for later detection by the rendering machinery,
3257   users should use the appropriate API of the Response object created by
3258   accessing ``request.response`` (e.g. code which does
3259   ``request.response_content_type = 'abc'`` should be changed to
3260   ``request.response.content_type = 'abc'``).
3261
3262 - Passing view-related parameters to
3263   ``pyramid.config.Configurator.add_route`` is now deprecated.  Previously, a
3264   view was permitted to be connected to a route using a set of ``view*``
3265   parameters passed to the ``add_route`` method of the Configurator.  This
3266   was a shorthand which replaced the need to perform a subsequent call to
3267   ``add_view``. For example, it was valid (and often recommended) to do::
3268
3269      config.add_route('home', '/', view='mypackage.views.myview',
3270                        view_renderer='some/renderer.pt')
3271
3272   Passing ``view*`` arguments to ``add_route`` is now deprecated in favor of
3273   connecting a view to a predefined route via ``Configurator.add_view`` using
3274   the route's ``route_name`` parameter.  As a result, the above example
3275   should now be spelled::
3276
3277      config.add_route('home', '/')
3278      config.add_view('mypackage.views.myview', route_name='home')
3279                      renderer='some/renderer.pt')
3280
3281   This deprecation was done to reduce confusion observed in IRC, as well as
3282   to (eventually) reduce documentation burden (see also
3283   https://github.com/Pylons/pyramid/issues/164).  A deprecation warning is
3284   now issued when any view-related parameter is passed to
3285   ``Configurator.add_route``.
3286
3287 - Passing an ``environ`` dictionary to the ``__call__`` method of a
3288   "traverser" (e.g. an object that implements
3289   ``pyramid.interfaces.ITraverser`` such as an instance of
3290   ``pyramid.traversal.ResourceTreeTraverser``) as its ``request`` argument
3291   now causes a deprecation warning to be emitted.  Consumer code should pass a
3292   ``request`` object instead.  The fact that passing an environ dict is
3293   permitted has been documentation-deprecated since ``repoze.bfg`` 1.1, and
3294   this capability will be removed entirely in a future version.
3295
3296 - The following (undocumented, dictionary-like) methods of the
3297   ``pyramid.request.Request`` object have been deprecated: ``__contains__``,
3298   ``__delitem__``, ``__getitem__``, ``__iter__``, ``__setitem__``, ``get``,
3299   ``has_key``, ``items``, ``iteritems``, ``itervalues``, ``keys``, ``pop``,
3300   ``popitem``, ``setdefault``, ``update``, and ``values``.  Usage of any of
3301   these methods will cause a deprecation warning to be emitted.  These
3302   methods were added for internal compatibility in ``repoze.bfg`` 1.1 (code
3303   that currently expects a request object expected an environ object in BFG
3304   1.0 and before).  In a future version, these methods will be removed
3305   entirely.
3306
3307 - Deprecated ``pyramid.view.is_response`` function in favor of (newly-added)
3308   ``pyramid.request.Request.is_response`` method.  Determining if an object
3309   is truly a valid response object now requires access to the registry, which
3310   is only easily available as a request attribute.  The
3311   ``pyramid.view.is_response`` function will still work until it is removed,
3312   but now may return an incorrect answer under some (very uncommon)
3313   circumstances.
3314
3315 Behavior Changes
3316 ----------------
3317
3318 - The default Mako renderer is now configured to escape all HTML in
3319   expression tags. This is intended to help prevent XSS attacks caused by
3320   rendering unsanitized input from users. To revert this behavior in user's
3321   templates, they need to filter the expression through the 'n' filter.
3322   For example, ${ myhtml | n }.
3323   See https://github.com/Pylons/pyramid/issues/193.
3324
3325 - A custom request factory is now required to return a request object that
3326   has a ``response`` attribute (or "reified"/lazy property) if they the
3327   request is meant to be used in a view that uses a renderer.  This
3328   ``response`` attribute should be an instance of the class
3329   ``pyramid.response.Response``.
3330
3331 - The JSON and string renderer factories now assign to
3332   ``request.response.content_type`` rather than
3333   ``request.response_content_type``.
3334
3335 - Each built-in renderer factory now determines whether it should change the
3336   content type of the response by comparing the response's content type
3337   against the response's default content type; if the content type is the
3338   default content type (usually ``text/html``), the renderer changes the
3339   content type (to ``application/json`` or ``text/plain`` for JSON and string
3340   renderers respectively).
3341
3342 - The ``pyramid.wsgi.wsgiapp2`` now uses a slightly different method of
3343   figuring out how to "fix" ``SCRIPT_NAME`` and ``PATH_INFO`` for the
3344   downstream application.  As a result, those values may differ slightly from
3345   the perspective of the downstream application (for example, ``SCRIPT_NAME``
3346   will now never possess a trailing slash).
3347
3348 - Previously, ``pyramid.request.Request`` inherited from
3349   ``webob.request.Request`` and implemented ``__getattr__``, ``__setattr__``
3350   and ``__delattr__`` itself in order to overidde "adhoc attr" WebOb behavior
3351   where attributes of the request are stored in the environ.  Now,
3352   ``pyramid.request.Request`` object inherits from (the more recent)
3353   ``webob.request.BaseRequest`` instead of ``webob.request.Request``, which
3354   provides the same behavior.  ``pyramid.request.Request`` no longer
3355   implements its own ``__getattr__``, ``__setattr__`` or ``__delattr__`` as a
3356   result.
3357
3358 - ``pyramid.response.Response`` is now a *subclass* of
3359   ``webob.response.Response`` (in order to directly implement the
3360   ``pyramid.interfaces.IResponse`` interface).
3361
3362 - The "exception response" objects importable from ``pyramid.httpexceptions``
3363   (e.g. ``HTTPNotFound``) are no longer just import aliases for classes that
3364   actually live in ``webob.exc``.  Instead, we've defined our own exception
3365   classes within the module that mirror and emulate the ``webob.exc``
3366   exception response objects almost entirely.  See the "Design Defense" doc
3367   section named "Pyramid Uses its Own HTTP Exception Classes" for more
3368   information.
3369
3370 Backwards Incompatibilities
3371 ---------------------------
3372
3373 - Pyramid no longer supports Python 2.4.  Python 2.5 or better is required to
3374   run Pyramid 1.1+.
3375
3376 - The Pyramid router now, by default, expects response objects returned from
3377   view callables to implement the ``pyramid.interfaces.IResponse`` interface.
3378   Unlike the Pyramid 1.0 version of this interface, objects which implement
3379   IResponse now must define a ``__call__`` method that accepts ``environ``
3380   and ``start_response``, and which returns an ``app_iter`` iterable, among
3381   other things.  Previously, it was possible to return any object which had
3382   the three WebOb ``app_iter``, ``headerlist``, and ``status`` attributes as
3383   a response, so this is a backwards incompatibility.  It is possible to get
3384   backwards compatibility back by registering an adapter to IResponse from
3385   the type of object you're now returning from view callables.  See the
3386   section in the Hooks chapter of the documentation entitled "Changing How
3387   Pyramid Treats View Responses".
3388
3389 - The ``pyramid.interfaces.IResponse`` interface is now much more extensive.
3390   Previously it defined only ``app_iter``, ``status`` and ``headerlist``; now
3391   it is basically intended to directly mirror the ``webob.Response`` API,
3392   which has many methods and attributes.
3393
3394 - The ``pyramid.httpexceptions`` classes named ``HTTPFound``,
3395   ``HTTPMultipleChoices``, ``HTTPMovedPermanently``, ``HTTPSeeOther``,
3396   ``HTTPUseProxy``, and ``HTTPTemporaryRedirect`` now accept ``location`` as
3397   their first positional argument rather than ``detail``.  This means that
3398   you can do, e.g. ``return pyramid.httpexceptions.HTTPFound('http://foo')``
3399   rather than ``return
3400   pyramid.httpexceptions.HTTPFound(location='http//foo')`` (the latter will
3401   of course continue to work).
3402
3403 Dependencies
3404 ------------
3405
3406 - Pyramid now depends on WebOb >= 1.0.2 as tests depend on the bugfix in that
3407   release: "Fix handling of WSGI environs with missing ``SCRIPT_NAME``".
3408   (Note that in reality, everyone should probably be using 1.0.4 or better
3409   though, as WebOb 1.0.2 and 1.0.3 were effectively brownbag releases.)
3410
e21ed8 3411 1.0 (2011-01-30)
CM 3412 ================
3413
3414 Documentation
3415 -------------
3416
3417 - Fixed bug in ZODB Wiki tutorial (missing dependency on ``docutils`` in
3418   "models" step within ``setup.py``).
3419
3420 - Removed API documentation for ``pyramid.testing`` APIs named
3421   ``registerDummySecurityPolicy``, ``registerResources``, ``registerModels``,
3422   ``registerEventListener``, ``registerTemplateRenderer``,
3423   ``registerDummyRenderer``, ``registerView``, ``registerUtility``,
3424   ``registerAdapter``, ``registerSubscriber``, ``registerRoute``,
3425   and ``registerSettings``.
3426
3427 - Moved "Using ZODB With ZEO" and "Using repoze.catalog Within Pyramid"
3428   tutorials out of core documentation and into the Pyramid Tutorials site
cd8ac8 3429   (http://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/).
e21ed8 3430
CM 3431 - Changed "Cleaning up After a Request" section in the URL Dispatch chapter
3432   to use ``request.add_finished_callback`` instead of jamming an object with
3433   a ``__del__`` into the WSGI environment.
3434
3435 - Remove duplication of ``add_route`` API documentation from URL Dispatch
3436   narrative chapter.
3437
3438 - Remove duplication of API and narrative documentation in
3439   ``pyramid.view.view_config`` API docs by pointing to
3440   ``pyramid.config.add_view`` documentation and narrative chapter
3441   documentation.
3442
3443 - Removed some API documentation duplicated in narrative portions of
3444   documentation 
3445
3446 - Removed "Overall Flow of Authentication" from SQLAlchemy + URL Dispatch
3447   wiki tutorial due to print space concerns (moved to Pyramid Tutorials
3448   site).
3449
3450 Bug Fixes
3451 ---------
3452
3453 - Deprecated-since-BFG-1.2 APIs from ``pyramid.testing`` now properly emit
3454   deprecation warnings.
3455
3456 - Added ``egg:repoze.retry#retry`` middleware to the WSGI pipeline in ZODB
3457   templates (retry ZODB conflict errors which occur in normal operations).
3458
3459 - Removed duplicate implementations of ``is_response``.  Two competing
3460   implementations existed: one in ``pyramid.config`` and one in
3461   ``pyramid.view``.  Now the one defined in ``pyramid.view`` is used
3462   internally by ``pyramid.config`` and continues to be advertised as an API.
3463
3464 1.0b3 (2011-01-28)
3465 ==================
3466
3467 Bug Fixes
3468 ---------
3469
3470 - Use &copy; instead of copyright symbol in paster templates / tutorial
3471   templates for the benefit of folks who cutnpaste and save to a non-UTF8
3472   format.
3473
3474 - ``pyramid.view.append_slash_notfound_view`` now preserves GET query
3475   parameters across redirects.
3476
3477 Documentation
3478 -------------
3479
3480 - Beef up documentation related to ``set_default_permission``: explicitly
3481   mention that default permissions also protect exception views.
3482
3483 - Paster templates and tutorials now use spaces instead of tabs in their HTML
3484   templates.
3485
3486 1.0b2 (2011-01-24)
3487 ==================
3488
3489 Bug Fixes
3490 ---------
3491
3492 - The ``production.ini`` generated by all paster templates now have an
3493   effective logging level of WARN, which prevents e.g. SQLAlchemy statement
3494   logging and other inappropriate output.
3495
3496 - The ``production.ini`` of the ``pyramid_routesalchemy`` and
3497   ``pyramid_alchemy`` paster templates did not have a ``sqlalchemy`` logger
3498   section, preventing ``paster serve production.ini`` from working.
3499
3500 - The ``pyramid_routesalchemy`` and ``pyramid_alchemy`` paster templates used
3501   the ``{{package}}`` variable in a place where it should have used the
3502   ``{{project}}`` variable, causing applications created with uppercase
3503   letters e.g. ``paster create -t pyramid_routesalchemy Dibbus`` to fail to
3504   start when ``paster serve development.ini`` was used against the result.
3505   See https://github.com/Pylons/pyramid/issues/#issue/107
3506
3507 - The ``render_view`` method of ``pyramid.renderers.RendererHelper`` passed
3508   an incorrect value into the renderer for ``renderer_info``.  It now passes
3509   an instance of ``RendererHelper`` instead of a dictionary, which is
3510   consistent with other usages.  See
3511   https://github.com/Pylons/pyramid/issues#issue/106
3512
3513 - A bug existed in the ``pyramid.authentication.AuthTktCookieHelper`` which
3514   would break any usage of an AuthTktAuthenticationPolicy when one was
3515   configured to reissue its tokens (``reissue_time`` < ``timeout`` /
3516   ``max_age``). Symptom: ``ValueError: ('Invalid token %r', '')``.  See
3517   https://github.com/Pylons/pyramid/issues#issue/108.
3518
3519 1.0b1 (2011-01-21)
3520 ==================
3521
3522 Features
3523 --------
3524
3525 - The AuthTktAuthenticationPolicy now accepts a ``tokens`` parameter via
3526   ``pyramid.security.remember``.  The value must be a sequence of strings.
3527   Tokens are placed into the auth_tkt "tokens" field and returned in the
3528   auth_tkt cookie.
3529
3530 - Add ``wild_domain`` argument to AuthTktAuthenticationPolicy, which defaults
3531   to ``True``.  If it is set to ``False``, the feature of the policy which
b4cd53 3532   sets a cookie with a wildcard domain will be turned off.
e21ed8 3533
CM 3534 - Add a ``MANIFEST.in`` file to each paster template. See
3535   https://github.com/Pylons/pyramid/issues#issue/95
3536
3537 Bug Fixes
3538 ---------
3539
3540 - ``testing.setUp`` now adds a ``settings`` attribute to the registry (both
3541   when it's passed a registry without any settings and when it creates one).
3542
3543 - The ``testing.setUp`` function now takes a ``settings`` argument, which
3544   should be a dictionary.  Its values will subsequently be available on the
3545   returned ``config`` object as ``config.registry.settings``.
3546
3547 Documentation
3548 -------------
3549
3550 - Added "What's New in Pyramid 1.0" chapter to HTML rendering of
3551   documentation.
3552
3553 - Merged caseman-master narrative editing branch, many wording fixes and
3554   extensions.
3555
3556 - Fix deprecated example showing ``chameleon_zpt`` API call in testing
3557   narrative chapter.
3558
3559 - Added "Adding Methods to the Configurator via ``add_directive``" section to
3560   Advanced Configuration narrative chapter.
3561
3562 - Add docs for ``add_finished_callback``, ``add_response_callback``,
3563   ``route_path``, ``route_url``, and ``static_url`` methods to
3564   ``pyramid.request.Request`` API docs.
3565
3566 - Add (minimal) documentation about using I18N within Mako templates to
3567   "Internationalization and Localization" narrative chapter.
3568
3569 - Move content of "Forms" chapter back to "Views" chapter; I can't think of a
3570   better place to put it.
3571
3572 - Slightly improved interface docs for ``IAuthorizationPolicy``.
3573
3574 - Minimally explain usage of custom regular expressions in URL dispatch
3575   replacement markers within URL Dispatch chapter.
3576
3577 Deprecations
3578 -------------
3579
3580 - Using the ``pyramid.view.bfg_view`` alias for ``pyramid.view.view_config``
3581   (a backwards compatibility shim) now issues a deprecation warning.
3582
3583 Backwards Incompatibilities
3584 ---------------------------
3585
3586 - Using ``testing.setUp`` now registers an ISettings utility as a side
3587   effect.  Some test code which queries for this utility after
3588   ``testing.setUp`` via queryAdapter will expect a return value of ``None``.
3589   This code will need to be changed.
3590
3591 - When a ``pyramid.exceptions.Forbidden`` error is raised, its status code
3592   now ``403 Forbidden``.  It was previously ``401 Unauthorized``, for
3593   backwards compatibility purposes with ``repoze.bfg``.  This change will
3594   cause problems for users of Pyramid with ``repoze.who``, which intercepts
3595   ``401 Unauthorized`` by default, but allows ``403 Forbidden`` to pass
3596   through.  Those deployments will need to configure ``repoze.who`` to also
3597   react to ``403 Forbidden``.
3598
3599 - The default value for the ``cookie_on_exception`` parameter to
3600   ``pyramid.session.UnencyrptedCookieSessionFactory`` is now ``True``.  This
3601   means that when view code causes an exception to be raised, and the session
3602   has been mutated, a cookie will be sent back in the response.  Previously
3603   its default value was ``False``.
3604
3605 Paster Templates
3606 ----------------
3607
3608 - The ``pyramid_zodb``, ``pyramid_routesalchemy`` and ``pyramid_alchemy``
3609   paster templates now use a default "commit veto" hook when configuring the
3610   ``repoze.tm2`` transaction manager in ``development.ini``.  This prevents a
3611   transaction from being committed when the response status code is within
3612   the 400 or 500 ranges.  See also
3613   http://docs.repoze.org/tm2/#using-a-commit-veto.
3614
3615 1.0a10 (2011-01-18)
3616 ===================
3617
3618 Bug Fixes
3619 ---------
3620
3621 - URL dispatch now properly handles a ``.*`` or ``*`` appearing in a regex
3622   match when used inside brackets.  Resolves issue #90.
3623
3624 Backwards Incompatibilities
3625 ---------------------------
3626
3627 - The ``add_handler`` method of a Configurator has been removed from the
3628   Pyramid core.  Handlers are now a feature of the ``pyramid_handlers``
3629   package, which can be downloaded from PyPI.  Documentation for the package
3630   should be available via
cd8ac8 3631   http://docs.pylonsproject.org/projects/pyramid_handlers/en/latest/,
TL 3632   which describes how
e21ed8 3633   to add a configuration statement to your ``main`` block to reobtain this
CM 3634   method.  You will also need to add an ``install_requires`` dependency upon
3635   ``pyramid_handlers`` to your ``setup.py`` file.
3636
3637 - The ``load_zcml`` method of a Configurator has been removed from the
3638   Pyramid core.  Loading ZCML is now a feature of the ``pyramid_zcml``
3639   package, which can be downloaded from PyPI.  Documentation for the package
3640   should be available via
cd8ac8 3641   http://docs.pylonsproject.org/projects/pyramid_zcml/en/latest/,
TL 3642   which describes how
e21ed8 3643   to add a configuration statement to your ``main`` block to reobtain this
CM 3644   method.  You will also need to add an ``install_requires`` dependency upon
3645   ``pyramid_zcml`` to your ``setup.py`` file.
3646
3647 - The ``pyramid.includes`` subpackage has been removed.  ZCML files which use
3648   include the package ``pyramid.includes`` (e.g. ``<include
3649   package="pyramid.includes"/>``) now must include the ``pyramid_zcml``
3650   package instead (e.g. ``<include package="pyramid_zcml"/>``).
3651
3652 - The ``pyramid.view.action`` decorator has been removed from the Pyramid
3653   core.  Handlers are now a feature of the ``pyramid_handlers`` package.  It
3654   should now be imported from ``pyramid_handlers`` e.g. ``from
3655   pyramid_handlers import action``.
3656
3657 - The ``handler`` ZCML directive has been removed.  It is now a feature of
3658   the ``pyramid_handlers`` package.
3659
3660 - The ``pylons_minimal``, ``pylons_basic`` and ``pylons_sqla`` paster
3661   templates were removed.  Use ``pyramid_sqla`` (available from PyPI) as a
3662   generic replacement for Pylons-esque development.
3663
3664 - The ``make_app`` function has been removed from the ``pyramid.router``
3665   module.  It continues life within the ``pyramid_zcml`` package.  This
3666   leaves the ``pyramid.router`` module without any API functions.
3667
3668 - The ``configure_zcml`` setting within the deployment settings (within
3669   ``**settings`` passed to a Pyramid ``main`` function) has ceased to have any
3670   meaning.
3671
3672 Features
3673 --------
3674
3675 - ``pyramid.testing.setUp`` and ``pyramid.testing.tearDown`` have been
3676   undeprecated.  They are now the canonical setup and teardown APIs for test
3677   configuration, replacing "direct" creation of a Configurator.  This is a
3678   change designed to provide a facade that will protect against any future
3679   Configurator deprecations.
3680
3681 - Add ``charset`` attribute to ``pyramid.testing.DummyRequest``
3682   (unconditionally ``UTF-8``).
3683
3684 - Add ``add_directive`` method to configurator, which allows framework
3685   extenders to add methods to the configurator (ala ZCML directives).
3686
3687 - When ``Configurator.include`` is passed a *module* as an argument, it
3688   defaults to attempting to find and use a callable named ``includeme``
3689   within that module.  This makes it possible to use
3690   ``config.include('some.module')`` rather than
3691   ``config.include('some.module.somefunc')`` as long as the include function
3692   within ``some.module`` is named ``includeme``.
3693
3694 - The ``bfg2pyramid`` script now converts ZCML include tags that have
3695   ``repoze.bfg.includes`` as a package attribute to the value
3696   ``pyramid_zcml``.  For example, ``<include package="repoze.bfg.includes">``
3697   will be converted to ``<include package="pyramid_zcml">``.
3698
3699 Paster Templates
3700 ----------------
3701
3702 - All paster templates now use ``pyramid.testing.setUp`` and
3703   ``pyramid.testing.tearDown`` rather than creating a Configurator "by hand"
3704   within their ``tests.py`` module, as per decision in features above.
3705
3706 - The ``starter_zcml`` paster template has been moved to the ``pyramid_zcml``
3707   package.
3708
3709 Documentation
3710 -------------
3711
3712 - The wiki and wiki2 tutorials now use ``pyramid.testing.setUp`` and
3713   ``pyramid.testing.tearDown`` rather than creating a Configurator "by hand",
3714   as per decision in features above.
3715
3716 - The "Testing" narrative chapter now explains ``pyramid.testing.setUp`` and
3717   ``pyramid.testing.tearDown`` instead of Configurator creation and
3718   ``Configurator.begin()`` and ``Configurator.end()``.
3719
3720 - Document the ``request.override_renderer`` attribute within the narrative
3721   "Renderers" chapter in a section named "Overriding A Renderer at Runtime".
3722
3723 - The "Declarative Configuration" narrative chapter has been removed (it was
3724   moved to the ``pyramid_zcml`` package).
3725
3726 - Most references to ZCML in narrative chapters have been removed or
3727   redirected to ``pyramid_zcml`` locations.
3728
3729 Deprecations
3730 ------------
3731
3732 - Deprecation warnings related to import of the following API functions were
3733   added: ``pyramid.traversal.find_model``, ``pyramid.traversal.model_path``,
3734   ``pyramid.traversal.model_path_tuple``, ``pyramid.url.model_url``.  The
3735   instructions emitted by the deprecation warnings instruct the developer to
3736   change these method spellings to their ``resource`` equivalents.  This is a
3737   consequence of the mass concept rename of "model" to "resource" performed
3738   in 1.0a7.
3739
3740 1.0a9 (2011-01-08)
3741 ==================
3742
3743 Bug Fixes
3744 ---------
3745
3746 - The ``proutes`` command tried too hard to resolve the view for printing,
3747   resulting in exceptions when an exceptional root factory was encountered.
3748   Instead of trying to resolve the view, if it cannot, it will now just print
3749   ``<unknown>``.
3750
3751 - The `self` argument was included in new methods of the ``ISession`` interface
3752   signature, causing ``pyramid_beaker`` tests to fail.
3753
3754 - Readd ``pyramid.traversal.model_path_tuple`` as an alias for
3755   ``pyramid.traversal.resource_path_tuple`` for backwards compatibility.
3756
3757 Features
3758 --------
3759
3760 - Add a new API ``pyramid.url.current_route_url``, which computes a URL based
3761   on the "current" route (if any) and its matchdict values.
3762
3763 - ``config.add_view`` now accepts a ``decorator`` keyword argument, a callable
3764   which will decorate the view callable before it is added to the registry.
3765
3766 - If a handler class provides an ``__action_decorator__`` attribute (usually
3767   a classmethod or staticmethod), use that as the decorator for each view
3768   registration for that handler.
3769
3770 - The ``pyramid.interfaces.IAuthenticationPolicy`` interface now specifies an
3771   ``unauthenticated_userid`` method.  This method supports an important
3772   optimization required by people who are using persistent storages which do
3773   not support object caching and whom want to create a "user object" as a
3774   request attribute.
3775
3776 - A new API has been added to the ``pyramid.security`` module named
3777   ``unauthenticated_userid``.  This API function calls the
3778   ``unauthenticated_userid`` method of the effective security policy.
3779
3780 - An ``unauthenticated_userid`` method has been added to the dummy
3781   authentication policy returned by
3782   ``pyramid.config.Configurator.testing_securitypolicy``.  It returns the
3783   same thing as that the dummy authentication policy's
3784   ``authenticated_userid`` method.
3785
3786 - The class ``pyramid.authentication.AuthTktCookieHelper`` is now an API.
3787   This class can be used by third-party authentication policy developers to
3788   help in the mechanics of authentication cookie-setting.
3789
3790 - New constructor argument to Configurator: ``default_view_mapper``.  Useful
3791   to create systems that have alternate view calling conventions.  A view
3792   mapper allows objects that are meant to be used as view callables to have
3793   an arbitrary argument list and an arbitrary result.  The object passed as
3794   ``default_view_mapper`` should implement the
3795   ``pyramid.interfaces.IViewMapperFactory`` interface.
3796
3797 - add a ``set_view_mapper`` API to Configurator.  Has
3798   the same result as passing ``default_view_mapper`` to the Configurator
3799   constructor.
3800
3801 - ``config.add_view`` now accepts a ``mapper`` keyword argument, which should
3802   either be ``None``, a string representing a Python dotted name, or an
3803   object which is an ``IViewMapperFactory``.  This feature is not useful for
3804   "civilians", only for extension writers.
3805
3806 - Allow static renderer provided during view registration to be overridden at
3807   request time via a request attribute named ``override_renderer``, which
3808   should be the name of a previously registered renderer.  Useful to provide
3809   "omnipresent" RPC using existing rendered views.
3810
3811 - Instances of ``pyramid.testing.DummyRequest`` now have a ``session``
3812   object, which is mostly a dictionary, but also implements the other session
3813   API methods for flash and CSRF.
3814
3815 Backwards Incompatibilities
3816 ---------------------------
3817
3818 - Since the ``pyramid.interfaces.IAuthenticationPolicy`` interface now
3819   specifies that a policy implementation must implement an
3820   ``unauthenticated_userid`` method, all third-party custom authentication
3821   policies now must implement this method.  It, however, will only be called
3822   when the global function named ``pyramid.security.unauthenticated_userid``
3823   is invoked, so if you're not invoking that, you will not notice any issues.
3824
3825 - ``pyramid.interfaces.ISession.get_csrf_token`` now mandates that an
3826   implementation should return a *new* token if one doesn't already exist in
3827   the session (previously it would return None).  The internal sessioning
3828   implementation has been changed.
3829
3830 Documentation
3831 -------------
3832
3833 - The (weak) "Converting a CMF Application to Pyramid" tutorial has been
3834   removed from the tutorials section.  It was moved to the
3835   ``pyramid_tutorials`` Github repository.
3836
3837 - The "Resource Location and View Lookup" chapter has been replaced with a
3838   variant of Rob Miller's "Much Ado About Traversal" (originally published at
3839   http://blog.nonsequitarian.org/2010/much-ado-about-traversal/).
3840
3841 - Many minor wording tweaks and refactorings (merged Casey Duncan's docs
3842   fork, in which he is working on general editing).
3843
3844 - Added (weak) description of new view mapper feature to Hooks narrative
3845   chapter.
3846
3847 - Split views chapter into 2: View Callables and View Configuration.
3848
3849 - Reorder Renderers and Templates chapters after View Callables but before
3850   View Configuration.
3851
3852 - Merge Session Objects, Cross-Site Request Forgery, and Flash Messaging
3853   chapter into a single Sessions chapter.
3854
3855 - The Wiki and Wiki2 tutorials now have much nicer CSS and graphics.
3856
3857 Internals
3858 ---------
3859
3860 - The "view derivation" code is now factored into a set of classes rather
3861   than a large number of standalone functions (a side effect of the
3862   view mapper refactoring).
3863
3864 - The ``pyramid.renderer.RendererHelper`` class has grown a ``render_view``
3865   method, which is used by the default view mapper (a side effect of the
3866   view mapper refactoring).
3867
3868 - The object passed as ``renderer`` to the "view deriver" is now an instance
3869   of ``pyramid.renderers.RendererHelper`` rather than a dictionary (a side
3870   effect of view mapper refactoring).
3871
3872 - The class used as the "page template" in ``pyramid.chameleon_text`` was
3873   removed, in preference to using a Chameleon-inbuilt version.
3874
3875 - A view callable wrapper registered in the registry now contains an
3876   ``__original_view__`` attribute which references the original view callable
3877   (or class).
3878
3879 - The (non-API) method of all internal authentication policy implementations
3880   previously named ``_get_userid`` is now named ``unauthenticated_userid``,
3881   promoted to an API method.  If you were overriding this method, you'll now
3882   need to override it as ``unauthenticated_userid`` instead.
3883
3884 - Remove (non-API) function of config.py named _map_view.
3885
3886 1.0a8 (2010-12-27)
3887 ==================
3888
3889 Bug Fixes
3890 ---------
3891
3892 - The name ``registry`` was not available in the ``paster pshell``
3893   environment under IPython.
3894
3895 Features
3896 --------
3897
3898 - If a resource implements a ``__resource_url__`` method, it will be called
3899   as the result of invoking the ``pyramid.url.resource_url`` function to
3900   generate a URL, overriding the default logic.  See the new "Generating The
3901   URL Of A Resource" section within the Resources narrative chapter.
3902
3903 - Added flash messaging, as described in the "Flash Messaging" narrative
3904   documentation chapter.
3905
3906 - Added CSRF token generation, as described in the narrative chapter entitled
3907   "Preventing Cross-Site Request Forgery Attacks".
3908
3909 - Prevent misunderstanding of how the ``view`` and ``view_permission``
3910   arguments to add_route work by raising an exception during configuration if
3911   view-related arguments exist but no ``view`` argument is passed.
3912
3913 - Add ``paster proute`` command which displays a summary of the routing
3914   table.  See the narrative documentation section within the "URL Dispatch"
3915   chapter entitled "Displaying All Application Routes".
3916
3917 Paster Templates
3918 ----------------
3919
3920 - The ``pyramid_zodb`` Paster template no longer employs ZCML.  Instead, it
3921   is based on scanning.
3922
3923 Documentation
3924 -------------
3925
3926 - Added "Generating The URL Of A Resource" section to the Resources narrative
3927   chapter (includes information about overriding URL generation using
3928   ``__resource_url__``).
3929
3930 - Added "Generating the Path To a Resource" section to the Resources
3931   narrative chapter.
3932
3933 - Added "Finding a Resource by Path" section to the Resources narrative
3934   chapter.
3935
3936 - Added "Obtaining the Lineage of a Resource" to the Resources narrative
3937   chapter.
3938
3939 - Added "Determining if a Resource is In The Lineage of Another Resource" to
3940   Resources narrative chapter.
3941
3942 - Added "Finding the Root Resource" to Resources narrative chapter.
3943
3944 - Added "Finding a Resource With a Class or Interface in Lineage" to
3945   Resources narrative chapter.
3946
3947 - Added a "Flash Messaging" narrative documentation chapter.
3948
3949 - Added a narrative chapter entitled "Preventing Cross-Site Request Forgery
3950   Attacks".
3951
3952 - Changed the "ZODB + Traversal Wiki Tutorial" based on changes to
3953   ``pyramid_zodb`` Paster template.
3954
3955 - Added "Advanced Configuration" narrative chapter which documents how to
3956   deal with configuration conflicts, two-phase configuration, ``include`` and
3957   ``commit``.
3958
3959 - Fix API documentation rendering for ``pyramid.view.static``
3960
3961 - Add "Pyramid Provides More Than One Way to Do It" to Design Defense
3962   documentation.
3963
3964 - Changed "Static Assets" narrative chapter: clarify that ``name`` represents
3965   a prefix unless it's a URL, added an example of a root-relative static view
3966   fallback for URL dispatch, added an example of creating a simple view that
3967   returns the body of a file.
3968
3969 - Move ZCML usage in Hooks chapter to Declarative Configuration chapter.
3970
3971 - Merge "Static Assets" chapter into the "Assets" chapter.
3972
3973 - Added narrative documentation section within the "URL Dispatch" chapter
3974   entitled "Displaying All Application Routes" (for ``paster proutes``
3975   command).
3976
3977 1.0a7 (2010-12-20)
3978 ==================
3979
3980 Terminology Changes
3981 -------------------
3982
3983 - The Pyramid concept previously known as "model" is now known as "resource".
3984   As a result:
3985
3986   - The following API changes have been made::
3987
3988       pyramid.url.model_url -> 
3989                         pyramid.url.resource_url
3990
3991       pyramid.traversal.find_model -> 
3992                         pyramid.url.find_resource
3993
3994       pyramid.traversal.model_path ->
3995                         pyramid.traversal.resource_path
3996
3997       pyramid.traversal.model_path_tuple ->
3998                         pyramid.traversal.resource_path_tuple
3999
4000       pyramid.traversal.ModelGraphTraverser -> 
4001                         pyramid.traversal.ResourceTreeTraverser
4002
4003       pyramid.config.Configurator.testing_models ->
4004                         pyramid.config.Configurator.testing_resources
4005
4006       pyramid.testing.registerModels ->
4007                         pyramid.testing.registerResources
4008
4009       pyramid.testing.DummyModel ->
4010                         pyramid.testing.DummyResource
4011
4012    - All documentation which previously referred to "model" now refers to
4013      "resource".
4014
4015    - The ``starter`` and ``starter_zcml`` paster templates now have a
4016      ``resources.py`` module instead of a ``models.py`` module.
4017
4018   - Positional argument names of various APIs have been changed from
4019     ``model`` to ``resource``.
4020
4021   Backwards compatibility shims have been left in place in all cases.  They
4022   will continue to work "forever".
4023
4024 - The Pyramid concept previously known as "resource" is now known as "asset".
4025   As a result:
4026
4027   - The (non-API) module previously known as ``pyramid.resource`` is now
4028     known as ``pyramid.asset``.
4029
4030   - All docs that previously referred to "resource specification" now refer
4031     to "asset specification".
4032
4033   - The following API changes were made::
4034
4035       pyramid.config.Configurator.absolute_resource_spec ->
4036                         pyramid.config.Configurator.absolute_asset_spec
4037
4038       pyramid.config.Configurator.override_resource ->
4039                         pyramid.config.Configurator.override_asset
4040
4041   - The ZCML directive previously known as ``resource`` is now known as
4042     ``asset``.
4043
4044   - The setting previously known as ``BFG_RELOAD_RESOURCES`` (envvar) or
4045     ``reload_resources`` (config file) is now known, respectively, as
4046     ``PYRAMID_RELOAD_ASSETS`` and ``reload_assets``.
4047
4048   Backwards compatibility shims have been left in place in all cases.  They
4049   will continue to work "forever".
4050
4051 Bug Fixes
4052 ---------
4053
4054 - Make it possible to succesfully run all tests via ``nosetests`` command
4055   directly (rather than indirectly via ``python setup.py nosetests``).
4056
4057 - When a configuration conflict is encountered during scanning, the conflict
4058   exception now shows the decorator information that caused the conflict.
4059
4060 Features
4061 --------
4062
4063 - Added ``debug_routematch`` configuration setting that logs matched routes
4064   (including the matchdict and predicates).
4065
4066 - The name ``registry`` is now available in a ``pshell`` environment by
4067   default.  It is the application registry object.
4068
4069 Environment
4070 -----------
4071
4072 - All environment variables which used to be prefixed with ``BFG_`` are now
4073   prefixed with ``PYRAMID_`` (e.g. ``BFG_DEBUG_NOTFOUND`` is now
4074   ``PYRAMID_DEBUG_NOTFOUND``)
4075
4076 Documentation
4077 -------------
4078
4079 - Added "Debugging Route Matching" section to the urldispatch narrative
4080   documentation chapter.
4081
4082 - Added reference to ``PYRAMID_DEBUG_ROUTEMATCH`` envvar and ``debug_routematch``
4083   config file setting to the Environment narrative docs chapter.
4084
4085 - Changed "Project" chapter slightly to expand on use of ``paster pshell``.
4086
4087 - Direct Jython users to Mako rather than Jinja2 in "Install" narrative
4088   chapter.
4089
4090 - Many changes to support terminological renaming of "model" to "resource"
4091   and "resource" to "asset".
4092
4093 - Added an example of ``WebTest`` functional testing to the testing narrative
4094   chapter.
4095
4096 - Rearranged chapter ordering by popular demand (URL dispatch first, then
4097   traversal).  Put hybrid chapter after views chapter.
4098
4099 - Split off "Renderers" as its own chapter from "Views" chapter in narrative
4100   documentation.
4101
4102 Paster Templates
4103 ----------------
4104
4105 - Added ``debug_routematch = false`` to all paster templates.
4106
4107 Dependencies
4108 ------------
4109
4110 - Depend on Venusian >= 0.5 (for scanning conflict exception decoration).
4111
4112 1.0a6 (2010-12-15)
4113 ==================
4114
4115 Bug Fixes
4116 ---------
4117
4118 - 1.0a5 introduced a bug when ``pyramid.config.Configurator.scan`` was used
4119   without a ``package`` argument (e.g. ``config.scan()`` as opposed to
4120   ``config.scan('packagename')``.  The symptoms were: lots of deprecation
4121   warnings printed to the console about imports of deprecated Pyramid
4122   functions and classes and non-detection of view callables decorated with
4123   ``view_config`` decorators.  This has been fixed.
4124
4125 - Tests now pass on Windows (no bugs found, but a few tests in the test suite
4126   assumed UNIX path segments in filenames).
4127
4128 Documentation
4129 -------------
4130
4131 - If you followed it to-the-letter, the ZODB+Traversal Wiki tutorial would
4132   instruct you to run a test which would fail because the view callable
4133   generated by the ``pyramid_zodb`` tutorial used a one-arg view callable,
4134   but the test in the sample code used a two-arg call.
4135
4136 - Updated ZODB+Traversal tutorial setup.py of all steps to match what's
4137   generated by ``pyramid_zodb``.
4138
4139 - Fix reference to ``repoze.bfg.traversalwrapper`` in "Models" chapter (point
4140   at ``pyramid_traversalwrapper`` instead).
4141
4142 1.0a5 (2010-12-14)
4143 ==================
4144
4145 Features
4146 --------
4147
4148 - Add a ``handler`` ZCML directive.  This directive does the same thing as
4149   ``pyramid.configuration.add_handler``.
4150
4151 - A new module named ``pyramid.config`` was added.  It subsumes the duties of
4152   the older ``pyramid.configuration`` module.
4153
4154 - The new ``pyramid.config.Configurator` class has API methods that the older
4155   ``pyramid.configuration.Configurator`` class did not: ``with_context`` (a
4156   classmethod), ``include``, ``action``, and ``commit``.  These methods exist
4157   for imperative application extensibility purposes.
4158
4159 - The ``pyramid.testing.setUp`` function now accepts an ``autocommit``
4160   keyword argument, which defaults to ``True``.  If it is passed ``False``,
4161   the Config object returned by ``setUp`` will be a non-autocommiting Config
4162   object.
4163
4164 - Add logging configuration to all paster templates.
4165
4166 - ``pyramid_alchemy``, ``pyramid_routesalchemy``, and ``pylons_sqla`` paster
4167   templates now use idiomatic SQLAlchemy configuration in their respective
4168   ``.ini`` files and Python code.
4169
4170 - ``pyramid.testing.DummyRequest`` now has a class variable,
4171   ``query_string``, which defaults to the empty string.
4172
4173 - Add support for json on GAE by catching NotImplementedError and importing
4174   simplejson from django.utils.
4175
4176 - The Mako renderer now accepts a resource specification for
4177   ``mako.module_directory``.
4178
4179 - New boolean Mako settings variable ``mako.strict_undefined``.  See `Mako
4180   Context Variables
4181   <http://www.makotemplates.org/docs/runtime.html#context-variables>`_ for
4182   its meaning.
4183
4184 Dependencies
4185 ------------
4186
4187 - Depend on Mako 0.3.6+ (we now require the ``strict_undefined`` feature).
4188
4189 Bug Fixes
4190 ---------
4191
4192 - When creating a Configurator from within a ``paster pshell`` session, you
4193   were required to pass a ``package`` argument although ``package`` is not
4194   actually required.  If you didn't pass ``package``, you would receive an
4195   error something like ``KeyError: '__name__'`` emanating from the
4196   ``pyramid.path.caller_module`` function.  This has now been fixed.
4197
4198 - The ``pyramid_routesalchemy`` paster template's unit tests failed
4199   (``AssertionError: 'SomeProject' != 'someproject'``).  This is fixed.
4200
4201 - Make default renderer work (renderer factory registered with no name, which
4202   is active for every view unless the view names a specific renderer).
4203
4204 - The Mako renderer did not properly turn the ``mako.imports``,
4205   ``mako.default_filters``, and ``mako.imports`` settings into lists.
4206
4207 - The Mako renderer did not properly convert the ``mako.error_handler``
4208   setting from a dotted name to a callable.
4209
4210 Documentation
4211 -------------
4212
4213 - Merged many wording, readability, and correctness changes to narrative
4214   documentation chapters from https://github.com/caseman/pyramid (up to and
4215   including "Models" narrative chapter).
4216
4217 - "Sample Applications" section of docs changed to note existence of Cluegun,
4218   Shootout and Virginia sample applications, ported from their repoze.bfg
4219   origin packages.
4220
4221 - SQLAlchemy+URLDispatch tutorial updated to integrate changes to
4222   ``pyramid_routesalchemy`` template.
4223
4224 - Add ``pyramid.interfaces.ITemplateRenderer`` interface to Interfaces API
4225   chapter (has ``implementation()`` method, required to be used when getting
4226   at Chameleon macros).
4227
4228 - Add a "Modifying Package Structure" section to the project narrative
4229   documentation chapter (explain turning a module into a package).
4230
4231 - Documentation was added for the new ``handler`` ZCML directive in the ZCML
4232   section.
4233
4234 Deprecations
4235 ------------
4236
4237 - ``pyramid.configuration.Configurator`` is now deprecated.  Use
4238   ``pyramid.config.Configurator``, passing its constructor
4239   ``autocommit=True`` instead.  The ``pyramid.configuration.Configurator``
4240   alias will live for a long time, as every application uses it, but its
4241   import now issues a deprecation warning.  The
4242   ``pyramid.config.Configurator`` class has the same API as
4243   ``pyramid.configuration.Configurator`` class, which it means to replace,
4244   except by default it is a *non-autocommitting* configurator. The
4245   now-deprecated ``pyramid.configuration.Configurator`` will autocommit every
4246   time a configuration method is called.
4247
4248   The ``pyramid.configuration`` module remains, but it is deprecated.  Use
4249   ``pyramid.config`` instead.
4250
4251 1.0a4 (2010-11-21)
4252 ==================
4253
4254 Features
4255 --------
4256
4257 - URL Dispatch now allows for replacement markers to be located anywhere
4258   in the pattern, instead of immediately following a ``/``.
4259
4260 - URL Dispatch now uses the form ``{marker}`` to denote a replace marker in
4261   the route pattern instead of ``:marker``. The old colon-style marker syntax
4262   is still accepted for backwards compatibility. The new format allows a
4263   regular expression for that marker location to be used instead of the
4264   default ``[^/]+``, for example ``{marker:\d+}`` is now valid to require the
4265   marker to be digits.
4266
4267 - Add a ``pyramid.url.route_path`` API, allowing folks to generate relative
4268   URLs.  Calling ``route_path`` is the same as calling
4269   ``pyramid.url.route_url`` with the argument ``_app_url`` equal to the empty
4270   string.
4271
4272 - Add a ``pyramid.request.Request.route_path`` API.  This is a convenience
4273   method of the request which calls ``pyramid.url.route_url``.
4274
4275 - Make test suite pass on Jython (requires PasteScript trunk, presumably to
4276   be 1.7.4).
4277
4278 - Make test suite pass on PyPy (Chameleon doesn't work).
4279
4280 - Surrounding application configuration with ``config.begin()`` and
4281   ``config.end()`` is no longer necessary.  All paster templates have been
4282   changed to no longer call these functions.
4283
4284 - Fix configurator to not convert ``ImportError`` to ``ConfigurationError``
4285   if the import that failed was unrelated to the import requested via a
4286   dotted name when resolving dotted names (such as view dotted names).
4287
4288 Documentation
4289 -------------
4290
4291 - SQLAlchemy+URLDispatch and ZODB+Traversal tutorials have been updated to
4292   not call ``config.begin()`` or ``config.end()``.
4293
4294 Bug Fixes
4295 ---------
4296
4297 - Add deprecation warnings to import of ``pyramid.chameleon_text`` and
4298   ``pyramid.chameleon_zpt`` of ``get_renderer``, ``get_template``,
4299   ``render_template``, and ``render_template_to_response``.
4300
4301 - Add deprecation warning for import of ``pyramid.zcml.zcml_configure`` and
4302   ``pyramid.zcml.file_configure``.
4303
4304 - The ``pyramid_alchemy`` paster template had a typo, preventing an import
4305   from working.
4306
4307 - Fix apparent failures when calling ``pyramid.traversal.find_model(root,
4308   path)`` or ``pyramid.traversal.traverse(path)`` when ``path`` is
4309   (erroneously) a Unicode object. The user is meant to pass these APIs a
4310   string object, never a Unicode object.  In practice, however, users indeed
4311   pass Unicode.  Because the string that is passed must be ASCII encodeable,
4312   now, if they pass a Unicode object, its data is eagerly converted to an
4313   ASCII string rather than being passed along to downstream code as a
4314   convenience to the user and to prevent puzzling second-order failures from
4315   cropping up (all failures will occur within ``pyramid.traversal.traverse``
4316   rather than later down the line as the result of calling e.g.
4317   ``traversal_path``).
4318
4319 Backwards Incompatibilities
4320 ---------------------------
4321
4322 - The ``pyramid.testing.zcml_configure`` API has been removed.  It had been
4323   advertised as removed since repoze.bfg 1.2a1, but hadn't actually been.
4324
4325 Deprecations
4326 ------------
4327
4328 - The ``pyramid.settings.get_settings`` API is now deprecated.  Use
4329   ``pyramid.threadlocals.get_current_registry().settings`` instead or use the
4330   ``settings`` attribute of the registry available from the request
4331   (``request.registry.settings``).
4332
4333 Documentation
4334 -------------
4335
4336 - Removed ``zodbsessions`` tutorial chapter.  It's still useful, but we now
4337   have a SessionFactory abstraction which competes with it, and maintaining
4338   documentation on both ways to do it is a distraction.
4339
4340 Internal
4341 --------
4342
4343 - Replace Twill with WebTest in internal integration tests (avoid deprecation
4344   warnings generated by Twill).
4345
4346 1.0a3 (2010-11-16)
4347 ==================
4348
4349 Features
4350 --------
4351
4352 - Added Mako TemplateLookup settings for ``mako.error_handler``,
4353   ``mako.default_filters``, and ``mako.imports``.
4354
4355 - Normalized all paster templates: each now uses the name ``main`` to
4356   represent the function that returns a WSGI application, each now uses
4357   WebError, each now has roughly the same shape of development.ini style.
4358
4359 - Added class vars ``matchdict`` and ``matched_route`` to
4360   ``pyramid.request.Request``.  Each is set to ``None``.
4361
4362 - New API method: ``pyramid.settings.asbool``.
4363
4364 - New API methods for ``pyramid.request.Request``: ``model_url``,
4365   ``route_url``, and ``static_url``.  These are simple passthroughs for their
4366   respective functions in ``pyramid.url``.
4367
4368 - The ``settings`` object which used to be available only when
4369   ``request.settings.get_settings`` was called is now available as
4370   ``registry.settings`` (e.g. ``request.registry.settings`` in view code).
4371
4372 Bug Fixes
4373 ---------
4374
4375 - The pylons_* paster templates erroneously used the ``{squiggly}`` routing
4376   syntax as the pattern supplied to ``add_route``.  This style of routing is
4377   not supported.  They were replaced with ``:colon`` style route patterns.
4378
4379 - The pylons_* paster template used the same string
4380   (``your_app_secret_string``) for the ``session.secret`` setting in the
4381   generated ``development.ini``.  This was a security risk if left unchanged
4382   in a project that used one of the templates to produce production
4383   applications.  It now uses a randomly generated string.
4384
4385 Documentation
4386 -------------
4387
4388 - ZODB+traversal wiki (``wiki``) tutorial updated due to changes to
4389   ``pyramid_zodb`` paster template.
4390
4391 - SQLAlchemy+urldispach wiki (``wiki2``) tutorial updated due to changes to
4392   ``pyramid_routesalchemy`` paster template.
4393
4394 - Documented the ``matchdict`` and ``matched_route`` attributes of the
4395   request object in the Request API documentation.
4396
4397 Deprecations
4398 ------------
4399
4400 - Obtaining the ``settings`` object via
4401   ``registry.{get|query}Utility(ISettings)`` is now deprecated.  Instead,
4402   obtain the ``settings`` object via the ``registry.settings`` attribute.  A
4403   backwards compatibility shim was added to the registry object to register
4404   the settings object as an ISettings utility when ``setattr(registry,
4405   'settings', foo)`` is called, but it will be removed in a later release.
4406
4407 - Obtaining the ``settings`` object via ``pyramid.settings.get_settings`` is
4408   now deprecated.  Obtain it as the ``settings`` attribute of the registry
4409   now (obtain the registry via ``pyramid.threadlocal.get_registry`` or as
4410   ``request.registry``).
4411
4412 Behavior Differences
4413 --------------------
4414
4415 - Internal: ZCML directives no longer call get_current_registry() if there's
4416   a ``registry`` attribute on the ZCML context (kill off use of
4417   threadlocals).
4418
4419 - Internal: Chameleon template renderers now accept two arguments: ``path``
4420   and ``lookup``.  ``Lookup`` will be an instance of a lookup class which
4421   supplies (late-bound) arguments for debug, reload, and translate.  Any
4422   third-party renderers which use (the non-API) function
4423   ``pyramid.renderers.template_renderer_factory`` will need to adjust their
4424   implementations to obey the new callback argument list.  This change was to
4425   kill off inappropriate use of threadlocals.
4426
4427 1.0a2 (2010-11-09)
4428 ==================
4429
4430 Documentation
4431 -------------
4432
4433 - All references to events by interface
4434   (e.g. ``pyramid.interfaces.INewRequest``) have been changed to reference
4435   their concrete classes (e.g. ``pyramid.events.NewRequest``) in
4436   documentation about making subscriptions.
4437
4438 - All references to Pyramid-the-application were changed from mod-`pyramid`
4439   to app-`Pyramid`.  A custom role setting was added to ``docs/conf.py`` to
4440   allow for this.  (internal)
4441
4442 1.0a1 (2010-11-05)
4443 ==================
4444
4445 Features (delta from BFG 1.3)
4446 -------------------------------
4447
4448 - Mako templating renderer supports resource specification format for
4449   template lookups and within Mako templates. Absolute filenames must
4450   be used in Pyramid to avoid this lookup process.
4451
4452 - Add ``pyramid.httpexceptions`` module, which is a facade for the
4453   ``webob.exc`` module.
4454
4455 - Direct built-in support for the Mako templating language.
4456
4457 - A new configurator method exists: ``add_handler``.  This method adds
4458   a Pylons-style "view handler" (such a thing used to be called a
4459   "controller" in Pylons 1.0).
4460
4461 - New argument to configurator: ``session_factory``.
4462
4463 - New method on configurator: ``set_session_factory``
4464
4465 - Using ``request.session`` now returns a (dictionary-like) session
4466   object if a session factory has been configured.
4467
4468 - The request now has a new attribute: ``tmpl_context`` for benefit of
4469   Pylons users.
4470
4471 - The decorator previously known as ``pyramid.view.bfg_view`` is now
4472   known most formally as ``pyramid.view.view_config`` in docs and
4473   paster templates.  An import of ``pyramid.view.bfg_view``, however,
4474   will continue to work "forever".
4475
4476 - New API methods in ``pyramid.session``: ``signed_serialize`` and
4477   ``signed_deserialize``.
4478
4479 - New interface: ``pyramid.interfaces.IRendererInfo``.  An object of this type
4480   is passed to renderer factory constructors (see "Backwards
4481   Incompatibilities").
4482
4483 - New event type: ``pyramid.interfaces.IBeforeRender``.  An object of this type
4484   is sent as an event before a renderer is invoked (but after the
4485   application-level renderer globals factory added via
4486   ``pyramid.configurator.configuration.set_renderer_globals_factory``, if any,
4487   has injected its own keys).  Applications may now subscribe to the
4488   ``IBeforeRender`` event type in order to introspect the and modify the set of
4489   renderer globals before they are passed to a renderer.  The event object
4490   iself has a dictionary-like interface that can be used for this purpose.  For
4491   example::
4492
4493     from repoze.events import subscriber
4494     from pyramid.interfaces import IRendererGlobalsEvent
4495
4496     @subscriber(IRendererGlobalsEvent)
4497     def add_global(event):
4498         event['mykey'] = 'foo'
4499
4500   If a subscriber attempts to add a key that already exist in the renderer
4501   globals dictionary, a ``KeyError`` is raised.  This limitation is due to the
4502   fact that subscribers cannot be ordered relative to each other.  The set of
4503   keys added to the renderer globals dictionary by all subscribers and
4504   app-level globals factories must be unique.
4505
4506 - New class: ``pyramid.response.Response``.  This is a pure facade for
4507   ``webob.Response`` (old code need not change to use this facade, it's
4508   existence is mostly for vanity and documentation-generation purposes).
4509
4510 - All preexisting paster templates (except ``zodb``) now use "imperative"
4511   configuration (``starter``, ``routesalchemy``, ``alchemy``).
4512
4513 - A new paster template named ``pyramid_starter_zcml`` exists, which uses
4514   declarative configuration.
4515
4516 Documentation (delta from BFG 1.3)
4517 -----------------------------------
4518
4519 - Added a ``pyramid.httpexceptions`` API documentation chapter.
4520
4521 - Added a ``pyramid.session`` API documentation chapter.
4522
4523 - Added a ``Session Objects`` narrative documentation chapter.
4524
4525 - Added an API chapter for the ``pyramid.personality`` module.
4526
4527 - Added an API chapter for the ``pyramid.response`` module.
4528
4529 - All documentation which previously referred to ``webob.Response`` now uses
4530   ``pyramid.response.Response`` instead.
4531
4532 - The documentation has been overhauled to use imperative configuration,
4533   moving declarative configuration (ZCML) explanations to a separate
4534   narrative chapter ``declarative.rst``.
4535
4536 - The ZODB Wiki tutorial was updated to take into account changes to the
4537   ``pyramid_zodb`` paster template.
4538
4539 - The SQL Wiki tutorial was updated to take into account changes to the
4540   ``pyramid_routesalchemy`` paster template.
4541
4542 Backwards Incompatibilities (with BFG 1.3)
4543 ------------------------------------------
4544
4545 - There is no longer an ``IDebugLogger`` registered as a named utility
4546   with the name ``repoze.bfg.debug``.
4547
4548 - The logger which used to have the name of ``repoze.bfg.debug`` now
4549   has the name ``pyramid.debug``.
4550
4551 - The deprecated API ``pyramid.testing.registerViewPermission``
4552   has been removed.
4553
4554 - The deprecated API named ``pyramid.testing.registerRoutesMapper``
4555   has been removed.
4556
4557 - The deprecated API named ``pyramid.request.get_request`` was removed.
4558
4559 - The deprecated API named ``pyramid.security.Unauthorized`` was
4560   removed.
4561
4562 - The deprecated API named ``pyramid.view.view_execution_permitted``
4563   was removed.
4564
4565 - The deprecated API named ``pyramid.view.NotFound`` was removed.
4566
4567 - The ``bfgshell`` paster command is now named ``pshell``.
4568
4569 - The Venusian "category" for all built-in Venusian decorators
4570   (e.g. ``subscriber`` and ``view_config``/``bfg_view``) is now
4571   ``pyramid`` instead of ``bfg``.
4572
4573 - ``pyramid.renderers.rendered_response`` function removed; use
4574   ``render_pyramid.renderers.render_to_response`` instead.
4575
4576 - Renderer factories now accept a *renderer info object* rather than an
4577   absolute resource specification or an absolute path.  The object has the
4578   following attributes: ``name`` (the ``renderer=`` value), ``package`` (the
4579   'current package' when the renderer configuration statement was found),
4580   ``type``: the renderer type, ``registry``: the current registry, and
4581   ``settings``: the deployment settings dictionary.
4582
4583   Third-party ``repoze.bfg`` renderer implementations that must be ported to
4584   Pyramid will need to account for this.
4585
4586   This change was made primarily to support more flexible Mako template
4587   rendering.
4588
4589 - The presence of the key ``repoze.bfg.message`` in the WSGI environment when
4590   an exception occurs is now deprecated.  Instead, code which relies on this
4591   environ value should use the ``exception`` attribute of the request
4592   (e.g. ``request.exception[0]``) to retrieve the message.
4593
4594 - The values ``bfg_localizer`` and ``bfg_locale_name`` kept on the request
4595   during internationalization for caching purposes were never APIs.  These
4596   however have changed to ``localizer`` and ``locale_name``, respectively.
4597
4598 - The default ``cookie_name`` value of the ``authtktauthenticationpolicy`` ZCML
4599   now defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``).
4600
4601 - The default ``cookie_name`` value of the
4602   ``pyramid.authentication.AuthTktAuthenticationPolicy`` constructor now
4603   defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``).
4604
4605 - The ``request_type`` argument to the ``view`` ZCML directive, the
4606   ``pyramid.configuration.Configurator.add_view`` method, or the
4607   ``pyramid.view.view_config`` decorator (nee ``bfg_view``) is no longer
4608   permitted to be one of the strings ``GET``, ``HEAD``, ``PUT``, ``POST`` or
4609   ``DELETE``, and now must always be an interface.  Accepting the
4610   method-strings as ``request_type`` was a backwards compatibility strategy
4611   servicing repoze.bfg 1.0 applications.  Use the ``request_method``
4612   parameter instead to specify that a view a string request-method predicate.
4cdffc 4613