wtf
Chris McDonough
2012-03-27 18f2334aa041f69436aabdcec0e1a53dba587273
commit | author | age
e04cbb 1 1.2 (2011-09-12)
CM 2 ================
3
4 Features
5 --------
6
7 - Route pattern replacement marker names can now begin with an underscore.
8   See https://github.com/Pylons/pyramid/issues/276.
9
10 1.2b3 (2011-09-11)
11 ==================
12
13 Bug Fixes
14 ---------
15
16 - The route prefix was not taken into account when a static view was added in
17   an "include".  See https://github.com/Pylons/pyramid/issues/266 .
18
19 1.2b2 (2011-09-08)
20 ==================
21
22 Bug Fixes
23 ---------
24
25 - The 1.2b1 tarball was a brownbag (particularly for Windows users) because
26   it contained filenames with stray quotation marks in inappropriate places.
27   We depend on ``setuptools-git`` to produce release tarballs, and when it
28   was run to produce the 1.2b1 tarball, it didn't yet cope well with files
29   present in git repositories with high-order characters in their filenames.
30
31 Documentation
32 -------------
33
34 - Minor tweaks to the "Introduction" narrative chapter example app and
35   wording.
36
37 1.2b1 (2011-09-08)
38 ==================
39
40 Bug Fixes
41 ---------
42
43 - Sometimes falling back from territory translations (``de_DE``) to language
44   translations (``de``) would not work properly when using a localizer.  See
45   https://github.com/Pylons/pyramid/issues/263
46
47 - The static file serving machinery could not serve files that started with a
48   ``.`` (dot) character.
49
50 - Static files with high-order (super-ASCII) characters in their names could
51   not be served by a static view.  The static file serving machinery
52   inappropriately URL-quoted path segments in filenames when asking for files
53   from the filesystem.
54
55 - Within ``pyramid.traversal.traversal_path`` , canonicalize URL segments
56   from UTF-8 to Unicode before checking whether a segment matches literally
57   one of ``.``, the empty string, or ``..`` in case there's some sneaky way
58   someone might tunnel those strings via UTF-8 that don't match the literals
59   before decoded.
60
61 Documentation
62 -------------
63
64 - Added a "What Makes Pyramid Unique" section to the Introduction narrative
65   chapter.
66
67 1.2a6 (2011-09-06)
68 ==================
69
70 Bug Fixes
71 ---------
72
73 - AuthTktAuthenticationPolicy with a ``reissue_time`` interfered with logout.
74   See https://github.com/Pylons/pyramid/issues/262.
75
76 Internal
77 --------
78
79 - Internalize code previously depended upon as imports from the
80   ``paste.auth`` module (futureproof).
81
82 - Replaced use of ``paste.urlparser.StaticURLParser`` with a derivative of
83   Chris Rossi's "happy" static file serving code (futureproof).
84
85 - Fixed test suite; on some systems tests would fail due to indeterminate
86   test run ordering and a double-push-single-pop of a shared test variable.
87
88 Behavior Differences
89 --------------------
90
91 - An ETag header is no longer set when serving a static file.  A
92   Last-Modified header is set instead.
93
94 - Static file serving no longer supports the ``wsgi.file_wrapper`` extension.
95
96 - Instead of returning a ``403 Forbidden`` error when a static file is served
97   that cannot be accessed by the Pyramid process' user due to file
98   permissions, an IOError (or similar) will be raised.
99
100 Scaffolds
101 ---------
102
103 - All scaffolds now send the ``cache_max_age`` parameter to the
104   ``add_static_view`` method.
105
106 1.2a5 (2011-09-04)
107 ==================
108
109 Bug Fixes
110 ---------
111
112 - The ``route_prefix`` of a configurator was not properly taken into account
113   when registering routes in certain circumstances.  See
114   https://github.com/Pylons/pyramid/issues/260
115
116 Dependencies
117 ------------
118
119 - The ``zope.configuration`` package is no longer a dependency.
120
121 1.2a4 (2011-09-02)
122 ==================
123
124 Features
125 --------
126
127 - Support an ``onerror`` keyword argument to
128   ``pyramid.config.Configurator.scan()``.  This onerror keyword argument is
129   passed to ``venusian.Scanner.scan()`` to influence error behavior when
130   an exception is raised during scanning.
131
132 - The ``request_method`` predicate argument to
133   ``pyramid.config.Configurator.add_view`` and
134   ``pyramid.config.Configurator.add_route`` is now permitted to be a tuple of
135   HTTP method names.  Previously it was restricted to being a string
136   representing a single HTTP method name.
137
138 - Undeprecated ``pyramid.traversal.find_model``,
139   ``pyramid.traversal.model_path``, ``pyramid.traversal.model_path_tuple``,
140   and ``pyramid.url.model_url``, which were all deprecated in Pyramid 1.0.
141   There's just not much cost to keeping them around forever as aliases to
142   their renamed ``resource_*`` prefixed functions.
143
144 - Undeprecated ``pyramid.view.bfg_view``, which was deprecated in Pyramid
145   1.0.  This is a low-cost alias to ``pyramid.view.view_config`` which we'll
146   just keep around forever.
147
148 Dependencies
149 ------------
150
151 - Pyramid now requires Venusian 1.0a1 or better to support the ``onerror``
152   keyword argument to ``pyramid.config.Configurator.scan``.
153
154 1.2a3 (2011-08-29)
155 ==================
156
157 Bug Fixes
158 ---------
159
160 - Pyramid did not properly generate static URLs using
161   ``pyramid.url.static_url`` when passed a caller-package relative path due
162   to a refactoring done in 1.2a1.
163
164 - The ``settings`` object emitted a deprecation warning any time
165   ``__getattr__`` was called upon it.  However, there are legitimate
166   situations in which ``__getattr__`` is called on arbitrary objects
167   (e.g. ``hasattr``).  Now, the ``settings`` object only emits the warning
168   upon successful lookup.
169
170 Internal
171 --------
172
173 - Use ``config.with_package`` in view_config decorator rather than
174   manufacturing a new renderer helper (cleanup).
175
176 1.2a2 (2011-08-27)
177 ==================
178
179 Bug Fixes
180 ---------
181
182 - When a ``renderers=`` argument is not specified to the Configurator
183   constructor, eagerly register and commit the default renderer set.  This
184   permits the overriding of the default renderers, which was broken in 1.2a1
185   without a commit directly after Configurator construction.
186
187 - Mako rendering exceptions had the wrong value for an error message.
188
189 - An include could not set a root factory successfully because the
190   Configurator constructor unconditionally registered one that would be
191   treated as if it were "the word of the user".
192
193 Features
194 --------
195
196 - A session factory can now be passed in using the dotted name syntax.
197
198 1.2a1 (2011-08-24)
199 ==================
200
201 Features
202 --------
203
204 - The ``[pshell]`` section in an ini configuration file now treats a
205   ``setup`` key as a dotted name that points to a callable that is passed the
206   bootstrap environment.  It can mutate the environment as necessary for
207   great justice.
208
209 - A new configuration setting named ``pyramid.includes`` is now available.
210   It is described in the "Environment Variables and ``.ini`` Files Settings"
211   narrative documentation chapter.
212
213 - Added a ``route_prefix`` argument to the
214   ``pyramid.config.Configurator.include`` method.  This argument allows you
215   to compose URL dispatch applications together.  See the section entitled
216   "Using a Route Prefix to Compose Applications" in the "URL Dispatch"
217   narrative documentation chapter.
218
219 - Added a ``pyramid.security.NO_PERMISSION_REQUIRED`` constant for use in
220   ``permission=`` statements to view configuration.  This constant has a
221   value of the string ``__no_permission_required__``.  This string value was
222   previously referred to in documentation; now the documentation uses the
223   constant.
224
225 - Added a decorator-based way to configure a response adapter:
226   ``pyramid.response.response_adapter``.  This decorator has the same use as
227   ``pyramid.config.Configurator.add_response_adapter`` but it's declarative.
228
229 - The ``pyramid.events.BeforeRender`` event now has an attribute named
230   ``rendering_val``.  This can be used to introspect the value returned by a
231   view in a BeforeRender subscriber.
232
233 - New configurator directive: ``pyramid.config.Configurator.add_tween``.
234   This directive adds a "tween".  A "tween" is used to wrap the Pyramid
235   router's primary request handling function.  This is a feature may be used
236   by Pyramid framework extensions, to provide, for example, view timing
237   support and as a convenient place to hang bookkeeping code.
238
239   Tweens are further described in the narrative docs section in the Hooks
240   chapter, named "Registering Tweens".
241
242 - New paster command ``paster ptweens``, which prints the current "tween"
243   configuration for an application.  See the section entitled "Displaying
244   Tweens" in the Command-Line Pyramid chapter of the narrative documentation
245   for more info.
246
247 - The Pyramid debug logger now uses the standard logging configuration
248   (usually set up by Paste as part of startup).  This means that output from
249   e.g. ``debug_notfound``, ``debug_authorization``, etc. will go to the
250   normal logging channels.  The logger name of the debug logger will be the
251   package name of the *caller* of the Configurator's constructor.
252
253 - A new attribute is available on request objects: ``exc_info``.  Its value
254   will be ``None`` until an exception is caught by the Pyramid router, after
255   which it will be the result of ``sys.exc_info()``.
256
257 - ``pyramid.testing.DummyRequest`` now implements the
258   ``add_finished_callback`` and ``add_response_callback`` methods.
259
260 - New methods of the ``pyramid.config.Configurator`` class:
261   ``set_authentication_policy`` and ``set_authorization_policy``.  These are
262   meant to be consumed mostly by add-on authors.
263
264 - New Configurator method: ``set_root_factory``.
265
266 - Pyramid no longer eagerly commits some default configuration statements at
267   Configurator construction time, which permits values passed in as
268   constructor arguments (e.g. ``authentication_policy`` and
269   ``authorization_policy``) to override the same settings obtained via an
270   "include".
271
272 - Better Mako rendering exceptions via
273   ``pyramid.mako_templating.MakoRenderingException``
274
275 - New request methods: ``current_route_url``, ``current_route_path``, and
276   ``static_path``.
277
278 - New functions in ``pyramid.url``: ``current_route_path`` and
279   ``static_path``.
280
281 - The ``pyramid.request.Request.static_url`` API (and its brethren
282   ``pyramid.request.Request.static_path``, ``pyramid.url.static_url``, and
283   ``pyramid.url.static_path``) now accept an asbolute filename as a "path"
284   argument.  This will generate a URL to an asset as long as the filename is
285   in a directory which was previously registered as a static view.
286   Previously, trying to generate a URL to an asset using an absolute file
287   path would raise a ValueError.
288
289 - The ``RemoteUserAuthenticationPolicy ``, ``AuthTktAuthenticationPolicy``,
290   and ``SessionAuthenticationPolicy`` constructors now accept an additional
291   keyword argument named ``debug``.  By default, this keyword argument is
292   ``False``.  When it is ``True``, debug information will be sent to the
293   Pyramid debug logger (usually on stderr) when the ``authenticated_userid``
294   or ``effective_principals`` method is called on any of these policies.  The
295   output produced can be useful when trying to diagnose
296   authentication-related problems.
297
298 - New view predicate: ``match_param``.  Example: a view added via
299   ``config.add_view(aview, match_param='action=edit')`` will be called only
300   when the ``request.matchdict`` has a value inside it named ``action`` with
301   a value of ``edit``.
302
303 Internal
304 --------
305
306 - The Pyramid "exception view" machinery is now implemented as a "tween"
307   (``pyramid.tweens.excview_tween_factory``).
308
309 - WSGIHTTPException (HTTPFound, HTTPNotFound, etc) now has a new API named
310   "prepare" which renders the body and content type when it is provided with
311   a WSGI environ.  Required for debug toolbar.
312
313 - Once ``__call__`` or ``prepare`` is called on a WSGIHTTPException, the body
314   will be set, and subsequent calls to ``__call__`` will always return the
315   same body.  Delete the body attribute to rerender the exception body.
316
317 - Previously the ``pyramid.events.BeforeRender`` event *wrapped* a dictionary
318   (it addressed it as its ``_system`` attribute).  Now it *is* a dictionary
319   (it inherits from ``dict``), and it's the value that is passed to templates
320   as a top-level dictionary.
321
322 - The ``route_url``, ``route_path``, ``resource_url``, ``static_url``, and
323   ``current_route_url`` functions in the ``pyramid.url`` package now delegate
324   to a method on the request they've been passed, instead of the other way
325   around.  The pyramid.request.Request object now inherits from a mixin named
326   pyramid.url.URLMethodsMixin to make this possible, and all url/path
327   generation logic is embedded in this mixin.
328
329 - Refactor ``pyramid.config`` into a package.
330
331 - Removed the ``_set_security_policies`` method of the Configurator.
332
333 - Moved the ``StaticURLInfo`` class from ``pyramid.static`` to
334   ``pyramid.config.views``.
335
336 - Move the ``Settings`` class from ``pyramid.settings`` to
337   ``pyramid.config.settings``.
338
339 - Move the ``OverrideProvider``, ``PackageOverrides``, ``DirectoryOverride``,
340   and ``FileOverride`` classes from ``pyramid.asset`` to
341   ``pyramid.config.assets``.
342
343 Deprecations
344 ------------
345
346 - All Pyramid-related deployment settings (e.g. ``debug_all``,
347   ``debug_notfound``) are now meant to be prefixed with the prefix
348   ``pyramid.``.  For example: ``debug_all`` -> ``pyramid.debug_all``.  The
349   old non-prefixed settings will continue to work indefinitely but supplying
350   them may eventually print a deprecation warning.  All scaffolds and
351   tutorials have been changed to use prefixed settings.
352
353 - The ``settings`` dictionary now raises a deprecation warning when you
354   attempt to access its values via ``__getattr__`` instead of
355   via ``__getitem__``.
356
357 Backwards Incompatibilities
358 ---------------------------
359
360 - If a string is passed as the ``debug_logger`` parameter to a Configurator,
361   that string is considered to be the name of a global Python logger rather
362   than a dotted name to an instance of a logger.
363
364 - The ``pyramid.config.Configurator.include`` method now accepts only a
365   single ``callable`` argument (a sequence of callables used to be
366   permitted).  If you are passing more than one ``callable`` to
367   ``pyramid.config.Configurator.include``, it will break.  You now must now
368   instead make a separate call to the method for each callable.  This change
369   was introduced to support the ``route_prefix`` feature of include.
370
371 - It may be necessary to more strictly order configuration route and view
372   statements when using an "autocommitting" Configurator.  In the past, it
373   was possible to add a view which named a route name before adding a route
374   with that name when you used an autocommitting configurator.  For example::
375
376     config = Configurator(autocommit=True)
377     config.add_view('my.pkg.someview', route_name='foo')
378     config.add_route('foo', '/foo')
379
380   The above will raise an exception when the view attempts to add itself.
381   Now you must add the route before adding the view::
382
383     config = Configurator(autocommit=True)
384     config.add_route('foo', '/foo')
385     config.add_view('my.pkg.someview', route_name='foo')
386
387   This won't effect "normal" users, only people who have legacy BFG codebases
388   that used an autommitting configurator and possibly tests that use the
389   configurator API (the configurator returned by ``pyramid.testing.setUp`` is
390   an autocommitting configurator).  The right way to get around this is to
391   use a non-autocommitting configurator (the default), which does not have
392   these directive ordering requirements.
393
394 - The ``pyramid.config.Configurator.add_route`` directive no longer returns a
395   route object.  This change was required to make route vs. view
396   configuration processing work properly.
397
398 Documentation
399 -------------
400
401 - Narrative and API documentation which used the ``route_url``,
402   ``route_path``, ``resource_url``, ``static_url``, and ``current_route_url``
403   functions in the ``pyramid.url`` package have now been changed to use
404   eponymous methods of the request instead.
405
406 - Added a section entitled "Using a Route Prefix to Compose Applications" to
407   the "URL Dispatch" narrative documentation chapter.
408
409 - Added a new module to the API docs: ``pyramid.tweens``.
410
411 - Added a "Registering Tweens" section to the "Hooks" narrative chapter.
412
413 - Added a "Displaying Tweens" section to the "Command-Line Pyramid" narrative
414   chapter.
415
416 - Added documentation for the ``pyramid.tweens`` and ``pyramid.includes``
417   configuration settings to the "Environment Variables and ``.ini`` Files
418   Settings" chapter.
419
420 - Added a Logging chapter to the narrative docs (based on the Pylons logging
421   docs, thanks Phil).
422
423 - Added a Paste chapter to the narrative docs (moved content from the Project
424   chapter).
425
426 - Added the ``pyramid.interfaces.IDict`` interface representing the methods
427   of a dictionary, for documentation purposes only (IMultiDict and
428   IBeforeRender inherit from it).
429
430 - All tutorials now use - The ``route_url``, ``route_path``,
431   ``resource_url``, ``static_url``, and ``current_route_url`` methods of the
432   request rather than the function variants imported from ``pyramid.url``.
433
434 - The ZODB wiki tutorial now uses the ``pyramid_zodbconn`` package rather
435   than the ``repoze.zodbconn`` package to provide ZODB integration.
436
437 Dependency Changes
438 ------------------
439
440 - Pyramid now relies on PasteScript >= 1.7.4.  This version contains a
441   feature important for allowing flexible logging configuration.
442
443 Scaffolds
444 ----------
445
446 - All scaffolds now use the ``pyramid_tm`` package rather than the
447   ``repoze.tm2`` middleware to manage transaction management.
448
449 - The ZODB scaffold now uses the ``pyramid_zodbconn`` package rather than the
450   ``repoze.zodbconn`` package to provide ZODB integration.
451
452 - All scaffolds now use the ``pyramid_debugtoolbar`` package rather than the
453   ``WebError`` package to provide interactive debugging features.
454
455 - Projects created via a scaffold no longer depend on the ``WebError``
456   package at all; configuration in the ``production.ini`` file which used to
457   require its ``error_catcher`` middleware has been removed.  Configuring
458   error catching / email sending is now the domain of the ``pyramid_exclog``
f75a3f 459   package (see http://docs.pylonsproject.org/projects/pyramid_exclog/dev/).
e04cbb 460
CM 461 Bug Fixes
462 ---------
463
464 - Fixed an issue with the default renderer not working at certain times.  See
465   https://github.com/Pylons/pyramid/issues/249
466
467
bd9947 468 1.1 (2011-07-22)
CM 469 ================
470
471 Features
472 --------
473
474 - Added the ``pyramid.renderers.null_renderer`` object as an API.  The null
475   renderer is an object that can be used in advanced integration cases as
476   input to the view configuration ``renderer=`` argument.  When the null
477   renderer is used as a view renderer argument, Pyramid avoids converting the
478   view callable result into a Response object.  This is useful if you want to
479   reuse the view configuration and lookup machinery outside the context of
480   its use by the Pyramid router.  This feature was added for consumption by
481   the ``pyramid_rpc`` package, which uses view configuration and lookup
482   outside the context of a router in exactly this way.  ``pyramid_rpc`` has
483   been broken under 1.1 since 1.1b1; adding it allows us to make it work
484   again.
485
486 - Change all scaffolding templates that point to docs.pylonsproject.org to
487   use ``/projects/pyramid/current`` rather than ``/projects/pyramid/dev``.
488
489 Internals
490 ---------
491
492 - Remove ``compat`` code that served only the purpose of providing backwards
493   compatibility with Python 2.4.
494
495 - Add a deprecation warning for non-API function
496   ``pyramid.renderers.renderer_from_name`` which has seen use in the wild.
497
498 - Add a ``clone`` method to ``pyramid.renderers.RendererHelper`` for use by
499   the ``pyramid.view.view_config`` decorator.
500
501 Documentation
502 -------------
503
504 - Fixed two typos in wiki2 (SQLA + URL Dispatch) tutorial.
505
506 - Reordered chapters in narrative section for better new user friendliness.
507
508 - Added more indexing markers to sections in documentation.
509
510 1.1b4 (2011-07-18)
511 ==================
512
513 Documentation
514 -------------
515
516 - Added a section entitled "Writing a Script" to the "Command-Line Pyramid"
517   chapter.
518
519 Backwards Incompatibilities
520 ---------------------------
521
522 - We added the ``pyramid.scripting.make_request`` API too hastily in 1.1b3.
523   It has been removed.  Sorry for any inconvenience.  Use the
524   ``pyramid.request.Request.blank`` API instead.
525
526 Features
527 --------
528
529 - The ``paster pshell``, ``paster pviews``, and ``paster proutes`` commands
530   each now under the hood uses ``pyramid.paster.bootstrap``, which makes it
531   possible to supply an ``.ini`` file without naming the "right" section in
532   the file that points at the actual Pyramid application.  Instead, you can
533   generally just run ``paster {pshell|proutes|pviews} development.ini`` and
534   it will do mostly the right thing.
535
536 Bug Fixes
537 ---------
538
539 - Omit custom environ variables when rendering a custom exception template in
540   ``pyramid.httpexceptions.WSGIHTTPException._set_default_attrs``;
541   stringifying thse may trigger code that should not be executed; see
542   https://github.com/Pylons/pyramid/issues/239
543
544 1.1b3 (2011-07-15)
545 ==================
546
547 Features
548 --------
549
550 - Fix corner case to ease semifunctional testing of views: create a new
551   rendererinfo to clear out old registry on a rescan.  See
552   https://github.com/Pylons/pyramid/pull/234.
553
554 - New API class: ``pyramid.static.static_view``.  This supersedes the
555   deprecated ``pyramid.view.static`` class.  ``pyramid.static.static_view``
556   by default serves up documents as the result of the request's
557   ``path_info``, attribute rather than it's ``subpath`` attribute (the
558   inverse was true of ``pyramid.view.static``, and still is).
559   ``pyramid.static.static_view`` exposes a ``use_subpath`` flag for use when
560   you want the static view to behave like the older deprecated version.
561
562 - A new API function ``pyramid.paster.bootstrap`` has been added to make
563   writing scripts that bootstrap a Pyramid environment easier, e.g.::
564
565       from pyramid.paster import bootstrap
566       info = bootstrap('/path/to/my/development.ini')
567       request = info['request']
568       print request.route_url('myroute')
569
570 - A new API function ``pyramid.scripting.prepare`` has been added.  It is a
571   lower-level analogue of ``pyramid.paster.boostrap`` that accepts a request
572   and a registry instead of a config file argument, and is used for the same
573   purpose::
574
575       from pyramid.scripting import prepare
576       info = prepare(registry=myregistry)
577       request = info['request']
578       print request.route_url('myroute')
579
580 - A new API function ``pyramid.scripting.make_request`` has been added.  The
581   resulting request will have a ``registry`` attribute.  It is meant to be
582   used in conjunction with ``pyramid.scripting.prepare`` and/or
583   ``pyramid.paster.bootstrap`` (both of which accept a request as an
584   argument)::
585
586       from pyramid.scripting import make_request
587       request = make_request('/')
588
589 - New API attribute ``pyramid.config.global_registries`` is an iterable
590   object that contains references to every Pyramid registry loaded into the
591   current process via ``pyramid.config.Configurator.make_app``.  It also has
592   a ``last`` attribute containing the last registry loaded.  This is used by
593   the scripting machinery, and is available for introspection.
594
595 Deprecations
596 ------------
597
598 - The ``pyramid.view.static`` class has been deprecated in favor of the newer
599   ``pyramid.static.static_view`` class.  A deprecation warning is raised when
600   it is used.  You should replace it with a reference to
601   ``pyramid.static.static_view`` with the ``use_subpath=True`` argument.
602
603 Bug Fixes
604 ---------
605
606 - Without a mo-file loaded for the combination of domain/locale,
607   ``pyramid.i18n.Localizer.pluralize`` run using that domain/locale
608   combination raised an inscrutable "translations object has no attr
609   'plural'" error.  Now, instead it "works" (it uses a germanic pluralization
610   by default).  It's nonsensical to try to pluralize something without
611   translations for that locale/domain available, but this behavior matches
612   the behavior of ``pyramid.i18n.Localizer.translate`` so it's at least
613   consistent; see https://github.com/Pylons/pyramid/issues/235.
614
615 1.1b2 (2011-07-13)
616 ==================
617
618 Features
619 --------
620
621 - New environment setting ``PYRAMID_PREVENT_HTTP_CACHE`` and new
622   configuration file value ``prevent_http_cache``.  These are synomymous and
623   allow you to prevent HTTP cache headers from being set by Pyramid's
624   ``http_cache`` machinery globally in a process.  see the "Influencing HTTP
625   Caching" section of the "View Configuration" narrative chapter and the
626   detailed documentation for this setting in the "Environment Variables and
627   Configuration Settings" narrative chapter.
628
629 Behavior Changes
630 ----------------
631
632 - Previously, If a ``BeforeRender`` event subscriber added a value via the
633   ``__setitem__`` or ``update`` methods of the event object with a key that
634   already existed in the renderer globals dictionary, a ``KeyError`` was
635   raised.  With the deprecation of the "add_renderer_globals" feature of the
636   configurator, there was no way to override an existing value in the
637   renderer globals dictionary that already existed.  Now, the event object
638   will overwrite an older value that is already in the globals dictionary
639   when its ``__setitem__`` or ``update`` is called (as well as the new
640   ``setdefault`` method), just like a plain old dictionary.  As a result, for
641   maximum interoperability with other third-party subscribers, if you write
642   an event subscriber meant to be used as a BeforeRender subscriber, your
643   subscriber code will now need to (using ``.get`` or ``__contains__`` of the
644   event object) ensure no value already exists in the renderer globals
645   dictionary before setting an overriding value.
646
647 Bug Fixes
648 ---------
649
650 - The ``Configurator.add_route`` method allowed two routes with the same
651   route to be added without an intermediate ``config.commit()``.  If you now
652   receive a ``ConfigurationError`` at startup time that appears to be
653   ``add_route`` related, you'll need to either a) ensure that all of your
654   route names are unique or b) call ``config.commit()`` before adding a
655   second route with the name of a previously added name or c) use a
656   Configurator that works in ``autocommit`` mode.
657
658 - The ``pyramid_routesalchemy`` and ``pyramid_alchemy`` scaffolds
659   inappropriately used ``DBSession.rollback()`` instead of
660   ``transaction.abort()`` in one place.
661
662 - We now clear ``request.response`` before we invoke an exception view; an
663   exception view will be working with a request.response that has not been
664   touched by any code prior to the exception.
665
666 - Views associated with routes with spaces in the route name may not have
667   been looked up correctly when using Pyramid with ``zope.interface`` 3.6.4
668   and better.  See https://github.com/Pylons/pyramid/issues/232.
669
670 Documentation
671 -------------
672
673 - Wiki2 (SQLAlchemy + URL Dispatch) tutorial ``models.initialize_sql`` didn't
674   match the ``pyramid_routesalchemy`` scaffold function of the same name; it
675   didn't get synchronized when it was changed in the scaffold.
676
677 - New documentation section in View Configuration narrative chapter:
678   "Influencing HTTP Caching".
679
680 1.1b1 (2011-07-10)
681 ==================
682
683 Features
684 --------
685
686 - It is now possible to invoke ``paster pshell`` even if the paste ini file
687   section name pointed to in its argument is not actually a Pyramid WSGI
688   application.  The shell will work in a degraded mode, and will warn the
689   user.  See "The Interactive Shell" in the "Creating a Pyramid Project"
690   narrative documentation section.
691
692 - ``paster pshell`` now offers more built-in global variables by default
693   (including ``app`` and ``settings``).  See "The Interactive Shell" in the
694   "Creating a Pyramid Project" narrative documentation section.
695
696 - It is now possible to add a ``[pshell]`` section to your application's .ini
697   configuration file, which influences the global names available to a pshell
698   session.  See "Extending the Shell" in the "Creating a Pyramid Project"
699   narrative documentation chapter.
700
701 - The ``config.scan`` method has grown a ``**kw`` argument.  ``kw`` argument
702   represents a set of keyword arguments to pass to the Venusian ``Scanner``
703   object created by Pyramid.  (See the Venusian documentation for more
704   information about ``Scanner``).
705
706 - New request property: ``json_body``. This property will return the
707   JSON-decoded variant of the request body.  If the request body is not
708   well-formed JSON, this property will raise an exception.
709
710 - A new value ``http_cache`` can be used as a view configuration
711   parameter.
712
713   When you supply an ``http_cache`` value to a view configuration, the
714   ``Expires`` and ``Cache-Control`` headers of a response generated by the
715   associated view callable are modified.  The value for ``http_cache`` may be
716   one of the following:
717
718   - A nonzero integer.  If it's a nonzero integer, it's treated as a number
719     of seconds.  This number of seconds will be used to compute the
720     ``Expires`` header and the ``Cache-Control: max-age`` parameter of
721     responses to requests which call this view.  For example:
722     ``http_cache=3600`` instructs the requesting browser to 'cache this
723     response for an hour, please'.
724
725   - A ``datetime.timedelta`` instance.  If it's a ``datetime.timedelta``
726     instance, it will be converted into a number of seconds, and that number
727     of seconds will be used to compute the ``Expires`` header and the
728     ``Cache-Control: max-age`` parameter of responses to requests which call
729     this view.  For example: ``http_cache=datetime.timedelta(days=1)``
730     instructs the requesting browser to 'cache this response for a day,
731     please'.
732
733   - Zero (``0``).  If the value is zero, the ``Cache-Control`` and
734     ``Expires`` headers present in all responses from this view will be
735     composed such that client browser cache (and any intermediate caches) are
736     instructed to never cache the response.
737
738   - A two-tuple.  If it's a two tuple (e.g. ``http_cache=(1,
739     {'public':True})``), the first value in the tuple may be a nonzero
740     integer or a ``datetime.timedelta`` instance; in either case this value
741     will be used as the number of seconds to cache the response.  The second
742     value in the tuple must be a dictionary.  The values present in the
743     dictionary will be used as input to the ``Cache-Control`` response
744     header.  For example: ``http_cache=(3600, {'public':True})`` means 'cache
745     for an hour, and add ``public`` to the Cache-Control header of the
746     response'.  All keys and values supported by the
747     ``webob.cachecontrol.CacheControl`` interface may be added to the
748     dictionary.  Supplying ``{'public':True}`` is equivalent to calling
749     ``response.cache_control.public = True``.
750
751   Providing a non-tuple value as ``http_cache`` is equivalent to calling
752   ``response.cache_expires(value)`` within your view's body.
753
754   Providing a two-tuple value as ``http_cache`` is equivalent to calling
755   ``response.cache_expires(value[0], **value[1])`` within your view's body.
756
757   If you wish to avoid influencing, the ``Expires`` header, and instead wish
758   to only influence ``Cache-Control`` headers, pass a tuple as ``http_cache``
759   with the first element of ``None``, e.g.: ``(None, {'public':True})``.
760
761 Bug Fixes
762 ---------
763
764 - Framework wrappers of the original view (such as http_cached and so on)
765   relied on being able to trust that the response they were receiving was an
766   IResponse.  It wasn't always, because the response was resolved by the
767   router instead of early in the view wrapping process.  This has been fixed.
768
769 Documentation
770 -------------
771
772 - Added a section in the "Webob" chapter named "Dealing With A JSON-Encoded
773   Request Body" (usage of ``request.json_body``).
774
775 Behavior Changes
776 ----------------
777
778 - The ``paster pshell``, ``paster proutes``, and ``paster pviews`` commands
779   now take a single argument in the form ``/path/to/config.ini#sectionname``
780   rather than the previous 2-argument spelling ``/path/to/config.ini
781   sectionname``.  ``#sectionname`` may be omitted, in which case ``#main`` is
782   assumed.
783
784 1.1a4 (2011-07-01)
785 ==================
786
787 Bug Fixes
788 ---------
789
790 - ``pyramid.testing.DummyRequest`` now raises deprecation warnings when
791   attributes deprecated for ``pyramid.request.Request`` are accessed (like
792   ``response_content_type``).  This is for the benefit of folks running unit
793   tests which use DummyRequest instead of a "real" request, so they know
794   things are deprecated without necessarily needing a functional test suite.
795
796 - The ``pyramid.events.subscriber`` directive behaved contrary to the
797   documentation when passed more than one interface object to its
798   constructor.  For example, when the following listener was registered::
799
800      @subscriber(IFoo, IBar)
801      def expects_ifoo_events_and_ibar_events(event):
802          print event
803
804   The Events chapter docs claimed that the listener would be registered and
805   listening for both ``IFoo`` and ``IBar`` events.  Instead, it registered an
806   "object event" subscriber which would only be called if an IObjectEvent was
807   emitted where the object interface was ``IFoo`` and the event interface was
808   ``IBar``.
809
810   The behavior now matches the documentation. If you were relying on the
811   buggy behavior of the 1.0 ``subscriber`` directive in order to register an
812   object event subscriber, you must now pass a sequence to indicate you'd
813   like to register a subscriber for an object event. e.g.::
814
815      @subscriber([IFoo, IBar])
816      def expects_object_event(object, event):
817          print object, event
818
819 Features
820 --------
821
822 - Add JSONP renderer (see "JSONP renderer" in the Renderers chapter of the
823   documentation).
824
825 Deprecations
826 ------------
827
828 - Deprecated the ``set_renderer_globals_factory`` method of the Configurator
829   and the ``renderer_globals`` Configurator constructor parameter.
830
831 Documentation
832 -------------
833
834 - The Wiki and Wiki2 tutorial "Tests" chapters each had two bugs: neither did
835   told the user to depend on WebTest, and 2 tests failed in each as the
836   result of changes to Pyramid itself.  These issues have been fixed.
837
838 - Move 1.0.X CHANGES.txt entries to HISTORY.txt.
839
840 1.1a3 (2011-06-26)
841 ==================
842
843 Features
844 --------
845
846 - Added ``mako.preprocessor`` config file parameter; allows for a Mako
847   preprocessor to be specified as a Python callable or Python dotted name.
848   See https://github.com/Pylons/pyramid/pull/183 for rationale.
849
850 Bug fixes
851 ---------
852
853 - Pyramid would raise an AttributeError in the Configurator when attempting
854   to set a ``__text__`` attribute on a custom predicate that was actually a
855   classmethod.  See https://github.com/Pylons/pyramid/pull/217 .
856
857 - Accessing or setting deprecated response_* attrs on request
858   (e.g. ``response_content_type``) now issues a deprecation warning at access
859   time rather than at rendering time.
860
861 1.1a2 (2011-06-22)
862 ==================
863
864 Bug Fixes
865 ---------
866
867 - 1.1a1 broke Akhet by not providing a backwards compatibility import shim
868   for ``pyramid.paster.PyramidTemplate``.  Now one has been added, although a
869   deprecation warning is emitted when Akhet imports it.
870
871 - If multiple specs were provided in a single call to
872   ``config.add_translation_dirs``, the directories were inserted into the
873   beginning of the directory list in the wrong order: they were inserted in
874   the reverse of the order they were provided in the ``*specs`` list (items
875   later in the list were added before ones earlier in the list).  This is now
876   fixed.
877
878 Backwards Incompatibilities
879 ---------------------------
880
881 - The pyramid Router attempted to set a value into the key
882   ``environ['repoze.bfg.message']`` when it caught a view-related exception
883   for backwards compatibility with applications written for ``repoze.bfg``
884   during error handling.  It did this by using code that looked like so::
885
886                     # "why" is an exception object
887                     try: 
888                         msg = why[0]
889                     except:
890                         msg = ''
891
892                     environ['repoze.bfg.message'] = msg
893
894   Use of the value ``environ['repoze.bfg.message']`` was docs-deprecated in
895   Pyramid 1.0.  Our standing policy is to not remove features after a
896   deprecation for two full major releases, so this code was originally slated
897   to be removed in Pyramid 1.2.  However, computing the
898   ``repoze.bfg.message`` value was the source of at least one bug found in
899   the wild (https://github.com/Pylons/pyramid/issues/199), and there isn't a
900   foolproof way to both preserve backwards compatibility and to fix the bug.
901   Therefore, the code which sets the value has been removed in this release.
902   Code in exception views which relies on this value's presence in the
903   environment should now use the ``exception`` attribute of the request
904   (e.g. ``request.exception[0]``) to retrieve the message instead of relying
905   on ``request.environ['repoze.bfg.message']``.
906
907 1.1a1 (2011-06-20)
908 ==================
909
910 Documentation
911 -------------
912
913 - The term "template" used to refer to both "paster templates" and "rendered
914   templates" (templates created by a rendering engine.  i.e. Mako, Chameleon,
915   Jinja, etc.).  "Paster templates" will now be refered to as "scaffolds",
916   whereas the name for "rendered templates" will remain as "templates."
917
918 - The ``wiki`` (ZODB+Traversal) tutorial was updated slightly.
919
920 - The ``wiki2`` (SQLA+URL Dispatch) tutorial was updated slightly.
921
922 - Make ``pyramid.interfaces.IAuthenticationPolicy`` and
923   ``pyramid.interfaces.IAuthorizationPolicy`` public interfaces, and refer to
924   them within the ``pyramid.authentication`` and ``pyramid.authorization``
925   API docs.
926
927 - Render the function definitions for each exposed interface in
928   ``pyramid.interfaces``.
929
930 - Add missing docs reference to
931   ``pyramid.config.Configurator.set_view_mapper`` and refer to it within
932   Hooks chapter section named "Using a View Mapper".
933
934 - Added section to the "Environment Variables and ``.ini`` File Settings"
935   chapter in the narrative documentation section entitled "Adding a Custom
936   Setting".
937
938 - Added documentation for a "multidict" (e.g. the API of ``request.POST``) as
939   interface API documentation.
940
941 - Added a section to the "URL Dispatch" narrative chapter regarding the new
942   "static" route feature.
943
944 - Added "What's New in Pyramid 1.1" to HTML rendering of documentation.
945
946 - Added API docs for ``pyramid.authentication.SessionAuthenticationPolicy``.
947
948 - Added API docs for ``pyramid.httpexceptions.exception_response``.
949
950 - Added "HTTP Exceptions" section to Views narrative chapter including a
951   description of ``pyramid.httpexceptions.exception_response``.
952
953 Features
954 --------
955
956 - Add support for language fallbacks: when trying to translate for a
957   specific territory (such as ``en_GB``) fall back to translations
958   for the language (ie ``en``). This brings the translation behaviour in line
959   with GNU gettext and fixes partially translated texts when using C
960   extensions.
961
962 - New authentication policy:
963   ``pyramid.authentication.SessionAuthenticationPolicy``, which uses a session
964   to store credentials.
965
966 - Accessing the ``response`` attribute of a ``pyramid.request.Request``
967   object (e.g. ``request.response`` within a view) now produces a new
968   ``pyramid.response.Response`` object.  This feature is meant to be used
969   mainly when a view configured with a renderer needs to set response
970   attributes: all renderers will use the Response object implied by
971   ``request.response`` as the response object returned to the router.
972
973   ``request.response`` can also be used by code in a view that does not use a
974   renderer, however the response object that is produced by
975   ``request.response`` must be returned when a renderer is not in play (it is
976   not a "global" response).
977
978 - Integers and longs passed as ``elements`` to ``pyramid.url.resource_url``
979   or ``pyramid.request.Request.resource_url`` e.g. ``resource_url(context,
980   request, 1, 2)`` (``1`` and ``2`` are the ``elements``) will now be
981   converted implicitly to strings in the result.  Previously passing integers
982   or longs as elements would cause a TypeError.
983
984 - ``pyramid_alchemy`` paster template now uses ``query.get`` rather than
985   ``query.filter_by`` to take better advantage of identity map caching.
986
987 - ``pyramid_alchemy`` paster template now has unit tests.
988
989 - Added ``pyramid.i18n.make_localizer`` API (broken out from
990   ``get_localizer`` guts).
991
992 - An exception raised by a NewRequest event subscriber can now be caught by
993   an exception view.
994
995 - It is now possible to get information about why Pyramid raised a Forbidden
996   exception from within an exception view.  The ``ACLDenied`` object returned
997   by the ``permits`` method of each stock authorization policy
998   (``pyramid.interfaces.IAuthorizationPolicy.permits``) is now attached to
999   the Forbidden exception as its ``result`` attribute.  Therefore, if you've
1000   created a Forbidden exception view, you can see the ACE, ACL, permission,
1001   and principals involved in the request as
1002   eg. ``context.result.permission``, ``context.result.acl``, etc within the
1003   logic of the Forbidden exception view.
1004
1005 - Don't explicitly prevent the ``timeout`` from being lower than the
1006   ``reissue_time`` when setting up an ``AuthTktAuthenticationPolicy``
1007   (previously such a configuration would raise a ``ValueError``, now it's
1008   allowed, although typically nonsensical).  Allowing the nonsensical
1009   configuration made the code more understandable and required fewer tests.
1010
1011 - A new paster command named ``paster pviews`` was added.  This command
1012   prints a summary of potentially matching views for a given path.  See the
1013   section entitled "Displaying Matching Views for a Given URL" in the "View
1014   Configuration" chapter of the narrative documentation for more information.
1015
1016 - The ``add_route`` method of the Configurator now accepts a ``static``
1017   argument.  If this argument is ``True``, the added route will never be
1018   considered for matching when a request is handled.  Instead, it will only
1019   be useful for URL generation via ``route_url`` and ``route_path``.  See the
1020   section entitled "Static Routes" in the URL Dispatch narrative chapter for
1021   more information.
1022
1023 - A default exception view for the context
1024   ``pyramid.interfaces.IExceptionResponse`` is now registered by default.
1025   This means that an instance of any exception response class imported from
1026   ``pyramid.httpexceptions`` (such as ``HTTPFound``) can now be raised from
1027   within view code; when raised, this exception view will render the
1028   exception to a response.
1029
1030 - A function named ``pyramid.httpexceptions.exception_response`` is a
1031   shortcut that can be used to create HTTP exception response objects using
1032   an HTTP integer status code.
1033
1034 - The Configurator now accepts an additional keyword argument named
1035   ``exceptionresponse_view``.  By default, this argument is populated with a
1036   default exception view function that will be used when a response is raised
1037   as an exception. When ``None`` is passed for this value, an exception view
1038   for responses will not be registered.  Passing ``None`` returns the
1039   behavior of raising an HTTP exception to that of Pyramid 1.0 (the exception
1040   will propagate to middleware and to the WSGI server).
1041
1042 - The ``pyramid.request.Request`` class now has a ``ResponseClass`` interface
1043   which points at ``pyramid.response.Response``.
1044
1045 - The ``pyramid.response.Response`` class now has a ``RequestClass``
1046   interface which points at ``pyramid.request.Request``.
1047
1048 - It is now possible to return an arbitrary object from a Pyramid view
1049   callable even if a renderer is not used, as long as a suitable adapter to
1050   ``pyramid.interfaces.IResponse`` is registered for the type of the returned
1051   object by using the new
1052   ``pyramid.config.Configurator.add_response_adapter`` API.  See the section
1053   in the Hooks chapter of the documentation entitled "Changing How Pyramid
1054   Treats View Responses".
1055
1056 - The Pyramid router will now, by default, call the ``__call__`` method of
1057   WebOb response objects when returning a WSGI response.  This means that,
1058   among other things, the ``conditional_response`` feature of WebOb response
1059   objects will now behave properly.
1060
1061 - New method named ``pyramid.request.Request.is_response``.  This method
1062   should be used instead of the ``pyramid.view.is_response`` function, which
1063   has been deprecated.
1064
1065 Bug Fixes
1066 ---------
1067
1068 - URL pattern markers used in URL dispatch are permitted to specify a custom
1069   regex. For example, the pattern ``/{foo:\d+}`` means to match ``/12345``
1070   (foo==12345 in the match dictionary) but not ``/abc``. However, custom
1071   regexes in a pattern marker which used squiggly brackets did not work. For
1072   example, ``/{foo:\d{4}}`` would fail to match ``/1234`` and
1073   ``/{foo:\d{1,2}}`` would fail to match ``/1`` or ``/11``. One level of
1074   inner squiggly brackets is now recognized so that the prior two patterns
1075   given as examples now work. See also
1076   https://github.com/Pylons/pyramid/issues/#issue/123.
1077
1078 - Don't send port numbers along with domain information in cookies set by
1079   AuthTktCookieHelper (see https://github.com/Pylons/pyramid/issues/131).
1080
1081 - ``pyramid.url.route_path`` (and the shortcut
1082   ``pyramid.request.Request.route_url`` method) now include the WSGI
1083   SCRIPT_NAME at the front of the path if it is not empty (see
1084   https://github.com/Pylons/pyramid/issues/135).
1085
1086 - ``pyramid.testing.DummyRequest`` now has a ``script_name`` attribute (the
1087   empty string).
1088
1089 - Don't quote ``:@&+$,`` symbols in ``*elements`` passed to
1090   ``pyramid.url.route_url`` or ``pyramid.url.resource_url`` (see
1091   https://github.com/Pylons/pyramid/issues#issue/141).
1092
1093 - Include SCRIPT_NAME in redirects issued by
1094   ``pyramid.view.append_slash_notfound_view`` (see
1095   https://github.com/Pylons/pyramid/issues#issue/149).
1096
1097 - Static views registered with ``config.add_static_view`` which also included
1098   a ``permission`` keyword argument would not work as expected, because
1099   ``add_static_view`` also registered a route factory internally.  Because a
1100   route factory was registered internally, the context checked by the Pyramid
1101   permission machinery never had an ACL.  ``add_static_view`` no longer
1102   registers a route with a factory, so the default root factory will be used.
1103
1104 - ``config.add_static_view`` now passes extra keyword arguments it receives
1105   to ``config.add_route`` (calling add_static_view is mostly logically
1106   equivalent to adding a view of the type ``pyramid.static.static_view``
1107   hooked up to a route with a subpath).  This makes it possible to pass e.g.,
1108   ``factory=`` to ``add_static_view`` to protect a particular static view
1109   with a custom ACL.
1110
1111 - ``testing.DummyRequest`` used the wrong registry (the global registry) as
1112   ``self.registry`` if a dummy request was created *before* ``testing.setUp``
1113   was executed (``testing.setUp`` pushes a local registry onto the
1114   threadlocal stack). Fixed by implementing ``registry`` as a property for
1115   DummyRequest instead of eagerly assigning an attribute.
1116   See also https://github.com/Pylons/pyramid/issues/165
1117
1118 - When visiting a URL that represented a static view which resolved to a
1119   subdirectory, the ``index.html`` of that subdirectory would not be served
1120   properly.  Instead, a redirect to ``/subdir`` would be issued.  This has
1121   been fixed, and now visiting a subdirectory that contains an ``index.html``
1122   within a static view returns the index.html properly.  See also
1123   https://github.com/Pylons/pyramid/issues/67.
1124
1125 - Redirects issued by a static view did not take into account any existing
1126   ``SCRIPT_NAME`` (such as one set by a url mapping composite).  Now they do.
1127
1128 - The ``pyramid.wsgi.wsgiapp2`` decorator did not take into account the
1129   ``SCRIPT_NAME`` in the origin request.
1130
1131 - The ``pyramid.wsgi.wsgiapp2`` decorator effectively only worked when it
1132   decorated a view found via traversal; it ignored the ``PATH_INFO`` that was
1133   part of a url-dispatch-matched view.
1134
1135 Deprecations
1136 ------------
1137
1138 - Deprecated all assignments to ``request.response_*`` attributes (for
1139   example ``request.response_content_type = 'foo'`` is now deprecated).
1140   Assignments and mutations of assignable request attributes that were
1141   considered by the framework for response influence are now deprecated:
1142   ``response_content_type``, ``response_headerlist``, ``response_status``,
1143   ``response_charset``, and ``response_cache_for``.  Instead of assigning
1144   these to the request object for later detection by the rendering machinery,
1145   users should use the appropriate API of the Response object created by
1146   accessing ``request.response`` (e.g. code which does
1147   ``request.response_content_type = 'abc'`` should be changed to
1148   ``request.response.content_type = 'abc'``).
1149
1150 - Passing view-related parameters to
1151   ``pyramid.config.Configurator.add_route`` is now deprecated.  Previously, a
1152   view was permitted to be connected to a route using a set of ``view*``
1153   parameters passed to the ``add_route`` method of the Configurator.  This
1154   was a shorthand which replaced the need to perform a subsequent call to
1155   ``add_view``. For example, it was valid (and often recommended) to do::
1156
1157      config.add_route('home', '/', view='mypackage.views.myview',
1158                        view_renderer='some/renderer.pt')
1159
1160   Passing ``view*`` arguments to ``add_route`` is now deprecated in favor of
1161   connecting a view to a predefined route via ``Configurator.add_view`` using
1162   the route's ``route_name`` parameter.  As a result, the above example
1163   should now be spelled::
1164
1165      config.add_route('home', '/')
1166      config.add_view('mypackage.views.myview', route_name='home')
1167                      renderer='some/renderer.pt')
1168
1169   This deprecation was done to reduce confusion observed in IRC, as well as
1170   to (eventually) reduce documentation burden (see also
1171   https://github.com/Pylons/pyramid/issues/164).  A deprecation warning is
1172   now issued when any view-related parameter is passed to
1173   ``Configurator.add_route``.
1174
1175 - Passing an ``environ`` dictionary to the ``__call__`` method of a
1176   "traverser" (e.g. an object that implements
1177   ``pyramid.interfaces.ITraverser`` such as an instance of
1178   ``pyramid.traversal.ResourceTreeTraverser``) as its ``request`` argument
1179   now causes a deprecation warning to be emitted.  Consumer code should pass a
1180   ``request`` object instead.  The fact that passing an environ dict is
1181   permitted has been documentation-deprecated since ``repoze.bfg`` 1.1, and
1182   this capability will be removed entirely in a future version.
1183
1184 - The following (undocumented, dictionary-like) methods of the
1185   ``pyramid.request.Request`` object have been deprecated: ``__contains__``,
1186   ``__delitem__``, ``__getitem__``, ``__iter__``, ``__setitem__``, ``get``,
1187   ``has_key``, ``items``, ``iteritems``, ``itervalues``, ``keys``, ``pop``,
1188   ``popitem``, ``setdefault``, ``update``, and ``values``.  Usage of any of
1189   these methods will cause a deprecation warning to be emitted.  These
1190   methods were added for internal compatibility in ``repoze.bfg`` 1.1 (code
1191   that currently expects a request object expected an environ object in BFG
1192   1.0 and before).  In a future version, these methods will be removed
1193   entirely.
1194
1195 - Deprecated ``pyramid.view.is_response`` function in favor of (newly-added)
1196   ``pyramid.request.Request.is_response`` method.  Determining if an object
1197   is truly a valid response object now requires access to the registry, which
1198   is only easily available as a request attribute.  The
1199   ``pyramid.view.is_response`` function will still work until it is removed,
1200   but now may return an incorrect answer under some (very uncommon)
1201   circumstances.
1202
1203 Behavior Changes
1204 ----------------
1205
1206 - The default Mako renderer is now configured to escape all HTML in
1207   expression tags. This is intended to help prevent XSS attacks caused by
1208   rendering unsanitized input from users. To revert this behavior in user's
1209   templates, they need to filter the expression through the 'n' filter.
1210   For example, ${ myhtml | n }.
1211   See https://github.com/Pylons/pyramid/issues/193.
1212
1213 - A custom request factory is now required to return a request object that
1214   has a ``response`` attribute (or "reified"/lazy property) if they the
1215   request is meant to be used in a view that uses a renderer.  This
1216   ``response`` attribute should be an instance of the class
1217   ``pyramid.response.Response``.
1218
1219 - The JSON and string renderer factories now assign to
1220   ``request.response.content_type`` rather than
1221   ``request.response_content_type``.
1222
1223 - Each built-in renderer factory now determines whether it should change the
1224   content type of the response by comparing the response's content type
1225   against the response's default content type; if the content type is the
1226   default content type (usually ``text/html``), the renderer changes the
1227   content type (to ``application/json`` or ``text/plain`` for JSON and string
1228   renderers respectively).
1229
1230 - The ``pyramid.wsgi.wsgiapp2`` now uses a slightly different method of
1231   figuring out how to "fix" ``SCRIPT_NAME`` and ``PATH_INFO`` for the
1232   downstream application.  As a result, those values may differ slightly from
1233   the perspective of the downstream application (for example, ``SCRIPT_NAME``
1234   will now never possess a trailing slash).
1235
1236 - Previously, ``pyramid.request.Request`` inherited from
1237   ``webob.request.Request`` and implemented ``__getattr__``, ``__setattr__``
1238   and ``__delattr__`` itself in order to overidde "adhoc attr" WebOb behavior
1239   where attributes of the request are stored in the environ.  Now,
1240   ``pyramid.request.Request`` object inherits from (the more recent)
1241   ``webob.request.BaseRequest`` instead of ``webob.request.Request``, which
1242   provides the same behavior.  ``pyramid.request.Request`` no longer
1243   implements its own ``__getattr__``, ``__setattr__`` or ``__delattr__`` as a
1244   result.
1245
1246 - ``pyramid.response.Response`` is now a *subclass* of
1247   ``webob.response.Response`` (in order to directly implement the
1248   ``pyramid.interfaces.IResponse`` interface).
1249
1250 - The "exception response" objects importable from ``pyramid.httpexceptions``
1251   (e.g. ``HTTPNotFound``) are no longer just import aliases for classes that
1252   actually live in ``webob.exc``.  Instead, we've defined our own exception
1253   classes within the module that mirror and emulate the ``webob.exc``
1254   exception response objects almost entirely.  See the "Design Defense" doc
1255   section named "Pyramid Uses its Own HTTP Exception Classes" for more
1256   information.
1257
1258 Backwards Incompatibilities
1259 ---------------------------
1260
1261 - Pyramid no longer supports Python 2.4.  Python 2.5 or better is required to
1262   run Pyramid 1.1+.
1263
1264 - The Pyramid router now, by default, expects response objects returned from
1265   view callables to implement the ``pyramid.interfaces.IResponse`` interface.
1266   Unlike the Pyramid 1.0 version of this interface, objects which implement
1267   IResponse now must define a ``__call__`` method that accepts ``environ``
1268   and ``start_response``, and which returns an ``app_iter`` iterable, among
1269   other things.  Previously, it was possible to return any object which had
1270   the three WebOb ``app_iter``, ``headerlist``, and ``status`` attributes as
1271   a response, so this is a backwards incompatibility.  It is possible to get
1272   backwards compatibility back by registering an adapter to IResponse from
1273   the type of object you're now returning from view callables.  See the
1274   section in the Hooks chapter of the documentation entitled "Changing How
1275   Pyramid Treats View Responses".
1276
1277 - The ``pyramid.interfaces.IResponse`` interface is now much more extensive.
1278   Previously it defined only ``app_iter``, ``status`` and ``headerlist``; now
1279   it is basically intended to directly mirror the ``webob.Response`` API,
1280   which has many methods and attributes.
1281
1282 - The ``pyramid.httpexceptions`` classes named ``HTTPFound``,
1283   ``HTTPMultipleChoices``, ``HTTPMovedPermanently``, ``HTTPSeeOther``,
1284   ``HTTPUseProxy``, and ``HTTPTemporaryRedirect`` now accept ``location`` as
1285   their first positional argument rather than ``detail``.  This means that
1286   you can do, e.g. ``return pyramid.httpexceptions.HTTPFound('http://foo')``
1287   rather than ``return
1288   pyramid.httpexceptions.HTTPFound(location='http//foo')`` (the latter will
1289   of course continue to work).
1290
1291 Dependencies
1292 ------------
1293
1294 - Pyramid now depends on WebOb >= 1.0.2 as tests depend on the bugfix in that
1295   release: "Fix handling of WSGI environs with missing ``SCRIPT_NAME``".
1296   (Note that in reality, everyone should probably be using 1.0.4 or better
1297   though, as WebOb 1.0.2 and 1.0.3 were effectively brownbag releases.)
1298
e21ed8 1299 1.0 (2011-01-30)
CM 1300 ================
1301
1302 Documentation
1303 -------------
1304
1305 - Fixed bug in ZODB Wiki tutorial (missing dependency on ``docutils`` in
1306   "models" step within ``setup.py``).
1307
1308 - Removed API documentation for ``pyramid.testing`` APIs named
1309   ``registerDummySecurityPolicy``, ``registerResources``, ``registerModels``,
1310   ``registerEventListener``, ``registerTemplateRenderer``,
1311   ``registerDummyRenderer``, ``registerView``, ``registerUtility``,
1312   ``registerAdapter``, ``registerSubscriber``, ``registerRoute``,
1313   and ``registerSettings``.
1314
1315 - Moved "Using ZODB With ZEO" and "Using repoze.catalog Within Pyramid"
1316   tutorials out of core documentation and into the Pyramid Tutorials site
1317   (http://docs.pylonsproject.org/projects/pyramid_tutorials/dev/).
1318
1319 - Changed "Cleaning up After a Request" section in the URL Dispatch chapter
1320   to use ``request.add_finished_callback`` instead of jamming an object with
1321   a ``__del__`` into the WSGI environment.
1322
1323 - Remove duplication of ``add_route`` API documentation from URL Dispatch
1324   narrative chapter.
1325
1326 - Remove duplication of API and narrative documentation in
1327   ``pyramid.view.view_config`` API docs by pointing to
1328   ``pyramid.config.add_view`` documentation and narrative chapter
1329   documentation.
1330
1331 - Removed some API documentation duplicated in narrative portions of
1332   documentation 
1333
1334 - Removed "Overall Flow of Authentication" from SQLAlchemy + URL Dispatch
1335   wiki tutorial due to print space concerns (moved to Pyramid Tutorials
1336   site).
1337
1338 Bug Fixes
1339 ---------
1340
1341 - Deprecated-since-BFG-1.2 APIs from ``pyramid.testing`` now properly emit
1342   deprecation warnings.
1343
1344 - Added ``egg:repoze.retry#retry`` middleware to the WSGI pipeline in ZODB
1345   templates (retry ZODB conflict errors which occur in normal operations).
1346
1347 - Removed duplicate implementations of ``is_response``.  Two competing
1348   implementations existed: one in ``pyramid.config`` and one in
1349   ``pyramid.view``.  Now the one defined in ``pyramid.view`` is used
1350   internally by ``pyramid.config`` and continues to be advertised as an API.
1351
1352 1.0b3 (2011-01-28)
1353 ==================
1354
1355 Bug Fixes
1356 ---------
1357
1358 - Use © instead of copyright symbol in paster templates / tutorial
1359   templates for the benefit of folks who cutnpaste and save to a non-UTF8
1360   format.
1361
1362 - ``pyramid.view.append_slash_notfound_view`` now preserves GET query
1363   parameters across redirects.
1364
1365 Documentation
1366 -------------
1367
1368 - Beef up documentation related to ``set_default_permission``: explicitly
1369   mention that default permissions also protect exception views.
1370
1371 - Paster templates and tutorials now use spaces instead of tabs in their HTML
1372   templates.
1373
1374 1.0b2 (2011-01-24)
1375 ==================
1376
1377 Bug Fixes
1378 ---------
1379
1380 - The ``production.ini`` generated by all paster templates now have an
1381   effective logging level of WARN, which prevents e.g. SQLAlchemy statement
1382   logging and other inappropriate output.
1383
1384 - The ``production.ini`` of the ``pyramid_routesalchemy`` and
1385   ``pyramid_alchemy`` paster templates did not have a ``sqlalchemy`` logger
1386   section, preventing ``paster serve production.ini`` from working.
1387
1388 - The ``pyramid_routesalchemy`` and ``pyramid_alchemy`` paster templates used
1389   the ``{{package}}`` variable in a place where it should have used the
1390   ``{{project}}`` variable, causing applications created with uppercase
1391   letters e.g. ``paster create -t pyramid_routesalchemy Dibbus`` to fail to
1392   start when ``paster serve development.ini`` was used against the result.
1393   See https://github.com/Pylons/pyramid/issues/#issue/107
1394
1395 - The ``render_view`` method of ``pyramid.renderers.RendererHelper`` passed
1396   an incorrect value into the renderer for ``renderer_info``.  It now passes
1397   an instance of ``RendererHelper`` instead of a dictionary, which is
1398   consistent with other usages.  See
1399   https://github.com/Pylons/pyramid/issues#issue/106
1400
1401 - A bug existed in the ``pyramid.authentication.AuthTktCookieHelper`` which
1402   would break any usage of an AuthTktAuthenticationPolicy when one was
1403   configured to reissue its tokens (``reissue_time`` < ``timeout`` /
1404   ``max_age``). Symptom: ``ValueError: ('Invalid token %r', '')``.  See
1405   https://github.com/Pylons/pyramid/issues#issue/108.
1406
1407 1.0b1 (2011-01-21)
1408 ==================
1409
1410 Features
1411 --------
1412
1413 - The AuthTktAuthenticationPolicy now accepts a ``tokens`` parameter via
1414   ``pyramid.security.remember``.  The value must be a sequence of strings.
1415   Tokens are placed into the auth_tkt "tokens" field and returned in the
1416   auth_tkt cookie.
1417
1418 - Add ``wild_domain`` argument to AuthTktAuthenticationPolicy, which defaults
1419   to ``True``.  If it is set to ``False``, the feature of the policy which
1420   sets a cookie with a wilcard domain will be turned off.
1421
1422 - Add a ``MANIFEST.in`` file to each paster template. See
1423   https://github.com/Pylons/pyramid/issues#issue/95
1424
1425 Bug Fixes
1426 ---------
1427
1428 - ``testing.setUp`` now adds a ``settings`` attribute to the registry (both
1429   when it's passed a registry without any settings and when it creates one).
1430
1431 - The ``testing.setUp`` function now takes a ``settings`` argument, which
1432   should be a dictionary.  Its values will subsequently be available on the
1433   returned ``config`` object as ``config.registry.settings``.
1434
1435 Documentation
1436 -------------
1437
1438 - Added "What's New in Pyramid 1.0" chapter to HTML rendering of
1439   documentation.
1440
1441 - Merged caseman-master narrative editing branch, many wording fixes and
1442   extensions.
1443
1444 - Fix deprecated example showing ``chameleon_zpt`` API call in testing
1445   narrative chapter.
1446
1447 - Added "Adding Methods to the Configurator via ``add_directive``" section to
1448   Advanced Configuration narrative chapter.
1449
1450 - Add docs for ``add_finished_callback``, ``add_response_callback``,
1451   ``route_path``, ``route_url``, and ``static_url`` methods to
1452   ``pyramid.request.Request`` API docs.
1453
1454 - Add (minimal) documentation about using I18N within Mako templates to
1455   "Internationalization and Localization" narrative chapter.
1456
1457 - Move content of "Forms" chapter back to "Views" chapter; I can't think of a
1458   better place to put it.
1459
1460 - Slightly improved interface docs for ``IAuthorizationPolicy``.
1461
1462 - Minimally explain usage of custom regular expressions in URL dispatch
1463   replacement markers within URL Dispatch chapter.
1464
1465 Deprecations
1466 -------------
1467
1468 - Using the ``pyramid.view.bfg_view`` alias for ``pyramid.view.view_config``
1469   (a backwards compatibility shim) now issues a deprecation warning.
1470
1471 Backwards Incompatibilities
1472 ---------------------------
1473
1474 - Using ``testing.setUp`` now registers an ISettings utility as a side
1475   effect.  Some test code which queries for this utility after
1476   ``testing.setUp`` via queryAdapter will expect a return value of ``None``.
1477   This code will need to be changed.
1478
1479 - When a ``pyramid.exceptions.Forbidden`` error is raised, its status code
1480   now ``403 Forbidden``.  It was previously ``401 Unauthorized``, for
1481   backwards compatibility purposes with ``repoze.bfg``.  This change will
1482   cause problems for users of Pyramid with ``repoze.who``, which intercepts
1483   ``401 Unauthorized`` by default, but allows ``403 Forbidden`` to pass
1484   through.  Those deployments will need to configure ``repoze.who`` to also
1485   react to ``403 Forbidden``.
1486
1487 - The default value for the ``cookie_on_exception`` parameter to
1488   ``pyramid.session.UnencyrptedCookieSessionFactory`` is now ``True``.  This
1489   means that when view code causes an exception to be raised, and the session
1490   has been mutated, a cookie will be sent back in the response.  Previously
1491   its default value was ``False``.
1492
1493 Paster Templates
1494 ----------------
1495
1496 - The ``pyramid_zodb``, ``pyramid_routesalchemy`` and ``pyramid_alchemy``
1497   paster templates now use a default "commit veto" hook when configuring the
1498   ``repoze.tm2`` transaction manager in ``development.ini``.  This prevents a
1499   transaction from being committed when the response status code is within
1500   the 400 or 500 ranges.  See also
1501   http://docs.repoze.org/tm2/#using-a-commit-veto.
1502
1503 1.0a10 (2011-01-18)
1504 ===================
1505
1506 Bug Fixes
1507 ---------
1508
1509 - URL dispatch now properly handles a ``.*`` or ``*`` appearing in a regex
1510   match when used inside brackets.  Resolves issue #90.
1511
1512 Backwards Incompatibilities
1513 ---------------------------
1514
1515 - The ``add_handler`` method of a Configurator has been removed from the
1516   Pyramid core.  Handlers are now a feature of the ``pyramid_handlers``
1517   package, which can be downloaded from PyPI.  Documentation for the package
1518   should be available via
1519   http://pylonsproject.org/projects/pyramid_handlers/dev/, which describes how
1520   to add a configuration statement to your ``main`` block to reobtain this
1521   method.  You will also need to add an ``install_requires`` dependency upon
1522   ``pyramid_handlers`` to your ``setup.py`` file.
1523
1524 - The ``load_zcml`` method of a Configurator has been removed from the
1525   Pyramid core.  Loading ZCML is now a feature of the ``pyramid_zcml``
1526   package, which can be downloaded from PyPI.  Documentation for the package
1527   should be available via
1528   http://pylonsproject.org/projects/pyramid_zcml/dev/, which describes how
1529   to add a configuration statement to your ``main`` block to reobtain this
1530   method.  You will also need to add an ``install_requires`` dependency upon
1531   ``pyramid_zcml`` to your ``setup.py`` file.
1532
1533 - The ``pyramid.includes`` subpackage has been removed.  ZCML files which use
1534   include the package ``pyramid.includes`` (e.g. ``<include
1535   package="pyramid.includes"/>``) now must include the ``pyramid_zcml``
1536   package instead (e.g. ``<include package="pyramid_zcml"/>``).
1537
1538 - The ``pyramid.view.action`` decorator has been removed from the Pyramid
1539   core.  Handlers are now a feature of the ``pyramid_handlers`` package.  It
1540   should now be imported from ``pyramid_handlers`` e.g. ``from
1541   pyramid_handlers import action``.
1542
1543 - The ``handler`` ZCML directive has been removed.  It is now a feature of
1544   the ``pyramid_handlers`` package.
1545
1546 - The ``pylons_minimal``, ``pylons_basic`` and ``pylons_sqla`` paster
1547   templates were removed.  Use ``pyramid_sqla`` (available from PyPI) as a
1548   generic replacement for Pylons-esque development.
1549
1550 - The ``make_app`` function has been removed from the ``pyramid.router``
1551   module.  It continues life within the ``pyramid_zcml`` package.  This
1552   leaves the ``pyramid.router`` module without any API functions.
1553
1554 - The ``configure_zcml`` setting within the deployment settings (within
1555   ``**settings`` passed to a Pyramid ``main`` function) has ceased to have any
1556   meaning.
1557
1558 Features
1559 --------
1560
1561 - ``pyramid.testing.setUp`` and ``pyramid.testing.tearDown`` have been
1562   undeprecated.  They are now the canonical setup and teardown APIs for test
1563   configuration, replacing "direct" creation of a Configurator.  This is a
1564   change designed to provide a facade that will protect against any future
1565   Configurator deprecations.
1566
1567 - Add ``charset`` attribute to ``pyramid.testing.DummyRequest``
1568   (unconditionally ``UTF-8``).
1569
1570 - Add ``add_directive`` method to configurator, which allows framework
1571   extenders to add methods to the configurator (ala ZCML directives).
1572
1573 - When ``Configurator.include`` is passed a *module* as an argument, it
1574   defaults to attempting to find and use a callable named ``includeme``
1575   within that module.  This makes it possible to use
1576   ``config.include('some.module')`` rather than
1577   ``config.include('some.module.somefunc')`` as long as the include function
1578   within ``some.module`` is named ``includeme``.
1579
1580 - The ``bfg2pyramid`` script now converts ZCML include tags that have
1581   ``repoze.bfg.includes`` as a package attribute to the value
1582   ``pyramid_zcml``.  For example, ``<include package="repoze.bfg.includes">``
1583   will be converted to ``<include package="pyramid_zcml">``.
1584
1585 Paster Templates
1586 ----------------
1587
1588 - All paster templates now use ``pyramid.testing.setUp`` and
1589   ``pyramid.testing.tearDown`` rather than creating a Configurator "by hand"
1590   within their ``tests.py`` module, as per decision in features above.
1591
1592 - The ``starter_zcml`` paster template has been moved to the ``pyramid_zcml``
1593   package.
1594
1595 Documentation
1596 -------------
1597
1598 - The wiki and wiki2 tutorials now use ``pyramid.testing.setUp`` and
1599   ``pyramid.testing.tearDown`` rather than creating a Configurator "by hand",
1600   as per decision in features above.
1601
1602 - The "Testing" narrative chapter now explains ``pyramid.testing.setUp`` and
1603   ``pyramid.testing.tearDown`` instead of Configurator creation and
1604   ``Configurator.begin()`` and ``Configurator.end()``.
1605
1606 - Document the ``request.override_renderer`` attribute within the narrative
1607   "Renderers" chapter in a section named "Overriding A Renderer at Runtime".
1608
1609 - The "Declarative Configuration" narrative chapter has been removed (it was
1610   moved to the ``pyramid_zcml`` package).
1611
1612 - Most references to ZCML in narrative chapters have been removed or
1613   redirected to ``pyramid_zcml`` locations.
1614
1615 Deprecations
1616 ------------
1617
1618 - Deprecation warnings related to import of the following API functions were
1619   added: ``pyramid.traversal.find_model``, ``pyramid.traversal.model_path``,
1620   ``pyramid.traversal.model_path_tuple``, ``pyramid.url.model_url``.  The
1621   instructions emitted by the deprecation warnings instruct the developer to
1622   change these method spellings to their ``resource`` equivalents.  This is a
1623   consequence of the mass concept rename of "model" to "resource" performed
1624   in 1.0a7.
1625
1626 1.0a9 (2011-01-08)
1627 ==================
1628
1629 Bug Fixes
1630 ---------
1631
1632 - The ``proutes`` command tried too hard to resolve the view for printing,
1633   resulting in exceptions when an exceptional root factory was encountered.
1634   Instead of trying to resolve the view, if it cannot, it will now just print
1635   ``<unknown>``.
1636
1637 - The `self` argument was included in new methods of the ``ISession`` interface
1638   signature, causing ``pyramid_beaker`` tests to fail.
1639
1640 - Readd ``pyramid.traversal.model_path_tuple`` as an alias for
1641   ``pyramid.traversal.resource_path_tuple`` for backwards compatibility.
1642
1643 Features
1644 --------
1645
1646 - Add a new API ``pyramid.url.current_route_url``, which computes a URL based
1647   on the "current" route (if any) and its matchdict values.
1648
1649 - ``config.add_view`` now accepts a ``decorator`` keyword argument, a callable
1650   which will decorate the view callable before it is added to the registry.
1651
1652 - If a handler class provides an ``__action_decorator__`` attribute (usually
1653   a classmethod or staticmethod), use that as the decorator for each view
1654   registration for that handler.
1655
1656 - The ``pyramid.interfaces.IAuthenticationPolicy`` interface now specifies an
1657   ``unauthenticated_userid`` method.  This method supports an important
1658   optimization required by people who are using persistent storages which do
1659   not support object caching and whom want to create a "user object" as a
1660   request attribute.
1661
1662 - A new API has been added to the ``pyramid.security`` module named
1663   ``unauthenticated_userid``.  This API function calls the
1664   ``unauthenticated_userid`` method of the effective security policy.
1665
1666 - An ``unauthenticated_userid`` method has been added to the dummy
1667   authentication policy returned by
1668   ``pyramid.config.Configurator.testing_securitypolicy``.  It returns the
1669   same thing as that the dummy authentication policy's
1670   ``authenticated_userid`` method.
1671
1672 - The class ``pyramid.authentication.AuthTktCookieHelper`` is now an API.
1673   This class can be used by third-party authentication policy developers to
1674   help in the mechanics of authentication cookie-setting.
1675
1676 - New constructor argument to Configurator: ``default_view_mapper``.  Useful
1677   to create systems that have alternate view calling conventions.  A view
1678   mapper allows objects that are meant to be used as view callables to have
1679   an arbitrary argument list and an arbitrary result.  The object passed as
1680   ``default_view_mapper`` should implement the
1681   ``pyramid.interfaces.IViewMapperFactory`` interface.
1682
1683 - add a ``set_view_mapper`` API to Configurator.  Has
1684   the same result as passing ``default_view_mapper`` to the Configurator
1685   constructor.
1686
1687 - ``config.add_view`` now accepts a ``mapper`` keyword argument, which should
1688   either be ``None``, a string representing a Python dotted name, or an
1689   object which is an ``IViewMapperFactory``.  This feature is not useful for
1690   "civilians", only for extension writers.
1691
1692 - Allow static renderer provided during view registration to be overridden at
1693   request time via a request attribute named ``override_renderer``, which
1694   should be the name of a previously registered renderer.  Useful to provide
1695   "omnipresent" RPC using existing rendered views.
1696
1697 - Instances of ``pyramid.testing.DummyRequest`` now have a ``session``
1698   object, which is mostly a dictionary, but also implements the other session
1699   API methods for flash and CSRF.
1700
1701 Backwards Incompatibilities
1702 ---------------------------
1703
1704 - Since the ``pyramid.interfaces.IAuthenticationPolicy`` interface now
1705   specifies that a policy implementation must implement an
1706   ``unauthenticated_userid`` method, all third-party custom authentication
1707   policies now must implement this method.  It, however, will only be called
1708   when the global function named ``pyramid.security.unauthenticated_userid``
1709   is invoked, so if you're not invoking that, you will not notice any issues.
1710
1711 - ``pyramid.interfaces.ISession.get_csrf_token`` now mandates that an
1712   implementation should return a *new* token if one doesn't already exist in
1713   the session (previously it would return None).  The internal sessioning
1714   implementation has been changed.
1715
1716 Documentation
1717 -------------
1718
1719 - The (weak) "Converting a CMF Application to Pyramid" tutorial has been
1720   removed from the tutorials section.  It was moved to the
1721   ``pyramid_tutorials`` Github repository.
1722
1723 - The "Resource Location and View Lookup" chapter has been replaced with a
1724   variant of Rob Miller's "Much Ado About Traversal" (originally published at
1725   http://blog.nonsequitarian.org/2010/much-ado-about-traversal/).
1726
1727 - Many minor wording tweaks and refactorings (merged Casey Duncan's docs
1728   fork, in which he is working on general editing).
1729
1730 - Added (weak) description of new view mapper feature to Hooks narrative
1731   chapter.
1732
1733 - Split views chapter into 2: View Callables and View Configuration.
1734
1735 - Reorder Renderers and Templates chapters after View Callables but before
1736   View Configuration.
1737
1738 - Merge Session Objects, Cross-Site Request Forgery, and Flash Messaging
1739   chapter into a single Sessions chapter.
1740
1741 - The Wiki and Wiki2 tutorials now have much nicer CSS and graphics.
1742
1743 Internals
1744 ---------
1745
1746 - The "view derivation" code is now factored into a set of classes rather
1747   than a large number of standalone functions (a side effect of the
1748   view mapper refactoring).
1749
1750 - The ``pyramid.renderer.RendererHelper`` class has grown a ``render_view``
1751   method, which is used by the default view mapper (a side effect of the
1752   view mapper refactoring).
1753
1754 - The object passed as ``renderer`` to the "view deriver" is now an instance
1755   of ``pyramid.renderers.RendererHelper`` rather than a dictionary (a side
1756   effect of view mapper refactoring).
1757
1758 - The class used as the "page template" in ``pyramid.chameleon_text`` was
1759   removed, in preference to using a Chameleon-inbuilt version.
1760
1761 - A view callable wrapper registered in the registry now contains an
1762   ``__original_view__`` attribute which references the original view callable
1763   (or class).
1764
1765 - The (non-API) method of all internal authentication policy implementations
1766   previously named ``_get_userid`` is now named ``unauthenticated_userid``,
1767   promoted to an API method.  If you were overriding this method, you'll now
1768   need to override it as ``unauthenticated_userid`` instead.
1769
1770 - Remove (non-API) function of config.py named _map_view.
1771
1772 1.0a8 (2010-12-27)
1773 ==================
1774
1775 Bug Fixes
1776 ---------
1777
1778 - The name ``registry`` was not available in the ``paster pshell``
1779   environment under IPython.
1780
1781 Features
1782 --------
1783
1784 - If a resource implements a ``__resource_url__`` method, it will be called
1785   as the result of invoking the ``pyramid.url.resource_url`` function to
1786   generate a URL, overriding the default logic.  See the new "Generating The
1787   URL Of A Resource" section within the Resources narrative chapter.
1788
1789 - Added flash messaging, as described in the "Flash Messaging" narrative
1790   documentation chapter.
1791
1792 - Added CSRF token generation, as described in the narrative chapter entitled
1793   "Preventing Cross-Site Request Forgery Attacks".
1794
1795 - Prevent misunderstanding of how the ``view`` and ``view_permission``
1796   arguments to add_route work by raising an exception during configuration if
1797   view-related arguments exist but no ``view`` argument is passed.
1798
1799 - Add ``paster proute`` command which displays a summary of the routing
1800   table.  See the narrative documentation section within the "URL Dispatch"
1801   chapter entitled "Displaying All Application Routes".
1802
1803 Paster Templates
1804 ----------------
1805
1806 - The ``pyramid_zodb`` Paster template no longer employs ZCML.  Instead, it
1807   is based on scanning.
1808
1809 Documentation
1810 -------------
1811
1812 - Added "Generating The URL Of A Resource" section to the Resources narrative
1813   chapter (includes information about overriding URL generation using
1814   ``__resource_url__``).
1815
1816 - Added "Generating the Path To a Resource" section to the Resources
1817   narrative chapter.
1818
1819 - Added "Finding a Resource by Path" section to the Resources narrative
1820   chapter.
1821
1822 - Added "Obtaining the Lineage of a Resource" to the Resources narrative
1823   chapter.
1824
1825 - Added "Determining if a Resource is In The Lineage of Another Resource" to
1826   Resources narrative chapter.
1827
1828 - Added "Finding the Root Resource" to Resources narrative chapter.
1829
1830 - Added "Finding a Resource With a Class or Interface in Lineage" to
1831   Resources narrative chapter.
1832
1833 - Added a "Flash Messaging" narrative documentation chapter.
1834
1835 - Added a narrative chapter entitled "Preventing Cross-Site Request Forgery
1836   Attacks".
1837
1838 - Changed the "ZODB + Traversal Wiki Tutorial" based on changes to
1839   ``pyramid_zodb`` Paster template.
1840
1841 - Added "Advanced Configuration" narrative chapter which documents how to
1842   deal with configuration conflicts, two-phase configuration, ``include`` and
1843   ``commit``.
1844
1845 - Fix API documentation rendering for ``pyramid.view.static``
1846
1847 - Add "Pyramid Provides More Than One Way to Do It" to Design Defense
1848   documentation.
1849
1850 - Changed "Static Assets" narrative chapter: clarify that ``name`` represents
1851   a prefix unless it's a URL, added an example of a root-relative static view
1852   fallback for URL dispatch, added an example of creating a simple view that
1853   returns the body of a file.
1854
1855 - Move ZCML usage in Hooks chapter to Declarative Configuration chapter.
1856
1857 - Merge "Static Assets" chapter into the "Assets" chapter.
1858
1859 - Added narrative documentation section within the "URL Dispatch" chapter
1860   entitled "Displaying All Application Routes" (for ``paster proutes``
1861   command).
1862
1863 1.0a7 (2010-12-20)
1864 ==================
1865
1866 Terminology Changes
1867 -------------------
1868
1869 - The Pyramid concept previously known as "model" is now known as "resource".
1870   As a result:
1871
1872   - The following API changes have been made::
1873
1874       pyramid.url.model_url -> 
1875                         pyramid.url.resource_url
1876
1877       pyramid.traversal.find_model -> 
1878                         pyramid.url.find_resource
1879
1880       pyramid.traversal.model_path ->
1881                         pyramid.traversal.resource_path
1882
1883       pyramid.traversal.model_path_tuple ->
1884                         pyramid.traversal.resource_path_tuple
1885
1886       pyramid.traversal.ModelGraphTraverser -> 
1887                         pyramid.traversal.ResourceTreeTraverser
1888
1889       pyramid.config.Configurator.testing_models ->
1890                         pyramid.config.Configurator.testing_resources
1891
1892       pyramid.testing.registerModels ->
1893                         pyramid.testing.registerResources
1894
1895       pyramid.testing.DummyModel ->
1896                         pyramid.testing.DummyResource
1897
1898    - All documentation which previously referred to "model" now refers to
1899      "resource".
1900
1901    - The ``starter`` and ``starter_zcml`` paster templates now have a
1902      ``resources.py`` module instead of a ``models.py`` module.
1903
1904   - Positional argument names of various APIs have been changed from
1905     ``model`` to ``resource``.
1906
1907   Backwards compatibility shims have been left in place in all cases.  They
1908   will continue to work "forever".
1909
1910 - The Pyramid concept previously known as "resource" is now known as "asset".
1911   As a result:
1912
1913   - The (non-API) module previously known as ``pyramid.resource`` is now
1914     known as ``pyramid.asset``.
1915
1916   - All docs that previously referred to "resource specification" now refer
1917     to "asset specification".
1918
1919   - The following API changes were made::
1920
1921       pyramid.config.Configurator.absolute_resource_spec ->
1922                         pyramid.config.Configurator.absolute_asset_spec
1923
1924       pyramid.config.Configurator.override_resource ->
1925                         pyramid.config.Configurator.override_asset
1926
1927   - The ZCML directive previously known as ``resource`` is now known as
1928     ``asset``.
1929
1930   - The setting previously known as ``BFG_RELOAD_RESOURCES`` (envvar) or
1931     ``reload_resources`` (config file) is now known, respectively, as
1932     ``PYRAMID_RELOAD_ASSETS`` and ``reload_assets``.
1933
1934   Backwards compatibility shims have been left in place in all cases.  They
1935   will continue to work "forever".
1936
1937 Bug Fixes
1938 ---------
1939
1940 - Make it possible to succesfully run all tests via ``nosetests`` command
1941   directly (rather than indirectly via ``python setup.py nosetests``).
1942
1943 - When a configuration conflict is encountered during scanning, the conflict
1944   exception now shows the decorator information that caused the conflict.
1945
1946 Features
1947 --------
1948
1949 - Added ``debug_routematch`` configuration setting that logs matched routes
1950   (including the matchdict and predicates).
1951
1952 - The name ``registry`` is now available in a ``pshell`` environment by
1953   default.  It is the application registry object.
1954
1955 Environment
1956 -----------
1957
1958 - All environment variables which used to be prefixed with ``BFG_`` are now
1959   prefixed with ``PYRAMID_`` (e.g. ``BFG_DEBUG_NOTFOUND`` is now
1960   ``PYRAMID_DEBUG_NOTFOUND``)
1961
1962 Documentation
1963 -------------
1964
1965 - Added "Debugging Route Matching" section to the urldispatch narrative
1966   documentation chapter.
1967
1968 - Added reference to ``PYRAMID_DEBUG_ROUTEMATCH`` envvar and ``debug_routematch``
1969   config file setting to the Environment narrative docs chapter.
1970
1971 - Changed "Project" chapter slightly to expand on use of ``paster pshell``.
1972
1973 - Direct Jython users to Mako rather than Jinja2 in "Install" narrative
1974   chapter.
1975
1976 - Many changes to support terminological renaming of "model" to "resource"
1977   and "resource" to "asset".
1978
1979 - Added an example of ``WebTest`` functional testing to the testing narrative
1980   chapter.
1981
1982 - Rearranged chapter ordering by popular demand (URL dispatch first, then
1983   traversal).  Put hybrid chapter after views chapter.
1984
1985 - Split off "Renderers" as its own chapter from "Views" chapter in narrative
1986   documentation.
1987
1988 Paster Templates
1989 ----------------
1990
1991 - Added ``debug_routematch = false`` to all paster templates.
1992
1993 Dependencies
1994 ------------
1995
1996 - Depend on Venusian >= 0.5 (for scanning conflict exception decoration).
1997
1998 1.0a6 (2010-12-15)
1999 ==================
2000
2001 Bug Fixes
2002 ---------
2003
2004 - 1.0a5 introduced a bug when ``pyramid.config.Configurator.scan`` was used
2005   without a ``package`` argument (e.g. ``config.scan()`` as opposed to
2006   ``config.scan('packagename')``.  The symptoms were: lots of deprecation
2007   warnings printed to the console about imports of deprecated Pyramid
2008   functions and classes and non-detection of view callables decorated with
2009   ``view_config`` decorators.  This has been fixed.
2010
2011 - Tests now pass on Windows (no bugs found, but a few tests in the test suite
2012   assumed UNIX path segments in filenames).
2013
2014 Documentation
2015 -------------
2016
2017 - If you followed it to-the-letter, the ZODB+Traversal Wiki tutorial would
2018   instruct you to run a test which would fail because the view callable
2019   generated by the ``pyramid_zodb`` tutorial used a one-arg view callable,
2020   but the test in the sample code used a two-arg call.
2021
2022 - Updated ZODB+Traversal tutorial setup.py of all steps to match what's
2023   generated by ``pyramid_zodb``.
2024
2025 - Fix reference to ``repoze.bfg.traversalwrapper`` in "Models" chapter (point
2026   at ``pyramid_traversalwrapper`` instead).
2027
2028 1.0a5 (2010-12-14)
2029 ==================
2030
2031 Features
2032 --------
2033
2034 - Add a ``handler`` ZCML directive.  This directive does the same thing as
2035   ``pyramid.configuration.add_handler``.
2036
2037 - A new module named ``pyramid.config`` was added.  It subsumes the duties of
2038   the older ``pyramid.configuration`` module.
2039
2040 - The new ``pyramid.config.Configurator` class has API methods that the older
2041   ``pyramid.configuration.Configurator`` class did not: ``with_context`` (a
2042   classmethod), ``include``, ``action``, and ``commit``.  These methods exist
2043   for imperative application extensibility purposes.
2044
2045 - The ``pyramid.testing.setUp`` function now accepts an ``autocommit``
2046   keyword argument, which defaults to ``True``.  If it is passed ``False``,
2047   the Config object returned by ``setUp`` will be a non-autocommiting Config
2048   object.
2049
2050 - Add logging configuration to all paster templates.
2051
2052 - ``pyramid_alchemy``, ``pyramid_routesalchemy``, and ``pylons_sqla`` paster
2053   templates now use idiomatic SQLAlchemy configuration in their respective
2054   ``.ini`` files and Python code.
2055
2056 - ``pyramid.testing.DummyRequest`` now has a class variable,
2057   ``query_string``, which defaults to the empty string.
2058
2059 - Add support for json on GAE by catching NotImplementedError and importing
2060   simplejson from django.utils.
2061
2062 - The Mako renderer now accepts a resource specification for
2063   ``mako.module_directory``.
2064
2065 - New boolean Mako settings variable ``mako.strict_undefined``.  See `Mako
2066   Context Variables
2067   <http://www.makotemplates.org/docs/runtime.html#context-variables>`_ for
2068   its meaning.
2069
2070 Dependencies
2071 ------------
2072
2073 - Depend on Mako 0.3.6+ (we now require the ``strict_undefined`` feature).
2074
2075 Bug Fixes
2076 ---------
2077
2078 - When creating a Configurator from within a ``paster pshell`` session, you
2079   were required to pass a ``package`` argument although ``package`` is not
2080   actually required.  If you didn't pass ``package``, you would receive an
2081   error something like ``KeyError: '__name__'`` emanating from the
2082   ``pyramid.path.caller_module`` function.  This has now been fixed.
2083
2084 - The ``pyramid_routesalchemy`` paster template's unit tests failed
2085   (``AssertionError: 'SomeProject' != 'someproject'``).  This is fixed.
2086
2087 - Make default renderer work (renderer factory registered with no name, which
2088   is active for every view unless the view names a specific renderer).
2089
2090 - The Mako renderer did not properly turn the ``mako.imports``,
2091   ``mako.default_filters``, and ``mako.imports`` settings into lists.
2092
2093 - The Mako renderer did not properly convert the ``mako.error_handler``
2094   setting from a dotted name to a callable.
2095
2096 Documentation
2097 -------------
2098
2099 - Merged many wording, readability, and correctness changes to narrative
2100   documentation chapters from https://github.com/caseman/pyramid (up to and
2101   including "Models" narrative chapter).
2102
2103 - "Sample Applications" section of docs changed to note existence of Cluegun,
2104   Shootout and Virginia sample applications, ported from their repoze.bfg
2105   origin packages.
2106
2107 - SQLAlchemy+URLDispatch tutorial updated to integrate changes to
2108   ``pyramid_routesalchemy`` template.
2109
2110 - Add ``pyramid.interfaces.ITemplateRenderer`` interface to Interfaces API
2111   chapter (has ``implementation()`` method, required to be used when getting
2112   at Chameleon macros).
2113
2114 - Add a "Modifying Package Structure" section to the project narrative
2115   documentation chapter (explain turning a module into a package).
2116
2117 - Documentation was added for the new ``handler`` ZCML directive in the ZCML
2118   section.
2119
2120 Deprecations
2121 ------------
2122
2123 - ``pyramid.configuration.Configurator`` is now deprecated.  Use
2124   ``pyramid.config.Configurator``, passing its constructor
2125   ``autocommit=True`` instead.  The ``pyramid.configuration.Configurator``
2126   alias will live for a long time, as every application uses it, but its
2127   import now issues a deprecation warning.  The
2128   ``pyramid.config.Configurator`` class has the same API as
2129   ``pyramid.configuration.Configurator`` class, which it means to replace,
2130   except by default it is a *non-autocommitting* configurator. The
2131   now-deprecated ``pyramid.configuration.Configurator`` will autocommit every
2132   time a configuration method is called.
2133
2134   The ``pyramid.configuration`` module remains, but it is deprecated.  Use
2135   ``pyramid.config`` instead.
2136
2137 1.0a4 (2010-11-21)
2138 ==================
2139
2140 Features
2141 --------
2142
2143 - URL Dispatch now allows for replacement markers to be located anywhere
2144   in the pattern, instead of immediately following a ``/``.
2145
2146 - URL Dispatch now uses the form ``{marker}`` to denote a replace marker in
2147   the route pattern instead of ``:marker``. The old colon-style marker syntax
2148   is still accepted for backwards compatibility. The new format allows a
2149   regular expression for that marker location to be used instead of the
2150   default ``[^/]+``, for example ``{marker:\d+}`` is now valid to require the
2151   marker to be digits.
2152
2153 - Add a ``pyramid.url.route_path`` API, allowing folks to generate relative
2154   URLs.  Calling ``route_path`` is the same as calling
2155   ``pyramid.url.route_url`` with the argument ``_app_url`` equal to the empty
2156   string.
2157
2158 - Add a ``pyramid.request.Request.route_path`` API.  This is a convenience
2159   method of the request which calls ``pyramid.url.route_url``.
2160
2161 - Make test suite pass on Jython (requires PasteScript trunk, presumably to
2162   be 1.7.4).
2163
2164 - Make test suite pass on PyPy (Chameleon doesn't work).
2165
2166 - Surrounding application configuration with ``config.begin()`` and
2167   ``config.end()`` is no longer necessary.  All paster templates have been
2168   changed to no longer call these functions.
2169
2170 - Fix configurator to not convert ``ImportError`` to ``ConfigurationError``
2171   if the import that failed was unrelated to the import requested via a
2172   dotted name when resolving dotted names (such as view dotted names).
2173
2174 Documentation
2175 -------------
2176
2177 - SQLAlchemy+URLDispatch and ZODB+Traversal tutorials have been updated to
2178   not call ``config.begin()`` or ``config.end()``.
2179
2180 Bug Fixes
2181 ---------
2182
2183 - Add deprecation warnings to import of ``pyramid.chameleon_text`` and
2184   ``pyramid.chameleon_zpt`` of ``get_renderer``, ``get_template``,
2185   ``render_template``, and ``render_template_to_response``.
2186
2187 - Add deprecation warning for import of ``pyramid.zcml.zcml_configure`` and
2188   ``pyramid.zcml.file_configure``.
2189
2190 - The ``pyramid_alchemy`` paster template had a typo, preventing an import
2191   from working.
2192
2193 - Fix apparent failures when calling ``pyramid.traversal.find_model(root,
2194   path)`` or ``pyramid.traversal.traverse(path)`` when ``path`` is
2195   (erroneously) a Unicode object. The user is meant to pass these APIs a
2196   string object, never a Unicode object.  In practice, however, users indeed
2197   pass Unicode.  Because the string that is passed must be ASCII encodeable,
2198   now, if they pass a Unicode object, its data is eagerly converted to an
2199   ASCII string rather than being passed along to downstream code as a
2200   convenience to the user and to prevent puzzling second-order failures from
2201   cropping up (all failures will occur within ``pyramid.traversal.traverse``
2202   rather than later down the line as the result of calling e.g.
2203   ``traversal_path``).
2204
2205 Backwards Incompatibilities
2206 ---------------------------
2207
2208 - The ``pyramid.testing.zcml_configure`` API has been removed.  It had been
2209   advertised as removed since repoze.bfg 1.2a1, but hadn't actually been.
2210
2211 Deprecations
2212 ------------
2213
2214 - The ``pyramid.settings.get_settings`` API is now deprecated.  Use
2215   ``pyramid.threadlocals.get_current_registry().settings`` instead or use the
2216   ``settings`` attribute of the registry available from the request
2217   (``request.registry.settings``).
2218
2219 Documentation
2220 -------------
2221
2222 - Removed ``zodbsessions`` tutorial chapter.  It's still useful, but we now
2223   have a SessionFactory abstraction which competes with it, and maintaining
2224   documentation on both ways to do it is a distraction.
2225
2226 Internal
2227 --------
2228
2229 - Replace Twill with WebTest in internal integration tests (avoid deprecation
2230   warnings generated by Twill).
2231
2232 1.0a3 (2010-11-16)
2233 ==================
2234
2235 Features
2236 --------
2237
2238 - Added Mako TemplateLookup settings for ``mako.error_handler``,
2239   ``mako.default_filters``, and ``mako.imports``.
2240
2241 - Normalized all paster templates: each now uses the name ``main`` to
2242   represent the function that returns a WSGI application, each now uses
2243   WebError, each now has roughly the same shape of development.ini style.
2244
2245 - Added class vars ``matchdict`` and ``matched_route`` to
2246   ``pyramid.request.Request``.  Each is set to ``None``.
2247
2248 - New API method: ``pyramid.settings.asbool``.
2249
2250 - New API methods for ``pyramid.request.Request``: ``model_url``,
2251   ``route_url``, and ``static_url``.  These are simple passthroughs for their
2252   respective functions in ``pyramid.url``.
2253
2254 - The ``settings`` object which used to be available only when
2255   ``request.settings.get_settings`` was called is now available as
2256   ``registry.settings`` (e.g. ``request.registry.settings`` in view code).
2257
2258 Bug Fixes
2259 ---------
2260
2261 - The pylons_* paster templates erroneously used the ``{squiggly}`` routing
2262   syntax as the pattern supplied to ``add_route``.  This style of routing is
2263   not supported.  They were replaced with ``:colon`` style route patterns.
2264
2265 - The pylons_* paster template used the same string
2266   (``your_app_secret_string``) for the ``session.secret`` setting in the
2267   generated ``development.ini``.  This was a security risk if left unchanged
2268   in a project that used one of the templates to produce production
2269   applications.  It now uses a randomly generated string.
2270
2271 Documentation
2272 -------------
2273
2274 - ZODB+traversal wiki (``wiki``) tutorial updated due to changes to
2275   ``pyramid_zodb`` paster template.
2276
2277 - SQLAlchemy+urldispach wiki (``wiki2``) tutorial updated due to changes to
2278   ``pyramid_routesalchemy`` paster template.
2279
2280 - Documented the ``matchdict`` and ``matched_route`` attributes of the
2281   request object in the Request API documentation.
2282
2283 Deprecations
2284 ------------
2285
2286 - Obtaining the ``settings`` object via
2287   ``registry.{get|query}Utility(ISettings)`` is now deprecated.  Instead,
2288   obtain the ``settings`` object via the ``registry.settings`` attribute.  A
2289   backwards compatibility shim was added to the registry object to register
2290   the settings object as an ISettings utility when ``setattr(registry,
2291   'settings', foo)`` is called, but it will be removed in a later release.
2292
2293 - Obtaining the ``settings`` object via ``pyramid.settings.get_settings`` is
2294   now deprecated.  Obtain it as the ``settings`` attribute of the registry
2295   now (obtain the registry via ``pyramid.threadlocal.get_registry`` or as
2296   ``request.registry``).
2297
2298 Behavior Differences
2299 --------------------
2300
2301 - Internal: ZCML directives no longer call get_current_registry() if there's
2302   a ``registry`` attribute on the ZCML context (kill off use of
2303   threadlocals).
2304
2305 - Internal: Chameleon template renderers now accept two arguments: ``path``
2306   and ``lookup``.  ``Lookup`` will be an instance of a lookup class which
2307   supplies (late-bound) arguments for debug, reload, and translate.  Any
2308   third-party renderers which use (the non-API) function
2309   ``pyramid.renderers.template_renderer_factory`` will need to adjust their
2310   implementations to obey the new callback argument list.  This change was to
2311   kill off inappropriate use of threadlocals.
2312
2313 1.0a2 (2010-11-09)
2314 ==================
2315
2316 Documentation
2317 -------------
2318
2319 - All references to events by interface
2320   (e.g. ``pyramid.interfaces.INewRequest``) have been changed to reference
2321   their concrete classes (e.g. ``pyramid.events.NewRequest``) in
2322   documentation about making subscriptions.
2323
2324 - All references to Pyramid-the-application were changed from mod-`pyramid`
2325   to app-`Pyramid`.  A custom role setting was added to ``docs/conf.py`` to
2326   allow for this.  (internal)
2327
2328 1.0a1 (2010-11-05)
2329 ==================
2330
2331 Features (delta from BFG 1.3)
2332 -------------------------------
2333
2334 - Mako templating renderer supports resource specification format for
2335   template lookups and within Mako templates. Absolute filenames must
2336   be used in Pyramid to avoid this lookup process.
2337
2338 - Add ``pyramid.httpexceptions`` module, which is a facade for the
2339   ``webob.exc`` module.
2340
2341 - Direct built-in support for the Mako templating language.
2342
2343 - A new configurator method exists: ``add_handler``.  This method adds
2344   a Pylons-style "view handler" (such a thing used to be called a
2345   "controller" in Pylons 1.0).
2346
2347 - New argument to configurator: ``session_factory``.
2348
2349 - New method on configurator: ``set_session_factory``
2350
2351 - Using ``request.session`` now returns a (dictionary-like) session
2352   object if a session factory has been configured.
2353
2354 - The request now has a new attribute: ``tmpl_context`` for benefit of
2355   Pylons users.
2356
2357 - The decorator previously known as ``pyramid.view.bfg_view`` is now
2358   known most formally as ``pyramid.view.view_config`` in docs and
2359   paster templates.  An import of ``pyramid.view.bfg_view``, however,
2360   will continue to work "forever".
2361
2362 - New API methods in ``pyramid.session``: ``signed_serialize`` and
2363   ``signed_deserialize``.
2364
2365 - New interface: ``pyramid.interfaces.IRendererInfo``.  An object of this type
2366   is passed to renderer factory constructors (see "Backwards
2367   Incompatibilities").
2368
2369 - New event type: ``pyramid.interfaces.IBeforeRender``.  An object of this type
2370   is sent as an event before a renderer is invoked (but after the
2371   application-level renderer globals factory added via
2372   ``pyramid.configurator.configuration.set_renderer_globals_factory``, if any,
2373   has injected its own keys).  Applications may now subscribe to the
2374   ``IBeforeRender`` event type in order to introspect the and modify the set of
2375   renderer globals before they are passed to a renderer.  The event object
2376   iself has a dictionary-like interface that can be used for this purpose.  For
2377   example::
2378
2379     from repoze.events import subscriber
2380     from pyramid.interfaces import IRendererGlobalsEvent
2381
2382     @subscriber(IRendererGlobalsEvent)
2383     def add_global(event):
2384         event['mykey'] = 'foo'
2385
2386   If a subscriber attempts to add a key that already exist in the renderer
2387   globals dictionary, a ``KeyError`` is raised.  This limitation is due to the
2388   fact that subscribers cannot be ordered relative to each other.  The set of
2389   keys added to the renderer globals dictionary by all subscribers and
2390   app-level globals factories must be unique.
2391
2392 - New class: ``pyramid.response.Response``.  This is a pure facade for
2393   ``webob.Response`` (old code need not change to use this facade, it's
2394   existence is mostly for vanity and documentation-generation purposes).
2395
2396 - All preexisting paster templates (except ``zodb``) now use "imperative"
2397   configuration (``starter``, ``routesalchemy``, ``alchemy``).
2398
2399 - A new paster template named ``pyramid_starter_zcml`` exists, which uses
2400   declarative configuration.
2401
2402 Documentation (delta from BFG 1.3)
2403 -----------------------------------
2404
2405 - Added a ``pyramid.httpexceptions`` API documentation chapter.
2406
2407 - Added a ``pyramid.session`` API documentation chapter.
2408
2409 - Added a ``Session Objects`` narrative documentation chapter.
2410
2411 - Added an API chapter for the ``pyramid.personality`` module.
2412
2413 - Added an API chapter for the ``pyramid.response`` module.
2414
2415 - All documentation which previously referred to ``webob.Response`` now uses
2416   ``pyramid.response.Response`` instead.
2417
2418 - The documentation has been overhauled to use imperative configuration,
2419   moving declarative configuration (ZCML) explanations to a separate
2420   narrative chapter ``declarative.rst``.
2421
2422 - The ZODB Wiki tutorial was updated to take into account changes to the
2423   ``pyramid_zodb`` paster template.
2424
2425 - The SQL Wiki tutorial was updated to take into account changes to the
2426   ``pyramid_routesalchemy`` paster template.
2427
2428 Backwards Incompatibilities (with BFG 1.3)
2429 ------------------------------------------
2430
2431 - There is no longer an ``IDebugLogger`` registered as a named utility
2432   with the name ``repoze.bfg.debug``.
2433
2434 - The logger which used to have the name of ``repoze.bfg.debug`` now
2435   has the name ``pyramid.debug``.
2436
2437 - The deprecated API ``pyramid.testing.registerViewPermission``
2438   has been removed.
2439
2440 - The deprecated API named ``pyramid.testing.registerRoutesMapper``
2441   has been removed.
2442
2443 - The deprecated API named ``pyramid.request.get_request`` was removed.
2444
2445 - The deprecated API named ``pyramid.security.Unauthorized`` was
2446   removed.
2447
2448 - The deprecated API named ``pyramid.view.view_execution_permitted``
2449   was removed.
2450
2451 - The deprecated API named ``pyramid.view.NotFound`` was removed.
2452
2453 - The ``bfgshell`` paster command is now named ``pshell``.
2454
2455 - The Venusian "category" for all built-in Venusian decorators
2456   (e.g. ``subscriber`` and ``view_config``/``bfg_view``) is now
2457   ``pyramid`` instead of ``bfg``.
2458
2459 - ``pyramid.renderers.rendered_response`` function removed; use
2460   ``render_pyramid.renderers.render_to_response`` instead.
2461
2462 - Renderer factories now accept a *renderer info object* rather than an
2463   absolute resource specification or an absolute path.  The object has the
2464   following attributes: ``name`` (the ``renderer=`` value), ``package`` (the
2465   'current package' when the renderer configuration statement was found),
2466   ``type``: the renderer type, ``registry``: the current registry, and
2467   ``settings``: the deployment settings dictionary.
2468
2469   Third-party ``repoze.bfg`` renderer implementations that must be ported to
2470   Pyramid will need to account for this.
2471
2472   This change was made primarily to support more flexible Mako template
2473   rendering.
2474
2475 - The presence of the key ``repoze.bfg.message`` in the WSGI environment when
2476   an exception occurs is now deprecated.  Instead, code which relies on this
2477   environ value should use the ``exception`` attribute of the request
2478   (e.g. ``request.exception[0]``) to retrieve the message.
2479
2480 - The values ``bfg_localizer`` and ``bfg_locale_name`` kept on the request
2481   during internationalization for caching purposes were never APIs.  These
2482   however have changed to ``localizer`` and ``locale_name``, respectively.
2483
2484 - The default ``cookie_name`` value of the ``authtktauthenticationpolicy`` ZCML
2485   now defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``).
2486
2487 - The default ``cookie_name`` value of the
2488   ``pyramid.authentication.AuthTktAuthenticationPolicy`` constructor now
2489   defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``).
2490
2491 - The ``request_type`` argument to the ``view`` ZCML directive, the
2492   ``pyramid.configuration.Configurator.add_view`` method, or the
2493   ``pyramid.view.view_config`` decorator (nee ``bfg_view``) is no longer
2494   permitted to be one of the strings ``GET``, ``HEAD``, ``PUT``, ``POST`` or
2495   ``DELETE``, and now must always be an interface.  Accepting the
2496   method-strings as ``request_type`` was a backwards compatibility strategy
2497   servicing repoze.bfg 1.0 applications.  Use the ``request_method``
2498   parameter instead to specify that a view a string request-method predicate.
4cdffc 2499