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