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