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