Chris McDonough
2011-01-08 a063aff1b0a9fe1f9d8c4a4baeade6453695f171
commit | author | age
a063af 1 1.0a9 (2011-01-08)
CM 2 ==================
096c4b 3
afbc5d 4 Bug Fixes
CM 5 ---------
6
7 - The ``proutes`` command tried too hard to resolve the view for printing,
8   resulting in exceptions when an exceptional root factory was encountered.
9   Instead of trying to resolve the view, if it cannot, it will now just print
10   ``<unknown>``.
bae647 11
07ee47 12 - The `self` argument was included in new methods of the ``ISession`` interface
56a8d0 13   signature, causing ``pyramid_beaker`` tests to fail.
07ee47 14
8673fb 15 - Readd ``pyramid.traversal.model_path_tuple`` as an alias for
CM 16   ``pyramid.traversal.resource_path_tuple`` for backwards compatibility.
17
bae647 18 Features
RM 19 --------
20
5653d1 21 - Add a new API ``pyramid.url.current_route_url``, which computes a URL based
CM 22   on the "current" route (if any) and its matchdict values.
23
95c9f6 24 - ``config.add_view`` now accepts a ``decorator`` keyword argument, a callable
CM 25   which will decorate the view callable before it is added to the registry.
bae647 26
60eccf 27 - If a handler class provides an ``__action_decorator__`` attribute (usually
CM 28   a classmethod or staticmethod), use that as the decorator for each view
95c9f6 29   registration for that handler.
744d76 30
2526d8 31 - The ``pyramid.interfaces.IAuthenticationPolicy`` interface now specifies an
CM 32   ``unauthenticated_userid`` method.  This method supports an important
33   optimization required by people who are using persistent storages which do
34   not support object caching and whom want to create a "user object" as a
35   request attribute.
36
37 - A new API has been added to the ``pyramid.security`` module named
38   ``unauthenticated_userid``.  This API function calls the
39   ``unauthenticated_userid`` method of the effective security policy.
40
41 - An ``unauthenticated_userid`` method has been added to the dummy
42   authentication policy returned by
43   ``pyramid.config.Configurator.testing_securitypolicy``.  It returns the
44   same thing as that the dummy authentication policy's
45   ``authenticated_userid`` method.
46
441666 47 - The class ``pyramid.authentication.AuthTktCookieHelper`` is now an API.
CM 48   This class can be used by third-party authentication policy developers to
49   help in the mechanics of authentication cookie-setting.
50
d95cd9 51 - New constructor argument to Configurator: ``default_view_mapper``.  Useful
CM 52   to create systems that have alternate view calling conventions.  A view
53   mapper allows objects that are meant to be used as view callables to have
54   an arbitrary argument list and an arbitrary result.  The object passed as
55   ``default_view_mapper`` should implement the
56   ``pyramid.interfaces.IViewMapperFactory`` interface.
57
58 - add a ``set_view_mapper`` API to Configurator.  Has
59   the same result as passing ``default_view_mapper`` to the Configurator
60   constructor.
61
5e3d64 62 - ``config.add_view`` now accepts a ``mapper`` keyword argument, which should
CM 63   either be ``None``, a string representing a Python dotted name, or an
64   object which is an ``IViewMapperFactory``.  This feature is not useful for
65   "civilians", only for extension writers.
d95cd9 66
CM 67 - Allow static renderer provided during view registration to be overridden at
68   request time via a request attribute named ``override_renderer``, which
69   should be the name of a previously registered renderer.  Useful to provide
70   "omnipresent" RPC using existing rendered views.
71
51b2e8 72 - Instances of ``pyramid.testing.DummyRequest`` now have a ``session``
CM 73   object, which is mostly a dictionary, but also implements the other session
74   API methods for flash and CSRF.
75
2526d8 76 Backwards Incompatibilities
CM 77 ---------------------------
78
79 - Since the ``pyramid.interfaces.IAuthenticationPolicy`` interface now
80   specifies that a policy implementation must implement an
81   ``unauthenticated_userid`` method, all third-party custom authentication
82   policies now must implement this method.  It, however, will only be called
83   when the global function named ``pyramid.security.unauthenticated_userid``
84   is invoked, so if you're not invoking that, you will not notice any issues.
85
14f863 86 - ``pyramid.interfaces.ISession.get_csrf_token`` now mandates that an
CM 87   implementation should return a *new* token if one doesn't already exist in
88   the session (previously it would return None).  The internal sessioning
89   implementation has been changed.
90
7e9d3c 91 Documentation
CM 92 -------------
93
94 - The (weak) "Converting a CMF Application to Pyramid" tutorial has been
95   removed from the tutorials section.  It was moved to the
96   ``pyramid_tutorials`` Github repository.
97
a65bec 98 - The "Resource Location and View Lookup" chapter has been replaced with a
CM 99   variant of Rob Miller's "Much Ado About Traversal" (originally published at
100   http://blog.nonsequitarian.org/2010/much-ado-about-traversal/).
101
102 - Many minor wording tweaks and refactorings (merged Casey Duncan's docs
103   fork, in which he is working on general editing).
104
8839b6 105 - Added (weak) description of new view mapper feature to Hooks narrative
CM 106   chapter.
107
f3f45a 108 - Split views chapter into 2: View Callables and View Configuration.
CM 109
110 - Reorder Renderers and Templates chapters after View Callables but before
111   View Configuration.
112
113 - Merge Session Objects, Cross-Site Request Forgery, and Flash Messaging
114   chapter into a single Sessions chapter.
115
5b20ad 116 - The Wiki and Wiki2 tutorials now have much nicer CSS and graphics.
CM 117
95c9f6 118 Internals
CM 119 ---------
120
121 - The "view derivation" code is now factored into a set of classes rather
122   than a large number of standalone functions (a side effect of the
5e3d64 123   view mapper refactoring).
95c9f6 124
CM 125 - The ``pyramid.renderer.RendererHelper`` class has grown a ``render_view``
126   method, which is used by the default view mapper (a side effect of the
5e3d64 127   view mapper refactoring).
95c9f6 128
CM 129 - The object passed as ``renderer`` to the "view deriver" is now an instance
130   of ``pyramid.renderers.RendererHelper`` rather than a dictionary (a side
5e3d64 131   effect of view mapper refactoring).
95c9f6 132
13bfb5 133 - The class used as the "page template" in ``pyramid.chameleon_text`` was
CM 134   removed, in preference to using a Chameleon-inbuilt version.
135
95c95b 136 - A view callable wrapper registered in the registry now contains an
CM 137   ``__original_view__`` attribute which references the original view callable
138   (or class).
139
2526d8 140 - The (non-API) method of all internal authentication policy implementations
CM 141   previously named ``_get_userid`` is now named ``unauthenticated_userid``,
142   promoted to an API method.  If you were overriding this method, you'll now
143   need to override it as ``unauthenticated_userid`` instead.
144
80aa77 145 - Remove (non-API) function of config.py named _map_view.
9c1d34 146
636294 147 1.0a8 (2010-12-27)
CM 148 ==================
13de5d 149
e6f45b 150 Bug Fixes
CM 151 ---------
152
153 - The name ``registry`` was not available in the ``paster pshell``
154   environment under IPython.
155
bac5b3 156 Features
CM 157 --------
158
159 - If a resource implements a ``__resource_url__`` method, it will be called
160   as the result of invoking the ``pyramid.url.resource_url`` function to
161   generate a URL, overriding the default logic.  See the new "Generating The
162   URL Of A Resource" section within the Resources narrative chapter.
163
4df636 164 - Added flash messaging, as described in the "Flash Messaging" narrative
CM 165   documentation chapter.
166
319793 167 - Added CSRF token generation, as described in the narrative chapter entitled
CM 168   "Preventing Cross-Site Request Forgery Attacks".
169
f5bafd 170 - Prevent misunderstanding of how the ``view`` and ``view_permission``
CM 171   arguments to add_route work by raising an exception during configuration if
172   view-related arguments exist but no ``view`` argument is passed.
173
90a327 174 - Add ``paster proute`` command which displays a summary of the routing
CM 175   table.  See the narrative documentation section within the "URL Dispatch"
176   chapter entitled "Displaying All Application Routes".
177
2a5ae0 178 Paster Templates
CM 179 ----------------
180
181 - The ``pyramid_zodb`` Paster template no longer employs ZCML.  Instead, it
182   is based on scanning.
183
bac5b3 184 Documentation
CM 185 -------------
186
187 - Added "Generating The URL Of A Resource" section to the Resources narrative
188   chapter (includes information about overriding URL generation using
189   ``__resource_url__``).
190
191 - Added "Generating the Path To a Resource" section to the Resources
192   narrative chapter.
193
194 - Added "Finding a Resource by Path" section to the Resources narrative
195   chapter.
13de5d 196
f4f41f 197 - Added "Obtaining the Lineage of a Resource" to the Resources narrative
CM 198   chapter.
199
200 - Added "Determining if a Resource is In The Lineage of Another Resource" to
201   Resources narrative chapter.
202
b32bfd 203 - Added "Finding the Root Resource" to Resources narrative chapter.
CM 204
205 - Added "Finding a Resource With a Class or Interface in Lineage" to
206   Resources narrative chapter.
207
4df636 208 - Added a "Flash Messaging" narrative documentation chapter.
CM 209
319793 210 - Added a narrative chapter entitled "Preventing Cross-Site Request Forgery
CM 211   Attacks".
212
2a5ae0 213 - Changed the "ZODB + Traversal Wiki Tutorial" based on changes to
CM 214   ``pyramid_zodb`` Paster template.
215
10fd8f 216 - Added "Advanced Configuration" narrative chapter which documents how to
CM 217   deal with configuration conflicts, two-phase configuration, ``include`` and
218   ``commit``.
219
b33dca 220 - Fix API documentation rendering for ``pyramid.view.static``
CM 221
22533d 222 - Add "Pyramid Provides More Than One Way to Do It" to Design Defense
CM 223   documentation.
224
56db9e 225 - Changed "Static Assets" narrative chapter: clarify that ``name`` represents
CM 226   a prefix unless it's a URL, added an example of a root-relative static view
227   fallback for URL dispatch, added an example of creating a simple view that
228   returns the body of a file.
229
e1a7e0 230 - Move ZCML usage in Hooks chapter to Declarative Configuration chapter.
CM 231
88b9ee 232 - Merge "Static Assets" chapter into the "Assets" chapter.
CM 233
90a327 234 - Added narrative documentation section within the "URL Dispatch" chapter
CM 235   entitled "Displaying All Application Routes" (for ``paster proutes``
236   command).
237
bd3bf1 238 1.0a7 (2010-12-20)
CM 239 ==================
a2796f 240
aa1ec8 241 Terminology Changes
CM 242 -------------------
243
244 - The Pyramid concept previously known as "model" is now known as "resource".
245   As a result:
246
247   - The following API changes have been made::
248
249       pyramid.url.model_url -> 
250                         pyramid.url.resource_url
477e99 251
aa1ec8 252       pyramid.traversal.find_model -> 
CM 253                         pyramid.url.find_resource
477e99 254
aa1ec8 255       pyramid.traversal.model_path ->
CM 256                         pyramid.traversal.resource_path
477e99 257
aa1ec8 258       pyramid.traversal.model_path_tuple ->
CM 259                         pyramid.traversal.resource_path_tuple
477e99 260
aa1ec8 261       pyramid.traversal.ModelGraphTraverser -> 
CM 262                         pyramid.traversal.ResourceTreeTraverser
477e99 263
aa1ec8 264       pyramid.config.Configurator.testing_models ->
CM 265                         pyramid.config.Configurator.testing_resources
477e99 266
aa1ec8 267       pyramid.testing.registerModels ->
CM 268                         pyramid.testing.registerResources
477e99 269
aa1ec8 270       pyramid.testing.DummyModel ->
CM 271                         pyramid.testing.DummyResource
272
273    - All documentation which previously referred to "model" now refers to
bbb9b5 274      "resource".
aa1ec8 275
CM 276    - The ``starter`` and ``starter_zcml`` paster templates now have a
277      ``resources.py`` module instead of a ``models.py`` module.
278
279   - Positional argument names of various APIs have been changed from
280     ``model`` to ``resource``.
281
282   Backwards compatibility shims have been left in place in all cases.  They
283   will continue to work "forever".
284
285 - The Pyramid concept previously known as "resource" is now known as "asset".
286   As a result:
287
288   - The (non-API) module previously known as ``pyramid.resource`` is now
289     known as ``pyramid.asset``.
290
291   - All docs that previously referred to "resource specification" now refer
292     to "asset specification".
293
294   - The following API changes were made::
295
296       pyramid.config.Configurator.absolute_resource_spec ->
297                         pyramid.config.Configurator.absolute_asset_spec
477e99 298
aa1ec8 299       pyramid.config.Configurator.override_resource ->
CM 300                         pyramid.config.Configurator.override_asset
301
302   - The ZCML directive previously known as ``resource`` is now known as
303     ``asset``.
304
305   - The setting previously known as ``BFG_RELOAD_RESOURCES`` (envvar) or
306     ``reload_resources`` (config file) is now known, respectively, as
7b9066 307     ``PYRAMID_RELOAD_ASSETS`` and ``reload_assets``.
aa1ec8 308
CM 309   Backwards compatibility shims have been left in place in all cases.  They
310   will continue to work "forever".
311
7906d2 312 Bug Fixes
CM 313 ---------
314
315 - Make it possible to succesfully run all tests via ``nosetests`` command
316   directly (rather than indirectly via ``python setup.py nosetests``).
317
14b78b 318 - When a configuration conflict is encountered during scanning, the conflict
CM 319   exception now shows the decorator information that caused the conflict.
320
24bf2a 321 Features
CM 322 --------
323
324 - Added ``debug_routematch`` configuration setting that logs matched routes
325   (including the matchdict and predicates).
326
dc06b0 327 - The name ``registry`` is now available in a ``pshell`` environment by
CM 328   default.  It is the application registry object.
329
e79d36 330 Environment
CM 331 -----------
332
333 - All environment variables which used to be prefixed with ``BFG_`` are now
334   prefixed with ``PYRAMID_`` (e.g. ``BFG_DEBUG_NOTFOUND`` is now
335   ``PYRAMID_DEBUG_NOTFOUND``)
336
24bf2a 337 Documentation
CM 338 -------------
339
340 - Added "Debugging Route Matching" section to the urldispatch narrative
341   documentation chapter.
342
7b9066 343 - Added reference to ``PYRAMID_DEBUG_ROUTEMATCH`` envvar and ``debug_routematch``
24bf2a 344   config file setting to the Environment narrative docs chapter.
CM 345
dc06b0 346 - Changed "Project" chapter slightly to expand on use of ``paster pshell``.
CM 347
b3edcf 348 - Direct Jython users to Mako rather than Jinja2 in "Install" narrative
CM 349   chapter.
350
aa1ec8 351 - Many changes to support terminological renaming of "model" to "resource"
CM 352   and "resource" to "asset".
353
6ee49a 354 - Added an example of ``WebTest`` functional testing to the testing narrative
CM 355   chapter.
356
bdb5ed 357 - Rearranged chapter ordering by popular demand (URL dispatch first, then
CM 358   traversal).  Put hybrid chapter after views chapter.
359
a59c78 360 - Split off "Renderers" as its own chapter from "Views" chapter in narrative
CM 361   documentation.
362
3f6b38 363 Paster Templates
CM 364 ----------------
365
366 - Added ``debug_routematch = false`` to all paster templates.
367
14b78b 368 Dependencies
CM 369 ------------
370
371 - Depend on Venusian >= 0.5 (for scanning conflict exception decoration).
372
07bd03 373 1.0a6 (2010-12-15)
CM 374 ==================
73b432 375
c5d172 376 Bug Fixes
CM 377 ---------
378
7cfd68 379 - 1.0a5 introduced a bug when ``pyramid.config.Configurator.scan`` was used
CM 380   without a ``package`` argument (e.g. ``config.scan()`` as opposed to
381   ``config.scan('packagename')``.  The symptoms were: lots of deprecation
382   warnings printed to the console about imports of deprecated Pyramid
43d075 383   functions and classes and non-detection of view callables decorated with
CM 384   ``view_config`` decorators.  This has been fixed.
73b432 385
86a304 386 - Tests now pass on Windows (no bugs found, but a few tests in the test suite
CM 387   assumed UNIX path segments in filenames).
388
55e60c 389 Documentation
CM 390 -------------
391
392 - If you followed it to-the-letter, the ZODB+Traversal Wiki tutorial would
393   instruct you to run a test which would fail because the view callable
394   generated by the ``pyramid_zodb`` tutorial used a one-arg view callable,
395   but the test in the sample code used a two-arg call.
396
397 - Updated ZODB+Traversal tutorial setup.py of all steps to match what's
398   generated by ``pyramid_zodb``.
399
a66a13 400 - Fix reference to ``repoze.bfg.traversalwrapper`` in "Models" chapter (point
CM 401   at ``pyramid_traversalwrapper`` instead).
402
ec8833 403 1.0a5 (2010-12-14)
CM 404 ==================
aedc21 405
957f61 406 Features
CM 407 --------
408
e8edd5 409 - Add a ``handler`` ZCML directive.  This directive does the same thing as
CM 410   ``pyramid.configuration.add_handler``.
411
d7f259 412 - A new module named ``pyramid.config`` was added.  It subsumes the duties of
f360d9 413   the older ``pyramid.configuration`` module.
d7f259 414
CM 415 - The new ``pyramid.config.Configurator` class has API methods that the older
416   ``pyramid.configuration.Configurator`` class did not: ``with_context`` (a
417   classmethod), ``include``, ``action``, and ``commit``.  These methods exist
418   for imperative application extensibility purposes.
e16ab0 419
CM 420 - The ``pyramid.testing.setUp`` function now accepts an ``autocommit``
421   keyword argument, which defaults to ``True``.  If it is passed ``False``,
422   the Config object returned by ``setUp`` will be a non-autocommiting Config
423   object.
957f61 424
CM 425 - Add logging configuration to all paster templates.
426
427 - ``pyramid_alchemy``, ``pyramid_routesalchemy``, and ``pylons_sqla`` paster
428   templates now use idiomatic SQLAlchemy configuration in their respective
429   ``.ini`` files and Python code.
430
0cb7ac 431 - ``pyramid.testing.DummyRequest`` now has a class variable,
CM 432   ``query_string``, which defaults to the empty string.
c5f557 433
e880a4 434 - Add support for json on GAE by catching NotImplementedError and importing
CM 435   simplejson from django.utils.
436
a9f17c 437 - The Mako renderer now accepts a resource specification for
CM 438   ``mako.module_directory``.
439
81e648 440 - New boolean Mako settings variable ``mako.strict_undefined``.  See `Mako
CM 441   Context Variables
442   <http://www.makotemplates.org/docs/runtime.html#context-variables>`_ for
443   its meaning.
444
445 Dependencies
446 ------------
447
448 - Depend on Mako 0.3.6+ (we now require the ``strict_undefined`` feature).
449
b44b93 450 Bug Fixes
CM 451 ---------
452
a56564 453 - When creating a Configurator from within a ``paster pshell`` session, you
CM 454   were required to pass a ``package`` argument although ``package`` is not
455   actually required.  If you didn't pass ``package``, you would receive an
456   error something like ``KeyError: '__name__'`` emanating from the
457   ``pyramid.path.caller_module`` function.  This has now been fixed.
458
b44b93 459 - The ``pyramid_routesalchemy`` paster template's unit tests failed
CM 460   (``AssertionError: 'SomeProject' != 'someproject'``).  This is fixed.
461
76e48b 462 - Make default renderer work (renderer factory registered with no name, which
CM 463   is active for every view unless the view names a specific renderer).
464
a9f17c 465 - The Mako renderer did not properly turn the ``mako.imports``,
CM 466   ``mako.default_filters``, and ``mako.imports`` settings into lists.
467
468 - The Mako renderer did not properly convert the ``mako.error_handler``
469   setting from a dotted name to a callable.
470
2197ff 471 Documentation
CM 472 -------------
473
ec8833 474 - Merged many wording, readability, and correctness changes to narrative
CM 475   documentation chapters from https://github.com/caseman/pyramid (up to and
476   including "Models" narrative chapter).
477
2197ff 478 - "Sample Applications" section of docs changed to note existence of Cluegun,
CM 479   Shootout and Virginia sample applications, ported from their repoze.bfg
480   origin packages.
481
d0e2f6 482 - SQLAlchemy+URLDispatch tutorial updated to integrate changes to
CM 483   ``pyramid_routesalchemy`` template.
484
e26903 485 - Add ``pyramid.interfaces.ITemplateRenderer`` interface to Interfaces API
CM 486   chapter (has ``implementation()`` method, required to be used when getting
487   at Chameleon macros).
488
aa3306 489 - Add a "Modifying Package Structure" section to the project narrative
CM 490   documentation chapter (explain turning a module into a package).
aedc21 491
4d660d 492 - Documentation was added for the new ``handler`` ZCML directive in the ZCML
CM 493   section.
494
f360d9 495 Deprecations
CM 496 ------------
497
498 - ``pyramid.configuration.Configurator`` is now deprecated.  Use
499   ``pyramid.config.Configurator``, passing its constructor
500   ``autocommit=True`` instead.  The ``pyramid.configuration.Configurator``
501   alias will live for a long time, as every application uses it, but its
502   import now issues a deprecation warning.  The
503   ``pyramid.config.Configurator`` class has the same API as
504   ``pyramid.configuration.Configurator`` class, which it means to replace,
505   except by default it is a *non-autocommitting* configurator. The
506   now-deprecated ``pyramid.configuration.Configurator`` will autocommit every
507   time a configuration method is called.
508
509   The ``pyramid.configuration`` module remains, but it is deprecated.  Use
510   ``pyramid.config`` instead.
511
7eb4ad 512 1.0a4 (2010-11-21)
CM 513 ==================
745a61 514
2c9d14 515 Features
CM 516 --------
517
e84116 518 - URL Dispatch now allows for replacement markers to be located anywhere
BB 519   in the pattern, instead of immediately following a ``/``.
47c9f8 520
4018ad 521 - URL Dispatch now uses the form ``{marker}`` to denote a replace marker in
7eb4ad 522   the route pattern instead of ``:marker``. The old colon-style marker syntax
CM 523   is still accepted for backwards compatibility. The new format allows a
524   regular expression for that marker location to be used instead of the
525   default ``[^/]+``, for example ``{marker:\d+}`` is now valid to require the
526   marker to be digits.
47c9f8 527
2c9d14 528 - Add a ``pyramid.url.route_path`` API, allowing folks to generate relative
CM 529   URLs.  Calling ``route_path`` is the same as calling
530   ``pyramid.url.route_url`` with the argument ``_app_url`` equal to the empty
531   string.
532
533 - Add a ``pyramid.request.Request.route_path`` API.  This is a convenience
534   method of the request which calls ``pyramid.url.route_url``.
535
85ee02 536 - Make test suite pass on Jython (requires PasteScript trunk, presumably to
CM 537   be 1.7.4).
538
29b7aa 539 - Make test suite pass on PyPy (Chameleon doesn't work).
CM 540
614f00 541 - Surrounding application configuration with ``config.begin()`` and
CM 542   ``config.end()`` is no longer necessary.  All paster templates have been
543   changed to no longer call these functions.
544
35ce2a 545 - Fix configurator to not convert ``ImportError`` to ``ConfigurationError``
CM 546   if the import that failed was unrelated to the import requested via a
547   dotted name when resolving dotted names (such as view dotted names).
548
614f00 549 Documentation
CM 550 -------------
551
552 - SQLAlchemy+URLDispatch and ZODB+Traversal tutorials have been updated to
553   not call ``config.begin()`` or ``config.end()``.
554
111a6f 555 Bug Fixes
CM 556 ---------
557
558 - Add deprecation warnings to import of ``pyramid.chameleon_text`` and
559   ``pyramid.chameleon_zpt`` of ``get_renderer``, ``get_template``,
560   ``render_template``, and ``render_template_to_response``.
561
34f44d 562 - Add deprecation warning for import of ``pyramid.zcml.zcml_configure`` and
CM 563   ``pyramid.zcml.file_configure``.
564
1e00f3 565 - The ``pyramid_alchemy`` paster template had a typo, preventing an import
CM 566   from working.
567
a66593 568 - Fix apparent failures when calling ``pyramid.traversal.find_model(root,
CM 569   path)`` or ``pyramid.traversal.traverse(path)`` when ``path`` is
570   (erroneously) a Unicode object. The user is meant to pass these APIs a
571   string object, never a Unicode object.  In practice, however, users indeed
572   pass Unicode.  Because the string that is passed must be ASCII encodeable,
573   now, if they pass a Unicode object, its data is eagerly converted to an
574   ASCII string rather than being passed along to downstream code as a
575   convenience to the user and to prevent puzzling second-order failures from
576   cropping up (all failures will occur within ``pyramid.traversal.traverse``
7eb4ad 577   rather than later down the line as the result of calling e.g.
a66593 578   ``traversal_path``).
CM 579
34f44d 580 Backwards Incompatibilities
CM 581 ---------------------------
582
583 - The ``pyramid.testing.zcml_configure`` API has been removed.  It had been
406259 584   advertised as removed since repoze.bfg 1.2a1, but hadn't actually been.
34f44d 585
b68aad 586 Deprecations
CM 587 ------------
588
589 - The ``pyramid.settings.get_settings`` API is now deprecated.  Use
84df81 590   ``pyramid.threadlocals.get_current_registry().settings`` instead or use the
b68aad 591   ``settings`` attribute of the registry available from the request
CM 592   (``request.registry.settings``).
745a61 593
cb96e2 594 Documentation
CM 595 -------------
596
597 - Removed ``zodbsessions`` tutorial chapter.  It's still useful, but we now
598   have a SessionFactory abstraction which competes with it, and maintaining
599   documentation on both ways to do it is a distraction.
600
dbaa08 601 Internal
CM 602 --------
603
604 - Replace Twill with WebTest in internal integration tests (avoid deprecation
605   warnings generated by Twill).
606
3fa994 607 1.0a3 (2010-11-16)
CM 608 ==================
f4d693 609
9cca72 610 Features
CM 611 --------
612
ae60ba 613 - Added Mako TemplateLookup settings for ``mako.error_handler``,
BB 614   ``mako.default_filters``, and ``mako.imports``.
615
9cca72 616 - Normalized all paster templates: each now uses the name ``main`` to
CM 617   represent the function that returns a WSGI application, each now uses
618   WebError, each now has roughly the same shape of development.ini style.
619
51c305 620 - Added class vars ``matchdict`` and ``matched_route`` to
CR 621   ``pyramid.request.Request``.  Each is set to ``None``.
622
fe4172 623 - New API method: ``pyramid.settings.asbool``.
CM 624
9e2e1c 625 - New API methods for ``pyramid.request.Request``: ``model_url``,
CM 626   ``route_url``, and ``static_url``.  These are simple passthroughs for their
627   respective functions in ``pyramid.url``.
4eafaa 628
5a972b 629 - The ``settings`` object which used to be available only when
CM 630   ``request.settings.get_settings`` was called is now available as
631   ``registry.settings`` (e.g. ``request.registry.settings`` in view code).
632
9cca72 633 Bug Fixes
CM 634 ---------
635
636 - The pylons_* paster templates erroneously used the ``{squiggly}`` routing
637   syntax as the pattern supplied to ``add_route``.  This style of routing is
638   not supported.  They were replaced with ``:colon`` style route patterns.
f4d693 639
7bd14c 640 - The pylons_* paster template used the same string
CM 641   (``your_app_secret_string``) for the ``session.secret`` setting in the
642   generated ``development.ini``.  This was a security risk if left unchanged
643   in a project that used one of the templates to produce production
644   applications.  It now uses a randomly generated string.
645
1ad856 646 Documentation
CM 647 -------------
648
649 - ZODB+traversal wiki (``wiki``) tutorial updated due to changes to
650   ``pyramid_zodb`` paster template.
651
40eb89 652 - SQLAlchemy+urldispach wiki (``wiki2``) tutorial updated due to changes to
CM 653   ``pyramid_routesalchemy`` paster template.
654
4eafaa 655 - Documented the ``matchdict`` and ``matched_route`` attributes of the
CM 656   request object in the Request API documentation.
657
5a972b 658 Deprecations
CM 659 ------------
660
661 - Obtaining the ``settings`` object via
662   ``registry.{get|query}Utility(ISettings)`` is now deprecated.  Instead,
663   obtain the ``settings`` object via the ``registry.settings`` attribute.  A
664   backwards compatibility shim was added to the registry object to register
665   the settings object as an ISettings utility when ``setattr(registry,
666   'settings', foo)`` is called, but it will be removed in a later release.
667
668 - Obtaining the ``settings`` object via ``pyramid.settings.get_settings`` is
669   now deprecated.  Obtain it as the ``settings`` attribute of the registry
670   now (obtain the registry via ``pyramid.threadlocal.get_registry`` or as
671   ``request.registry``).
672
76d7eb 673 Behavior Differences
CM 674 --------------------
675
676 - Internal: ZCML directives no longer call get_current_registry() if there's
677   a ``registry`` attribute on the ZCML context (kill off use of
678   threadlocals).
679
7b8d65 680 - Internal: Chameleon template renderers now accept two arguments: ``path``
CM 681   and ``lookup``.  ``Lookup`` will be an instance of a lookup class which
682   supplies (late-bound) arguments for debug, reload, and translate.  Any
683   third-party renderers which use (the non-API) function
684   ``pyramid.renderers.template_renderer_factory`` will need to adjust their
685   implementations to obey the new callback argument list.  This change was to
686   kill off inappropriate use of threadlocals.
687
3d4e56 688 1.0a2 (2010-11-09)
CM 689 ==================
0af394 690
c721fd 691 Documentation
CM 692 -------------
693
694 - All references to events by interface
695   (e.g. ``pyramid.interfaces.INewRequest``) have been changed to reference
696   their concrete classes (e.g. ``pyramid.events.NewRequest``) in
697   documentation about making subscriptions.
698
3d4e56 699 - All references to Pyramid-the-application were changed from mod-`pyramid`
CM 700   to app-`Pyramid`.  A custom role setting was added to ``docs/conf.py`` to
fd5ae9 701   allow for this.  (internal)
CM 702
fcc3d1 703 1.0a1 (2010-11-05)
CM 704 ==================
5bbc23 705
fcc3d1 706 Features (delta from BFG 1.3)
2e6905 707 -------------------------------
CM 708
07437c 709 - Mako templating renderer supports resource specification format for
BB 710   template lookups and within Mako templates. Absolute filenames must
a62cc2 711   be used in Pyramid to avoid this lookup process.
07437c 712
2e6905 713 - Add ``pyramid.httpexceptions`` module, which is a facade for the
CM 714   ``webob.exc`` module.
715
9b8d0c 716 - Direct built-in support for the Mako templating language.
CM 717
718 - A new configurator method exists: ``add_handler``.  This method adds
719   a Pylons-style "view handler" (such a thing used to be called a
720   "controller" in Pylons 1.0).
721
968209 722 - New argument to configurator: ``session_factory``.
CM 723
724 - New method on configurator: ``set_session_factory``
725
726 - Using ``request.session`` now returns a (dictionary-like) session
727   object if a session factory has been configured.
14dc81 728
CM 729 - The request now has a new attribute: ``tmpl_context`` for benefit of
730   Pylons users.
731
197f0c 732 - The decorator previously known as ``pyramid.view.bfg_view`` is now
CM 733   known most formally as ``pyramid.view.view_config`` in docs and
734   paster templates.  An import of ``pyramid.view.bfg_view``, however,
735   will continue to work "forever".
736
6a3184 737 - New API methods in ``pyramid.session``: ``signed_serialize`` and
CM 738   ``signed_deserialize``.
739
1dad60 740 - New interface: ``pyramid.interfaces.IRendererInfo``.  An object of this type
CM 741   is passed to renderer factory constructors (see "Backwards
742   Incompatibilities").
743
a76e99 744 - New event type: ``pyramid.interfaces.IBeforeRender``.  An object of this type
CM 745   is sent as an event before a renderer is invoked (but after the
746   application-level renderer globals factory added via
747   ``pyramid.configurator.configuration.set_renderer_globals_factory``, if any,
748   has injected its own keys).  Applications may now subscribe to the
749   ``IBeforeRender`` event type in order to introspect the and modify the set of
750   renderer globals before they are passed to a renderer.  The event object
751   iself has a dictionary-like interface that can be used for this purpose.  For
752   example::
753
754     from repoze.events import subscriber
755     from pyramid.interfaces import IRendererGlobalsEvent
756
757     @subscriber(IRendererGlobalsEvent)
758     def add_global(event):
759         event['mykey'] = 'foo'
760
761   If a subscriber attempts to add a key that already exist in the renderer
762   globals dictionary, a ``KeyError`` is raised.  This limitation is due to the
763   fact that subscribers cannot be ordered relative to each other.  The set of
764   keys added to the renderer globals dictionary by all subscribers and
765   app-level globals factories must be unique.
766
e65e5b 767 - New class: ``pyramid.response.Response``.  This is a pure facade for
CM 768   ``webob.Response`` (old code need not change to use this facade, it's
94b889 769   existence is mostly for vanity and documentation-generation purposes).
CM 770
a3dc13 771 - All preexisting paster templates (except ``zodb``) now use "imperative"
CM 772   configuration (``starter``, ``routesalchemy``, ``alchemy``).
773
774 - A new paster template named ``pyramid_starter_zcml`` exists, which uses
775   declarative configuration.
776
2e6905 777 Documentation (delta from BFG 1.3)
CM 778 -----------------------------------
779
780 - Added a ``pyramid.httpexceptions`` API documentation chapter.
781
14dc81 782 - Added a ``pyramid.session`` API documentation chapter.
CM 783
784 - Added a ``Session Objects`` narrative documentation chapter.
785
786 - Added an API chapter for the ``pyramid.personality`` module.
787
94b889 788 - Added an API chapter for the ``pyramid.response`` module.
CM 789
790 - All documentation which previously referred to ``webob.Response`` now uses
791   ``pyramid.response.Response`` instead.
792
7a3465 793 - The documentation has been overhauled to use imperative configuration,
CM 794   moving declarative configuration (ZCML) explanations to a separate
795   narrative chapter ``declarative.rst``.
796
b3b713 797 - The ZODB Wiki tutorial was updated to take into account changes to the
CM 798   ``pyramid_zodb`` paster template.
799
b2adfe 800 - The SQL Wiki tutorial was updated to take into account changes to the
CM 801   ``pyramid_routesalchemy`` paster template.
6067de 802
fcc3d1 803 Backwards Incompatibilities (with BFG 1.3)
CM 804 ------------------------------------------
2d7993 805
c81aad 806 - There is no longer an ``IDebugLogger`` registered as a named utility
CM 807   with the name ``repoze.bfg.debug``.
808
809 - The logger which used to have the name of ``repoze.bfg.debug`` now
810   has the name ``pyramid.debug``.
811
588733 812 - The deprecated API ``pyramid.testing.registerViewPermission``
CM 813   has been removed.
814
51c305 815 - The deprecated API named ``pyramid.testing.registerRoutesMapper``
588733 816   has been removed.
CM 817
c81aad 818 - The deprecated API named ``pyramid.request.get_request`` was removed.
CM 819
820 - The deprecated API named ``pyramid.security.Unauthorized`` was
821   removed.
822
823 - The deprecated API named ``pyramid.view.view_execution_permitted``
824   was removed.
825
826 - The deprecated API named ``pyramid.view.NotFound`` was removed.
6a3184 827
CM 828 - The ``bfgshell`` paster command is now named ``pshell``.
829
cba2e1 830 - The Venusian "category" for all built-in Venusian decorators
CM 831   (e.g. ``subscriber`` and ``view_config``/``bfg_view``) is now
832   ``pyramid`` instead of ``bfg``.
3d9dd0 833
CM 834 - ``pyramid.renderers.rendered_response`` function removed; use
835   ``render_pyramid.renderers.render_to_response`` instead.
836
1dad60 837 - Renderer factories now accept a *renderer info object* rather than an
CM 838   absolute resource specification or an absolute path.  The object has the
839   following attributes: ``name`` (the ``renderer=`` value), ``package`` (the
840   'current package' when the renderer configuration statement was found),
841   ``type``: the renderer type, ``registry``: the current registry, and
842   ``settings``: the deployment settings dictionary.
3d9dd0 843
CM 844   Third-party ``repoze.bfg`` renderer implementations that must be ported to
845   Pyramid will need to account for this.
846
f5fa3f 847   This change was made primarily to support more flexible Mako template
CM 848   rendering.
2876a8 849
CM 850 - The presence of the key ``repoze.bfg.message`` in the WSGI environment when
851   an exception occurs is now deprecated.  Instead, code which relies on this
852   environ value should use the ``exception`` attribute of the request
853   (e.g. ``request.exception[0]``) to retrieve the message.
8129f9 854
CM 855 - The values ``bfg_localizer`` and ``bfg_locale_name`` kept on the request
856   during internationalization for caching purposes were never APIs.  These
857   however have changed to ``localizer`` and ``locale_name``, respectively.
858
968f46 859 - The default ``cookie_name`` value of the ``authtktauthenticationpolicy`` ZCML
CM 860   now defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``).
861
862 - The default ``cookie_name`` value of the
863   ``pyramid.authentication.AuthTktAuthenticationPolicy`` constructor now
864   defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``).
7a3465 865
a3dc13 866 - The ``request_type`` argument to the ``view`` ZCML directive, the
CM 867   ``pyramid.configuration.Configurator.add_view`` method, or the
868   ``pyramid.view.view_config`` decorator (nee ``bfg_view``) is no longer
869   permitted to be one of the strings ``GET``, ``HEAD``, ``PUT``, ``POST`` or
870   ``DELETE``, and now must always be an interface.  Accepting the
871   method-strings as ``request_type`` was a backwards compatibility strategy
872   servicing repoze.bfg 1.0 applications.  Use the ``request_method``
873   parameter instead to specify that a view a string request-method predicate.