Michael Merickel
2011-08-21 7ecc829f5a78e2a04a64cc9a44d46a151b171554
commit | author | age
e21ed8 1 1.0 (2011-01-30)
CM 2 ================
3
4 Documentation
5 -------------
6
7 - Fixed bug in ZODB Wiki tutorial (missing dependency on ``docutils`` in
8   "models" step within ``setup.py``).
9
10 - Removed API documentation for ``pyramid.testing`` APIs named
11   ``registerDummySecurityPolicy``, ``registerResources``, ``registerModels``,
12   ``registerEventListener``, ``registerTemplateRenderer``,
13   ``registerDummyRenderer``, ``registerView``, ``registerUtility``,
14   ``registerAdapter``, ``registerSubscriber``, ``registerRoute``,
15   and ``registerSettings``.
16
17 - Moved "Using ZODB With ZEO" and "Using repoze.catalog Within Pyramid"
18   tutorials out of core documentation and into the Pyramid Tutorials site
19   (http://docs.pylonsproject.org/projects/pyramid_tutorials/dev/).
20
21 - Changed "Cleaning up After a Request" section in the URL Dispatch chapter
22   to use ``request.add_finished_callback`` instead of jamming an object with
23   a ``__del__`` into the WSGI environment.
24
25 - Remove duplication of ``add_route`` API documentation from URL Dispatch
26   narrative chapter.
27
28 - Remove duplication of API and narrative documentation in
29   ``pyramid.view.view_config`` API docs by pointing to
30   ``pyramid.config.add_view`` documentation and narrative chapter
31   documentation.
32
33 - Removed some API documentation duplicated in narrative portions of
34   documentation 
35
36 - Removed "Overall Flow of Authentication" from SQLAlchemy + URL Dispatch
37   wiki tutorial due to print space concerns (moved to Pyramid Tutorials
38   site).
39
40 Bug Fixes
41 ---------
42
43 - Deprecated-since-BFG-1.2 APIs from ``pyramid.testing`` now properly emit
44   deprecation warnings.
45
46 - Added ``egg:repoze.retry#retry`` middleware to the WSGI pipeline in ZODB
47   templates (retry ZODB conflict errors which occur in normal operations).
48
49 - Removed duplicate implementations of ``is_response``.  Two competing
50   implementations existed: one in ``pyramid.config`` and one in
51   ``pyramid.view``.  Now the one defined in ``pyramid.view`` is used
52   internally by ``pyramid.config`` and continues to be advertised as an API.
53
54 1.0b3 (2011-01-28)
55 ==================
56
57 Bug Fixes
58 ---------
59
60 - Use © instead of copyright symbol in paster templates / tutorial
61   templates for the benefit of folks who cutnpaste and save to a non-UTF8
62   format.
63
64 - ``pyramid.view.append_slash_notfound_view`` now preserves GET query
65   parameters across redirects.
66
67 Documentation
68 -------------
69
70 - Beef up documentation related to ``set_default_permission``: explicitly
71   mention that default permissions also protect exception views.
72
73 - Paster templates and tutorials now use spaces instead of tabs in their HTML
74   templates.
75
76 1.0b2 (2011-01-24)
77 ==================
78
79 Bug Fixes
80 ---------
81
82 - The ``production.ini`` generated by all paster templates now have an
83   effective logging level of WARN, which prevents e.g. SQLAlchemy statement
84   logging and other inappropriate output.
85
86 - The ``production.ini`` of the ``pyramid_routesalchemy`` and
87   ``pyramid_alchemy`` paster templates did not have a ``sqlalchemy`` logger
88   section, preventing ``paster serve production.ini`` from working.
89
90 - The ``pyramid_routesalchemy`` and ``pyramid_alchemy`` paster templates used
91   the ``{{package}}`` variable in a place where it should have used the
92   ``{{project}}`` variable, causing applications created with uppercase
93   letters e.g. ``paster create -t pyramid_routesalchemy Dibbus`` to fail to
94   start when ``paster serve development.ini`` was used against the result.
95   See https://github.com/Pylons/pyramid/issues/#issue/107
96
97 - The ``render_view`` method of ``pyramid.renderers.RendererHelper`` passed
98   an incorrect value into the renderer for ``renderer_info``.  It now passes
99   an instance of ``RendererHelper`` instead of a dictionary, which is
100   consistent with other usages.  See
101   https://github.com/Pylons/pyramid/issues#issue/106
102
103 - A bug existed in the ``pyramid.authentication.AuthTktCookieHelper`` which
104   would break any usage of an AuthTktAuthenticationPolicy when one was
105   configured to reissue its tokens (``reissue_time`` < ``timeout`` /
106   ``max_age``). Symptom: ``ValueError: ('Invalid token %r', '')``.  See
107   https://github.com/Pylons/pyramid/issues#issue/108.
108
109 1.0b1 (2011-01-21)
110 ==================
111
112 Features
113 --------
114
115 - The AuthTktAuthenticationPolicy now accepts a ``tokens`` parameter via
116   ``pyramid.security.remember``.  The value must be a sequence of strings.
117   Tokens are placed into the auth_tkt "tokens" field and returned in the
118   auth_tkt cookie.
119
120 - Add ``wild_domain`` argument to AuthTktAuthenticationPolicy, which defaults
121   to ``True``.  If it is set to ``False``, the feature of the policy which
122   sets a cookie with a wilcard domain will be turned off.
123
124 - Add a ``MANIFEST.in`` file to each paster template. See
125   https://github.com/Pylons/pyramid/issues#issue/95
126
127 Bug Fixes
128 ---------
129
130 - ``testing.setUp`` now adds a ``settings`` attribute to the registry (both
131   when it's passed a registry without any settings and when it creates one).
132
133 - The ``testing.setUp`` function now takes a ``settings`` argument, which
134   should be a dictionary.  Its values will subsequently be available on the
135   returned ``config`` object as ``config.registry.settings``.
136
137 Documentation
138 -------------
139
140 - Added "What's New in Pyramid 1.0" chapter to HTML rendering of
141   documentation.
142
143 - Merged caseman-master narrative editing branch, many wording fixes and
144   extensions.
145
146 - Fix deprecated example showing ``chameleon_zpt`` API call in testing
147   narrative chapter.
148
149 - Added "Adding Methods to the Configurator via ``add_directive``" section to
150   Advanced Configuration narrative chapter.
151
152 - Add docs for ``add_finished_callback``, ``add_response_callback``,
153   ``route_path``, ``route_url``, and ``static_url`` methods to
154   ``pyramid.request.Request`` API docs.
155
156 - Add (minimal) documentation about using I18N within Mako templates to
157   "Internationalization and Localization" narrative chapter.
158
159 - Move content of "Forms" chapter back to "Views" chapter; I can't think of a
160   better place to put it.
161
162 - Slightly improved interface docs for ``IAuthorizationPolicy``.
163
164 - Minimally explain usage of custom regular expressions in URL dispatch
165   replacement markers within URL Dispatch chapter.
166
167 Deprecations
168 -------------
169
170 - Using the ``pyramid.view.bfg_view`` alias for ``pyramid.view.view_config``
171   (a backwards compatibility shim) now issues a deprecation warning.
172
173 Backwards Incompatibilities
174 ---------------------------
175
176 - Using ``testing.setUp`` now registers an ISettings utility as a side
177   effect.  Some test code which queries for this utility after
178   ``testing.setUp`` via queryAdapter will expect a return value of ``None``.
179   This code will need to be changed.
180
181 - When a ``pyramid.exceptions.Forbidden`` error is raised, its status code
182   now ``403 Forbidden``.  It was previously ``401 Unauthorized``, for
183   backwards compatibility purposes with ``repoze.bfg``.  This change will
184   cause problems for users of Pyramid with ``repoze.who``, which intercepts
185   ``401 Unauthorized`` by default, but allows ``403 Forbidden`` to pass
186   through.  Those deployments will need to configure ``repoze.who`` to also
187   react to ``403 Forbidden``.
188
189 - The default value for the ``cookie_on_exception`` parameter to
190   ``pyramid.session.UnencyrptedCookieSessionFactory`` is now ``True``.  This
191   means that when view code causes an exception to be raised, and the session
192   has been mutated, a cookie will be sent back in the response.  Previously
193   its default value was ``False``.
194
195 Paster Templates
196 ----------------
197
198 - The ``pyramid_zodb``, ``pyramid_routesalchemy`` and ``pyramid_alchemy``
199   paster templates now use a default "commit veto" hook when configuring the
200   ``repoze.tm2`` transaction manager in ``development.ini``.  This prevents a
201   transaction from being committed when the response status code is within
202   the 400 or 500 ranges.  See also
203   http://docs.repoze.org/tm2/#using-a-commit-veto.
204
205 1.0a10 (2011-01-18)
206 ===================
207
208 Bug Fixes
209 ---------
210
211 - URL dispatch now properly handles a ``.*`` or ``*`` appearing in a regex
212   match when used inside brackets.  Resolves issue #90.
213
214 Backwards Incompatibilities
215 ---------------------------
216
217 - The ``add_handler`` method of a Configurator has been removed from the
218   Pyramid core.  Handlers are now a feature of the ``pyramid_handlers``
219   package, which can be downloaded from PyPI.  Documentation for the package
220   should be available via
221   http://pylonsproject.org/projects/pyramid_handlers/dev/, which describes how
222   to add a configuration statement to your ``main`` block to reobtain this
223   method.  You will also need to add an ``install_requires`` dependency upon
224   ``pyramid_handlers`` to your ``setup.py`` file.
225
226 - The ``load_zcml`` method of a Configurator has been removed from the
227   Pyramid core.  Loading ZCML is now a feature of the ``pyramid_zcml``
228   package, which can be downloaded from PyPI.  Documentation for the package
229   should be available via
230   http://pylonsproject.org/projects/pyramid_zcml/dev/, which describes how
231   to add a configuration statement to your ``main`` block to reobtain this
232   method.  You will also need to add an ``install_requires`` dependency upon
233   ``pyramid_zcml`` to your ``setup.py`` file.
234
235 - The ``pyramid.includes`` subpackage has been removed.  ZCML files which use
236   include the package ``pyramid.includes`` (e.g. ``<include
237   package="pyramid.includes"/>``) now must include the ``pyramid_zcml``
238   package instead (e.g. ``<include package="pyramid_zcml"/>``).
239
240 - The ``pyramid.view.action`` decorator has been removed from the Pyramid
241   core.  Handlers are now a feature of the ``pyramid_handlers`` package.  It
242   should now be imported from ``pyramid_handlers`` e.g. ``from
243   pyramid_handlers import action``.
244
245 - The ``handler`` ZCML directive has been removed.  It is now a feature of
246   the ``pyramid_handlers`` package.
247
248 - The ``pylons_minimal``, ``pylons_basic`` and ``pylons_sqla`` paster
249   templates were removed.  Use ``pyramid_sqla`` (available from PyPI) as a
250   generic replacement for Pylons-esque development.
251
252 - The ``make_app`` function has been removed from the ``pyramid.router``
253   module.  It continues life within the ``pyramid_zcml`` package.  This
254   leaves the ``pyramid.router`` module without any API functions.
255
256 - The ``configure_zcml`` setting within the deployment settings (within
257   ``**settings`` passed to a Pyramid ``main`` function) has ceased to have any
258   meaning.
259
260 Features
261 --------
262
263 - ``pyramid.testing.setUp`` and ``pyramid.testing.tearDown`` have been
264   undeprecated.  They are now the canonical setup and teardown APIs for test
265   configuration, replacing "direct" creation of a Configurator.  This is a
266   change designed to provide a facade that will protect against any future
267   Configurator deprecations.
268
269 - Add ``charset`` attribute to ``pyramid.testing.DummyRequest``
270   (unconditionally ``UTF-8``).
271
272 - Add ``add_directive`` method to configurator, which allows framework
273   extenders to add methods to the configurator (ala ZCML directives).
274
275 - When ``Configurator.include`` is passed a *module* as an argument, it
276   defaults to attempting to find and use a callable named ``includeme``
277   within that module.  This makes it possible to use
278   ``config.include('some.module')`` rather than
279   ``config.include('some.module.somefunc')`` as long as the include function
280   within ``some.module`` is named ``includeme``.
281
282 - The ``bfg2pyramid`` script now converts ZCML include tags that have
283   ``repoze.bfg.includes`` as a package attribute to the value
284   ``pyramid_zcml``.  For example, ``<include package="repoze.bfg.includes">``
285   will be converted to ``<include package="pyramid_zcml">``.
286
287 Paster Templates
288 ----------------
289
290 - All paster templates now use ``pyramid.testing.setUp`` and
291   ``pyramid.testing.tearDown`` rather than creating a Configurator "by hand"
292   within their ``tests.py`` module, as per decision in features above.
293
294 - The ``starter_zcml`` paster template has been moved to the ``pyramid_zcml``
295   package.
296
297 Documentation
298 -------------
299
300 - The wiki and wiki2 tutorials now use ``pyramid.testing.setUp`` and
301   ``pyramid.testing.tearDown`` rather than creating a Configurator "by hand",
302   as per decision in features above.
303
304 - The "Testing" narrative chapter now explains ``pyramid.testing.setUp`` and
305   ``pyramid.testing.tearDown`` instead of Configurator creation and
306   ``Configurator.begin()`` and ``Configurator.end()``.
307
308 - Document the ``request.override_renderer`` attribute within the narrative
309   "Renderers" chapter in a section named "Overriding A Renderer at Runtime".
310
311 - The "Declarative Configuration" narrative chapter has been removed (it was
312   moved to the ``pyramid_zcml`` package).
313
314 - Most references to ZCML in narrative chapters have been removed or
315   redirected to ``pyramid_zcml`` locations.
316
317 Deprecations
318 ------------
319
320 - Deprecation warnings related to import of the following API functions were
321   added: ``pyramid.traversal.find_model``, ``pyramid.traversal.model_path``,
322   ``pyramid.traversal.model_path_tuple``, ``pyramid.url.model_url``.  The
323   instructions emitted by the deprecation warnings instruct the developer to
324   change these method spellings to their ``resource`` equivalents.  This is a
325   consequence of the mass concept rename of "model" to "resource" performed
326   in 1.0a7.
327
328 1.0a9 (2011-01-08)
329 ==================
330
331 Bug Fixes
332 ---------
333
334 - The ``proutes`` command tried too hard to resolve the view for printing,
335   resulting in exceptions when an exceptional root factory was encountered.
336   Instead of trying to resolve the view, if it cannot, it will now just print
337   ``<unknown>``.
338
339 - The `self` argument was included in new methods of the ``ISession`` interface
340   signature, causing ``pyramid_beaker`` tests to fail.
341
342 - Readd ``pyramid.traversal.model_path_tuple`` as an alias for
343   ``pyramid.traversal.resource_path_tuple`` for backwards compatibility.
344
345 Features
346 --------
347
348 - Add a new API ``pyramid.url.current_route_url``, which computes a URL based
349   on the "current" route (if any) and its matchdict values.
350
351 - ``config.add_view`` now accepts a ``decorator`` keyword argument, a callable
352   which will decorate the view callable before it is added to the registry.
353
354 - If a handler class provides an ``__action_decorator__`` attribute (usually
355   a classmethod or staticmethod), use that as the decorator for each view
356   registration for that handler.
357
358 - The ``pyramid.interfaces.IAuthenticationPolicy`` interface now specifies an
359   ``unauthenticated_userid`` method.  This method supports an important
360   optimization required by people who are using persistent storages which do
361   not support object caching and whom want to create a "user object" as a
362   request attribute.
363
364 - A new API has been added to the ``pyramid.security`` module named
365   ``unauthenticated_userid``.  This API function calls the
366   ``unauthenticated_userid`` method of the effective security policy.
367
368 - An ``unauthenticated_userid`` method has been added to the dummy
369   authentication policy returned by
370   ``pyramid.config.Configurator.testing_securitypolicy``.  It returns the
371   same thing as that the dummy authentication policy's
372   ``authenticated_userid`` method.
373
374 - The class ``pyramid.authentication.AuthTktCookieHelper`` is now an API.
375   This class can be used by third-party authentication policy developers to
376   help in the mechanics of authentication cookie-setting.
377
378 - New constructor argument to Configurator: ``default_view_mapper``.  Useful
379   to create systems that have alternate view calling conventions.  A view
380   mapper allows objects that are meant to be used as view callables to have
381   an arbitrary argument list and an arbitrary result.  The object passed as
382   ``default_view_mapper`` should implement the
383   ``pyramid.interfaces.IViewMapperFactory`` interface.
384
385 - add a ``set_view_mapper`` API to Configurator.  Has
386   the same result as passing ``default_view_mapper`` to the Configurator
387   constructor.
388
389 - ``config.add_view`` now accepts a ``mapper`` keyword argument, which should
390   either be ``None``, a string representing a Python dotted name, or an
391   object which is an ``IViewMapperFactory``.  This feature is not useful for
392   "civilians", only for extension writers.
393
394 - Allow static renderer provided during view registration to be overridden at
395   request time via a request attribute named ``override_renderer``, which
396   should be the name of a previously registered renderer.  Useful to provide
397   "omnipresent" RPC using existing rendered views.
398
399 - Instances of ``pyramid.testing.DummyRequest`` now have a ``session``
400   object, which is mostly a dictionary, but also implements the other session
401   API methods for flash and CSRF.
402
403 Backwards Incompatibilities
404 ---------------------------
405
406 - Since the ``pyramid.interfaces.IAuthenticationPolicy`` interface now
407   specifies that a policy implementation must implement an
408   ``unauthenticated_userid`` method, all third-party custom authentication
409   policies now must implement this method.  It, however, will only be called
410   when the global function named ``pyramid.security.unauthenticated_userid``
411   is invoked, so if you're not invoking that, you will not notice any issues.
412
413 - ``pyramid.interfaces.ISession.get_csrf_token`` now mandates that an
414   implementation should return a *new* token if one doesn't already exist in
415   the session (previously it would return None).  The internal sessioning
416   implementation has been changed.
417
418 Documentation
419 -------------
420
421 - The (weak) "Converting a CMF Application to Pyramid" tutorial has been
422   removed from the tutorials section.  It was moved to the
423   ``pyramid_tutorials`` Github repository.
424
425 - The "Resource Location and View Lookup" chapter has been replaced with a
426   variant of Rob Miller's "Much Ado About Traversal" (originally published at
427   http://blog.nonsequitarian.org/2010/much-ado-about-traversal/).
428
429 - Many minor wording tweaks and refactorings (merged Casey Duncan's docs
430   fork, in which he is working on general editing).
431
432 - Added (weak) description of new view mapper feature to Hooks narrative
433   chapter.
434
435 - Split views chapter into 2: View Callables and View Configuration.
436
437 - Reorder Renderers and Templates chapters after View Callables but before
438   View Configuration.
439
440 - Merge Session Objects, Cross-Site Request Forgery, and Flash Messaging
441   chapter into a single Sessions chapter.
442
443 - The Wiki and Wiki2 tutorials now have much nicer CSS and graphics.
444
445 Internals
446 ---------
447
448 - The "view derivation" code is now factored into a set of classes rather
449   than a large number of standalone functions (a side effect of the
450   view mapper refactoring).
451
452 - The ``pyramid.renderer.RendererHelper`` class has grown a ``render_view``
453   method, which is used by the default view mapper (a side effect of the
454   view mapper refactoring).
455
456 - The object passed as ``renderer`` to the "view deriver" is now an instance
457   of ``pyramid.renderers.RendererHelper`` rather than a dictionary (a side
458   effect of view mapper refactoring).
459
460 - The class used as the "page template" in ``pyramid.chameleon_text`` was
461   removed, in preference to using a Chameleon-inbuilt version.
462
463 - A view callable wrapper registered in the registry now contains an
464   ``__original_view__`` attribute which references the original view callable
465   (or class).
466
467 - The (non-API) method of all internal authentication policy implementations
468   previously named ``_get_userid`` is now named ``unauthenticated_userid``,
469   promoted to an API method.  If you were overriding this method, you'll now
470   need to override it as ``unauthenticated_userid`` instead.
471
472 - Remove (non-API) function of config.py named _map_view.
473
474 1.0a8 (2010-12-27)
475 ==================
476
477 Bug Fixes
478 ---------
479
480 - The name ``registry`` was not available in the ``paster pshell``
481   environment under IPython.
482
483 Features
484 --------
485
486 - If a resource implements a ``__resource_url__`` method, it will be called
487   as the result of invoking the ``pyramid.url.resource_url`` function to
488   generate a URL, overriding the default logic.  See the new "Generating The
489   URL Of A Resource" section within the Resources narrative chapter.
490
491 - Added flash messaging, as described in the "Flash Messaging" narrative
492   documentation chapter.
493
494 - Added CSRF token generation, as described in the narrative chapter entitled
495   "Preventing Cross-Site Request Forgery Attacks".
496
497 - Prevent misunderstanding of how the ``view`` and ``view_permission``
498   arguments to add_route work by raising an exception during configuration if
499   view-related arguments exist but no ``view`` argument is passed.
500
501 - Add ``paster proute`` command which displays a summary of the routing
502   table.  See the narrative documentation section within the "URL Dispatch"
503   chapter entitled "Displaying All Application Routes".
504
505 Paster Templates
506 ----------------
507
508 - The ``pyramid_zodb`` Paster template no longer employs ZCML.  Instead, it
509   is based on scanning.
510
511 Documentation
512 -------------
513
514 - Added "Generating The URL Of A Resource" section to the Resources narrative
515   chapter (includes information about overriding URL generation using
516   ``__resource_url__``).
517
518 - Added "Generating the Path To a Resource" section to the Resources
519   narrative chapter.
520
521 - Added "Finding a Resource by Path" section to the Resources narrative
522   chapter.
523
524 - Added "Obtaining the Lineage of a Resource" to the Resources narrative
525   chapter.
526
527 - Added "Determining if a Resource is In The Lineage of Another Resource" to
528   Resources narrative chapter.
529
530 - Added "Finding the Root Resource" to Resources narrative chapter.
531
532 - Added "Finding a Resource With a Class or Interface in Lineage" to
533   Resources narrative chapter.
534
535 - Added a "Flash Messaging" narrative documentation chapter.
536
537 - Added a narrative chapter entitled "Preventing Cross-Site Request Forgery
538   Attacks".
539
540 - Changed the "ZODB + Traversal Wiki Tutorial" based on changes to
541   ``pyramid_zodb`` Paster template.
542
543 - Added "Advanced Configuration" narrative chapter which documents how to
544   deal with configuration conflicts, two-phase configuration, ``include`` and
545   ``commit``.
546
547 - Fix API documentation rendering for ``pyramid.view.static``
548
549 - Add "Pyramid Provides More Than One Way to Do It" to Design Defense
550   documentation.
551
552 - Changed "Static Assets" narrative chapter: clarify that ``name`` represents
553   a prefix unless it's a URL, added an example of a root-relative static view
554   fallback for URL dispatch, added an example of creating a simple view that
555   returns the body of a file.
556
557 - Move ZCML usage in Hooks chapter to Declarative Configuration chapter.
558
559 - Merge "Static Assets" chapter into the "Assets" chapter.
560
561 - Added narrative documentation section within the "URL Dispatch" chapter
562   entitled "Displaying All Application Routes" (for ``paster proutes``
563   command).
564
565 1.0a7 (2010-12-20)
566 ==================
567
568 Terminology Changes
569 -------------------
570
571 - The Pyramid concept previously known as "model" is now known as "resource".
572   As a result:
573
574   - The following API changes have been made::
575
576       pyramid.url.model_url -> 
577                         pyramid.url.resource_url
578
579       pyramid.traversal.find_model -> 
580                         pyramid.url.find_resource
581
582       pyramid.traversal.model_path ->
583                         pyramid.traversal.resource_path
584
585       pyramid.traversal.model_path_tuple ->
586                         pyramid.traversal.resource_path_tuple
587
588       pyramid.traversal.ModelGraphTraverser -> 
589                         pyramid.traversal.ResourceTreeTraverser
590
591       pyramid.config.Configurator.testing_models ->
592                         pyramid.config.Configurator.testing_resources
593
594       pyramid.testing.registerModels ->
595                         pyramid.testing.registerResources
596
597       pyramid.testing.DummyModel ->
598                         pyramid.testing.DummyResource
599
600    - All documentation which previously referred to "model" now refers to
601      "resource".
602
603    - The ``starter`` and ``starter_zcml`` paster templates now have a
604      ``resources.py`` module instead of a ``models.py`` module.
605
606   - Positional argument names of various APIs have been changed from
607     ``model`` to ``resource``.
608
609   Backwards compatibility shims have been left in place in all cases.  They
610   will continue to work "forever".
611
612 - The Pyramid concept previously known as "resource" is now known as "asset".
613   As a result:
614
615   - The (non-API) module previously known as ``pyramid.resource`` is now
616     known as ``pyramid.asset``.
617
618   - All docs that previously referred to "resource specification" now refer
619     to "asset specification".
620
621   - The following API changes were made::
622
623       pyramid.config.Configurator.absolute_resource_spec ->
624                         pyramid.config.Configurator.absolute_asset_spec
625
626       pyramid.config.Configurator.override_resource ->
627                         pyramid.config.Configurator.override_asset
628
629   - The ZCML directive previously known as ``resource`` is now known as
630     ``asset``.
631
632   - The setting previously known as ``BFG_RELOAD_RESOURCES`` (envvar) or
633     ``reload_resources`` (config file) is now known, respectively, as
634     ``PYRAMID_RELOAD_ASSETS`` and ``reload_assets``.
635
636   Backwards compatibility shims have been left in place in all cases.  They
637   will continue to work "forever".
638
639 Bug Fixes
640 ---------
641
642 - Make it possible to succesfully run all tests via ``nosetests`` command
643   directly (rather than indirectly via ``python setup.py nosetests``).
644
645 - When a configuration conflict is encountered during scanning, the conflict
646   exception now shows the decorator information that caused the conflict.
647
648 Features
649 --------
650
651 - Added ``debug_routematch`` configuration setting that logs matched routes
652   (including the matchdict and predicates).
653
654 - The name ``registry`` is now available in a ``pshell`` environment by
655   default.  It is the application registry object.
656
657 Environment
658 -----------
659
660 - All environment variables which used to be prefixed with ``BFG_`` are now
661   prefixed with ``PYRAMID_`` (e.g. ``BFG_DEBUG_NOTFOUND`` is now
662   ``PYRAMID_DEBUG_NOTFOUND``)
663
664 Documentation
665 -------------
666
667 - Added "Debugging Route Matching" section to the urldispatch narrative
668   documentation chapter.
669
670 - Added reference to ``PYRAMID_DEBUG_ROUTEMATCH`` envvar and ``debug_routematch``
671   config file setting to the Environment narrative docs chapter.
672
673 - Changed "Project" chapter slightly to expand on use of ``paster pshell``.
674
675 - Direct Jython users to Mako rather than Jinja2 in "Install" narrative
676   chapter.
677
678 - Many changes to support terminological renaming of "model" to "resource"
679   and "resource" to "asset".
680
681 - Added an example of ``WebTest`` functional testing to the testing narrative
682   chapter.
683
684 - Rearranged chapter ordering by popular demand (URL dispatch first, then
685   traversal).  Put hybrid chapter after views chapter.
686
687 - Split off "Renderers" as its own chapter from "Views" chapter in narrative
688   documentation.
689
690 Paster Templates
691 ----------------
692
693 - Added ``debug_routematch = false`` to all paster templates.
694
695 Dependencies
696 ------------
697
698 - Depend on Venusian >= 0.5 (for scanning conflict exception decoration).
699
700 1.0a6 (2010-12-15)
701 ==================
702
703 Bug Fixes
704 ---------
705
706 - 1.0a5 introduced a bug when ``pyramid.config.Configurator.scan`` was used
707   without a ``package`` argument (e.g. ``config.scan()`` as opposed to
708   ``config.scan('packagename')``.  The symptoms were: lots of deprecation
709   warnings printed to the console about imports of deprecated Pyramid
710   functions and classes and non-detection of view callables decorated with
711   ``view_config`` decorators.  This has been fixed.
712
713 - Tests now pass on Windows (no bugs found, but a few tests in the test suite
714   assumed UNIX path segments in filenames).
715
716 Documentation
717 -------------
718
719 - If you followed it to-the-letter, the ZODB+Traversal Wiki tutorial would
720   instruct you to run a test which would fail because the view callable
721   generated by the ``pyramid_zodb`` tutorial used a one-arg view callable,
722   but the test in the sample code used a two-arg call.
723
724 - Updated ZODB+Traversal tutorial setup.py of all steps to match what's
725   generated by ``pyramid_zodb``.
726
727 - Fix reference to ``repoze.bfg.traversalwrapper`` in "Models" chapter (point
728   at ``pyramid_traversalwrapper`` instead).
729
730 1.0a5 (2010-12-14)
731 ==================
732
733 Features
734 --------
735
736 - Add a ``handler`` ZCML directive.  This directive does the same thing as
737   ``pyramid.configuration.add_handler``.
738
739 - A new module named ``pyramid.config`` was added.  It subsumes the duties of
740   the older ``pyramid.configuration`` module.
741
742 - The new ``pyramid.config.Configurator` class has API methods that the older
743   ``pyramid.configuration.Configurator`` class did not: ``with_context`` (a
744   classmethod), ``include``, ``action``, and ``commit``.  These methods exist
745   for imperative application extensibility purposes.
746
747 - The ``pyramid.testing.setUp`` function now accepts an ``autocommit``
748   keyword argument, which defaults to ``True``.  If it is passed ``False``,
749   the Config object returned by ``setUp`` will be a non-autocommiting Config
750   object.
751
752 - Add logging configuration to all paster templates.
753
754 - ``pyramid_alchemy``, ``pyramid_routesalchemy``, and ``pylons_sqla`` paster
755   templates now use idiomatic SQLAlchemy configuration in their respective
756   ``.ini`` files and Python code.
757
758 - ``pyramid.testing.DummyRequest`` now has a class variable,
759   ``query_string``, which defaults to the empty string.
760
761 - Add support for json on GAE by catching NotImplementedError and importing
762   simplejson from django.utils.
763
764 - The Mako renderer now accepts a resource specification for
765   ``mako.module_directory``.
766
767 - New boolean Mako settings variable ``mako.strict_undefined``.  See `Mako
768   Context Variables
769   <http://www.makotemplates.org/docs/runtime.html#context-variables>`_ for
770   its meaning.
771
772 Dependencies
773 ------------
774
775 - Depend on Mako 0.3.6+ (we now require the ``strict_undefined`` feature).
776
777 Bug Fixes
778 ---------
779
780 - When creating a Configurator from within a ``paster pshell`` session, you
781   were required to pass a ``package`` argument although ``package`` is not
782   actually required.  If you didn't pass ``package``, you would receive an
783   error something like ``KeyError: '__name__'`` emanating from the
784   ``pyramid.path.caller_module`` function.  This has now been fixed.
785
786 - The ``pyramid_routesalchemy`` paster template's unit tests failed
787   (``AssertionError: 'SomeProject' != 'someproject'``).  This is fixed.
788
789 - Make default renderer work (renderer factory registered with no name, which
790   is active for every view unless the view names a specific renderer).
791
792 - The Mako renderer did not properly turn the ``mako.imports``,
793   ``mako.default_filters``, and ``mako.imports`` settings into lists.
794
795 - The Mako renderer did not properly convert the ``mako.error_handler``
796   setting from a dotted name to a callable.
797
798 Documentation
799 -------------
800
801 - Merged many wording, readability, and correctness changes to narrative
802   documentation chapters from https://github.com/caseman/pyramid (up to and
803   including "Models" narrative chapter).
804
805 - "Sample Applications" section of docs changed to note existence of Cluegun,
806   Shootout and Virginia sample applications, ported from their repoze.bfg
807   origin packages.
808
809 - SQLAlchemy+URLDispatch tutorial updated to integrate changes to
810   ``pyramid_routesalchemy`` template.
811
812 - Add ``pyramid.interfaces.ITemplateRenderer`` interface to Interfaces API
813   chapter (has ``implementation()`` method, required to be used when getting
814   at Chameleon macros).
815
816 - Add a "Modifying Package Structure" section to the project narrative
817   documentation chapter (explain turning a module into a package).
818
819 - Documentation was added for the new ``handler`` ZCML directive in the ZCML
820   section.
821
822 Deprecations
823 ------------
824
825 - ``pyramid.configuration.Configurator`` is now deprecated.  Use
826   ``pyramid.config.Configurator``, passing its constructor
827   ``autocommit=True`` instead.  The ``pyramid.configuration.Configurator``
828   alias will live for a long time, as every application uses it, but its
829   import now issues a deprecation warning.  The
830   ``pyramid.config.Configurator`` class has the same API as
831   ``pyramid.configuration.Configurator`` class, which it means to replace,
832   except by default it is a *non-autocommitting* configurator. The
833   now-deprecated ``pyramid.configuration.Configurator`` will autocommit every
834   time a configuration method is called.
835
836   The ``pyramid.configuration`` module remains, but it is deprecated.  Use
837   ``pyramid.config`` instead.
838
839 1.0a4 (2010-11-21)
840 ==================
841
842 Features
843 --------
844
845 - URL Dispatch now allows for replacement markers to be located anywhere
846   in the pattern, instead of immediately following a ``/``.
847
848 - URL Dispatch now uses the form ``{marker}`` to denote a replace marker in
849   the route pattern instead of ``:marker``. The old colon-style marker syntax
850   is still accepted for backwards compatibility. The new format allows a
851   regular expression for that marker location to be used instead of the
852   default ``[^/]+``, for example ``{marker:\d+}`` is now valid to require the
853   marker to be digits.
854
855 - Add a ``pyramid.url.route_path`` API, allowing folks to generate relative
856   URLs.  Calling ``route_path`` is the same as calling
857   ``pyramid.url.route_url`` with the argument ``_app_url`` equal to the empty
858   string.
859
860 - Add a ``pyramid.request.Request.route_path`` API.  This is a convenience
861   method of the request which calls ``pyramid.url.route_url``.
862
863 - Make test suite pass on Jython (requires PasteScript trunk, presumably to
864   be 1.7.4).
865
866 - Make test suite pass on PyPy (Chameleon doesn't work).
867
868 - Surrounding application configuration with ``config.begin()`` and
869   ``config.end()`` is no longer necessary.  All paster templates have been
870   changed to no longer call these functions.
871
872 - Fix configurator to not convert ``ImportError`` to ``ConfigurationError``
873   if the import that failed was unrelated to the import requested via a
874   dotted name when resolving dotted names (such as view dotted names).
875
876 Documentation
877 -------------
878
879 - SQLAlchemy+URLDispatch and ZODB+Traversal tutorials have been updated to
880   not call ``config.begin()`` or ``config.end()``.
881
882 Bug Fixes
883 ---------
884
885 - Add deprecation warnings to import of ``pyramid.chameleon_text`` and
886   ``pyramid.chameleon_zpt`` of ``get_renderer``, ``get_template``,
887   ``render_template``, and ``render_template_to_response``.
888
889 - Add deprecation warning for import of ``pyramid.zcml.zcml_configure`` and
890   ``pyramid.zcml.file_configure``.
891
892 - The ``pyramid_alchemy`` paster template had a typo, preventing an import
893   from working.
894
895 - Fix apparent failures when calling ``pyramid.traversal.find_model(root,
896   path)`` or ``pyramid.traversal.traverse(path)`` when ``path`` is
897   (erroneously) a Unicode object. The user is meant to pass these APIs a
898   string object, never a Unicode object.  In practice, however, users indeed
899   pass Unicode.  Because the string that is passed must be ASCII encodeable,
900   now, if they pass a Unicode object, its data is eagerly converted to an
901   ASCII string rather than being passed along to downstream code as a
902   convenience to the user and to prevent puzzling second-order failures from
903   cropping up (all failures will occur within ``pyramid.traversal.traverse``
904   rather than later down the line as the result of calling e.g.
905   ``traversal_path``).
906
907 Backwards Incompatibilities
908 ---------------------------
909
910 - The ``pyramid.testing.zcml_configure`` API has been removed.  It had been
911   advertised as removed since repoze.bfg 1.2a1, but hadn't actually been.
912
913 Deprecations
914 ------------
915
916 - The ``pyramid.settings.get_settings`` API is now deprecated.  Use
917   ``pyramid.threadlocals.get_current_registry().settings`` instead or use the
918   ``settings`` attribute of the registry available from the request
919   (``request.registry.settings``).
920
921 Documentation
922 -------------
923
924 - Removed ``zodbsessions`` tutorial chapter.  It's still useful, but we now
925   have a SessionFactory abstraction which competes with it, and maintaining
926   documentation on both ways to do it is a distraction.
927
928 Internal
929 --------
930
931 - Replace Twill with WebTest in internal integration tests (avoid deprecation
932   warnings generated by Twill).
933
934 1.0a3 (2010-11-16)
935 ==================
936
937 Features
938 --------
939
940 - Added Mako TemplateLookup settings for ``mako.error_handler``,
941   ``mako.default_filters``, and ``mako.imports``.
942
943 - Normalized all paster templates: each now uses the name ``main`` to
944   represent the function that returns a WSGI application, each now uses
945   WebError, each now has roughly the same shape of development.ini style.
946
947 - Added class vars ``matchdict`` and ``matched_route`` to
948   ``pyramid.request.Request``.  Each is set to ``None``.
949
950 - New API method: ``pyramid.settings.asbool``.
951
952 - New API methods for ``pyramid.request.Request``: ``model_url``,
953   ``route_url``, and ``static_url``.  These are simple passthroughs for their
954   respective functions in ``pyramid.url``.
955
956 - The ``settings`` object which used to be available only when
957   ``request.settings.get_settings`` was called is now available as
958   ``registry.settings`` (e.g. ``request.registry.settings`` in view code).
959
960 Bug Fixes
961 ---------
962
963 - The pylons_* paster templates erroneously used the ``{squiggly}`` routing
964   syntax as the pattern supplied to ``add_route``.  This style of routing is
965   not supported.  They were replaced with ``:colon`` style route patterns.
966
967 - The pylons_* paster template used the same string
968   (``your_app_secret_string``) for the ``session.secret`` setting in the
969   generated ``development.ini``.  This was a security risk if left unchanged
970   in a project that used one of the templates to produce production
971   applications.  It now uses a randomly generated string.
972
973 Documentation
974 -------------
975
976 - ZODB+traversal wiki (``wiki``) tutorial updated due to changes to
977   ``pyramid_zodb`` paster template.
978
979 - SQLAlchemy+urldispach wiki (``wiki2``) tutorial updated due to changes to
980   ``pyramid_routesalchemy`` paster template.
981
982 - Documented the ``matchdict`` and ``matched_route`` attributes of the
983   request object in the Request API documentation.
984
985 Deprecations
986 ------------
987
988 - Obtaining the ``settings`` object via
989   ``registry.{get|query}Utility(ISettings)`` is now deprecated.  Instead,
990   obtain the ``settings`` object via the ``registry.settings`` attribute.  A
991   backwards compatibility shim was added to the registry object to register
992   the settings object as an ISettings utility when ``setattr(registry,
993   'settings', foo)`` is called, but it will be removed in a later release.
994
995 - Obtaining the ``settings`` object via ``pyramid.settings.get_settings`` is
996   now deprecated.  Obtain it as the ``settings`` attribute of the registry
997   now (obtain the registry via ``pyramid.threadlocal.get_registry`` or as
998   ``request.registry``).
999
1000 Behavior Differences
1001 --------------------
1002
1003 - Internal: ZCML directives no longer call get_current_registry() if there's
1004   a ``registry`` attribute on the ZCML context (kill off use of
1005   threadlocals).
1006
1007 - Internal: Chameleon template renderers now accept two arguments: ``path``
1008   and ``lookup``.  ``Lookup`` will be an instance of a lookup class which
1009   supplies (late-bound) arguments for debug, reload, and translate.  Any
1010   third-party renderers which use (the non-API) function
1011   ``pyramid.renderers.template_renderer_factory`` will need to adjust their
1012   implementations to obey the new callback argument list.  This change was to
1013   kill off inappropriate use of threadlocals.
1014
1015 1.0a2 (2010-11-09)
1016 ==================
1017
1018 Documentation
1019 -------------
1020
1021 - All references to events by interface
1022   (e.g. ``pyramid.interfaces.INewRequest``) have been changed to reference
1023   their concrete classes (e.g. ``pyramid.events.NewRequest``) in
1024   documentation about making subscriptions.
1025
1026 - All references to Pyramid-the-application were changed from mod-`pyramid`
1027   to app-`Pyramid`.  A custom role setting was added to ``docs/conf.py`` to
1028   allow for this.  (internal)
1029
1030 1.0a1 (2010-11-05)
1031 ==================
1032
1033 Features (delta from BFG 1.3)
1034 -------------------------------
1035
1036 - Mako templating renderer supports resource specification format for
1037   template lookups and within Mako templates. Absolute filenames must
1038   be used in Pyramid to avoid this lookup process.
1039
1040 - Add ``pyramid.httpexceptions`` module, which is a facade for the
1041   ``webob.exc`` module.
1042
1043 - Direct built-in support for the Mako templating language.
1044
1045 - A new configurator method exists: ``add_handler``.  This method adds
1046   a Pylons-style "view handler" (such a thing used to be called a
1047   "controller" in Pylons 1.0).
1048
1049 - New argument to configurator: ``session_factory``.
1050
1051 - New method on configurator: ``set_session_factory``
1052
1053 - Using ``request.session`` now returns a (dictionary-like) session
1054   object if a session factory has been configured.
1055
1056 - The request now has a new attribute: ``tmpl_context`` for benefit of
1057   Pylons users.
1058
1059 - The decorator previously known as ``pyramid.view.bfg_view`` is now
1060   known most formally as ``pyramid.view.view_config`` in docs and
1061   paster templates.  An import of ``pyramid.view.bfg_view``, however,
1062   will continue to work "forever".
1063
1064 - New API methods in ``pyramid.session``: ``signed_serialize`` and
1065   ``signed_deserialize``.
1066
1067 - New interface: ``pyramid.interfaces.IRendererInfo``.  An object of this type
1068   is passed to renderer factory constructors (see "Backwards
1069   Incompatibilities").
1070
1071 - New event type: ``pyramid.interfaces.IBeforeRender``.  An object of this type
1072   is sent as an event before a renderer is invoked (but after the
1073   application-level renderer globals factory added via
1074   ``pyramid.configurator.configuration.set_renderer_globals_factory``, if any,
1075   has injected its own keys).  Applications may now subscribe to the
1076   ``IBeforeRender`` event type in order to introspect the and modify the set of
1077   renderer globals before they are passed to a renderer.  The event object
1078   iself has a dictionary-like interface that can be used for this purpose.  For
1079   example::
1080
1081     from repoze.events import subscriber
1082     from pyramid.interfaces import IRendererGlobalsEvent
1083
1084     @subscriber(IRendererGlobalsEvent)
1085     def add_global(event):
1086         event['mykey'] = 'foo'
1087
1088   If a subscriber attempts to add a key that already exist in the renderer
1089   globals dictionary, a ``KeyError`` is raised.  This limitation is due to the
1090   fact that subscribers cannot be ordered relative to each other.  The set of
1091   keys added to the renderer globals dictionary by all subscribers and
1092   app-level globals factories must be unique.
1093
1094 - New class: ``pyramid.response.Response``.  This is a pure facade for
1095   ``webob.Response`` (old code need not change to use this facade, it's
1096   existence is mostly for vanity and documentation-generation purposes).
1097
1098 - All preexisting paster templates (except ``zodb``) now use "imperative"
1099   configuration (``starter``, ``routesalchemy``, ``alchemy``).
1100
1101 - A new paster template named ``pyramid_starter_zcml`` exists, which uses
1102   declarative configuration.
1103
1104 Documentation (delta from BFG 1.3)
1105 -----------------------------------
1106
1107 - Added a ``pyramid.httpexceptions`` API documentation chapter.
1108
1109 - Added a ``pyramid.session`` API documentation chapter.
1110
1111 - Added a ``Session Objects`` narrative documentation chapter.
1112
1113 - Added an API chapter for the ``pyramid.personality`` module.
1114
1115 - Added an API chapter for the ``pyramid.response`` module.
1116
1117 - All documentation which previously referred to ``webob.Response`` now uses
1118   ``pyramid.response.Response`` instead.
1119
1120 - The documentation has been overhauled to use imperative configuration,
1121   moving declarative configuration (ZCML) explanations to a separate
1122   narrative chapter ``declarative.rst``.
1123
1124 - The ZODB Wiki tutorial was updated to take into account changes to the
1125   ``pyramid_zodb`` paster template.
1126
1127 - The SQL Wiki tutorial was updated to take into account changes to the
1128   ``pyramid_routesalchemy`` paster template.
1129
1130 Backwards Incompatibilities (with BFG 1.3)
1131 ------------------------------------------
1132
1133 - There is no longer an ``IDebugLogger`` registered as a named utility
1134   with the name ``repoze.bfg.debug``.
1135
1136 - The logger which used to have the name of ``repoze.bfg.debug`` now
1137   has the name ``pyramid.debug``.
1138
1139 - The deprecated API ``pyramid.testing.registerViewPermission``
1140   has been removed.
1141
1142 - The deprecated API named ``pyramid.testing.registerRoutesMapper``
1143   has been removed.
1144
1145 - The deprecated API named ``pyramid.request.get_request`` was removed.
1146
1147 - The deprecated API named ``pyramid.security.Unauthorized`` was
1148   removed.
1149
1150 - The deprecated API named ``pyramid.view.view_execution_permitted``
1151   was removed.
1152
1153 - The deprecated API named ``pyramid.view.NotFound`` was removed.
1154
1155 - The ``bfgshell`` paster command is now named ``pshell``.
1156
1157 - The Venusian "category" for all built-in Venusian decorators
1158   (e.g. ``subscriber`` and ``view_config``/``bfg_view``) is now
1159   ``pyramid`` instead of ``bfg``.
1160
1161 - ``pyramid.renderers.rendered_response`` function removed; use
1162   ``render_pyramid.renderers.render_to_response`` instead.
1163
1164 - Renderer factories now accept a *renderer info object* rather than an
1165   absolute resource specification or an absolute path.  The object has the
1166   following attributes: ``name`` (the ``renderer=`` value), ``package`` (the
1167   'current package' when the renderer configuration statement was found),
1168   ``type``: the renderer type, ``registry``: the current registry, and
1169   ``settings``: the deployment settings dictionary.
1170
1171   Third-party ``repoze.bfg`` renderer implementations that must be ported to
1172   Pyramid will need to account for this.
1173
1174   This change was made primarily to support more flexible Mako template
1175   rendering.
1176
1177 - The presence of the key ``repoze.bfg.message`` in the WSGI environment when
1178   an exception occurs is now deprecated.  Instead, code which relies on this
1179   environ value should use the ``exception`` attribute of the request
1180   (e.g. ``request.exception[0]``) to retrieve the message.
1181
1182 - The values ``bfg_localizer`` and ``bfg_locale_name`` kept on the request
1183   during internationalization for caching purposes were never APIs.  These
1184   however have changed to ``localizer`` and ``locale_name``, respectively.
1185
1186 - The default ``cookie_name`` value of the ``authtktauthenticationpolicy`` ZCML
1187   now defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``).
1188
1189 - The default ``cookie_name`` value of the
1190   ``pyramid.authentication.AuthTktAuthenticationPolicy`` constructor now
1191   defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``).
1192
1193 - The ``request_type`` argument to the ``view`` ZCML directive, the
1194   ``pyramid.configuration.Configurator.add_view`` method, or the
1195   ``pyramid.view.view_config`` decorator (nee ``bfg_view``) is no longer
1196   permitted to be one of the strings ``GET``, ``HEAD``, ``PUT``, ``POST`` or
1197   ``DELETE``, and now must always be an interface.  Accepting the
1198   method-strings as ``request_type`` was a backwards compatibility strategy
1199   servicing repoze.bfg 1.0 applications.  Use the ``request_method``
1200   parameter instead to specify that a view a string request-method predicate.
4cdffc 1201