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