Chris McDonough
2011-09-28 36119a371a3496c9f6107cce6abd08a2b96043a7
commit | author | age
1e2d59 1 1.2.1 (2011-09-28)
CM 2 ==================
0dde01 3
9b9004 4 Features
CM 5 --------
6
7 - Lone instance methods can now be treated as view callables (see
8   https://github.com/Pylons/pyramid/pull/283).
0dde01 9
64b121 10 Bug Fixes
WA 11 ---------
12
13 - Update auth_tkt authentication policy to accept unicode tokens as long as
14   they only contain ASCII content. See
15   https://github.com/Pylons/pyramid/issues/293.
16
36119a 17 Documentation
CM 18 -------------
19
20 - Fix ``..note`` and ``..warning`` directives to run properly under newer
21   Sphinx.
22
63f65d 23 1.2 (2011-09-12)
CM 24 ================
dceff5 25
CM 26 Features
27 --------
28
29 - Route pattern replacement marker names can now begin with an underscore.
30   See https://github.com/Pylons/pyramid/issues/276.
31
2cf1d0 32 1.2b3 (2011-09-11)
CM 33 ==================
cda7f6 34
CM 35 Bug Fixes
36 ---------
37
38 - The route prefix was not taken into account when a static view was added in
39   an "include".  See https://github.com/Pylons/pyramid/issues/266 .
40
a66ae9 41 1.2b2 (2011-09-08)
CM 42 ==================
43
44 Bug Fixes
45 ---------
46
47 - The 1.2b1 tarball was a brownbag (particularly for Windows users) because
48   it contained filenames with stray quotation marks in inappropriate places.
49   We depend on ``setuptools-git`` to produce release tarballs, and when it
50   was run to produce the 1.2b1 tarball, it didn't yet cope well with files
51   present in git repositories with high-order characters in their filenames.
52
53 Documentation
54 -------------
55
56 - Minor tweaks to the "Introduction" narrative chapter example app and
57   wording.
58
9de21f 59 1.2b1 (2011-09-08)
CM 60 ==================
d8fc16 61
58ca44 62 Bug Fixes
CM 63 ---------
64
65 - Sometimes falling back from territory translations (``de_DE``) to language
66   translations (``de``) would not work properly when using a localizer.  See
67   https://github.com/Pylons/pyramid/issues/263
68
d5dc5d 69 - The static file serving machinery could not serve files that started with a
b44777 70   ``.`` (dot) character.
d5dc5d 71
b01e97 72 - Static files with high-order (super-ASCII) characters in their names could
b44777 73   not be served by a static view.  The static file serving machinery
CM 74   inappropriately URL-quoted path segments in filenames when asking for files
75   from the filesystem.
d5dc5d 76
83faa0 77 - Within ``pyramid.traversal.traversal_path`` , canonicalize URL segments
CM 78   from UTF-8 to Unicode before checking whether a segment matches literally
79   one of ``.``, the empty string, or ``..`` in case there's some sneaky way
80   someone might tunnel those strings via UTF-8 that don't match the literals
81   before decoded.
82
d8fc16 83 Documentation
CM 84 -------------
85
86 - Added a "What Makes Pyramid Unique" section to the Introduction narrative
87   chapter.
88
d00fa0 89 1.2a6 (2011-09-06)
CM 90 ==================
bd0c7a 91
f46d55 92 Bug Fixes
CM 93 ---------
94
95 - AuthTktAuthenticationPolicy with a ``reissue_time`` interfered with logout.
96   See https://github.com/Pylons/pyramid/issues/262.
97
bd0c7a 98 Internal
CM 99 --------
100
101 - Internalize code previously depended upon as imports from the
102   ``paste.auth`` module (futureproof).
103
d00fa0 104 - Replaced use of ``paste.urlparser.StaticURLParser`` with a derivative of
CM 105   Chris Rossi's "happy" static file serving code (futureproof).
106
20646a 107 - Fixed test suite; on some systems tests would fail due to indeterminate
CM 108   test run ordering and a double-push-single-pop of a shared test variable.
315f75 109
CM 110 Behavior Differences
111 --------------------
112
113 - An ETag header is no longer set when serving a static file.  A
114   Last-Modified header is set instead.
115
116 - Static file serving no longer supports the ``wsgi.file_wrapper`` extension.
117
118 - Instead of returning a ``403 Forbidden`` error when a static file is served
119   that cannot be accessed by the Pyramid process' user due to file
120   permissions, an IOError (or similar) will be raised.
121
d00fa0 122 Scaffolds
CM 123 ---------
124
125 - All scaffolds now send the ``cache_max_age`` parameter to the
126   ``add_static_view`` method.
127
7961af 128 1.2a5 (2011-09-04)
CM 129 ==================
7a7c8c 130
CM 131 Bug Fixes
132 ---------
133
134 - The ``route_prefix`` of a configurator was not properly taken into account
135   when registering routes in certain circumstances.  See
136   https://github.com/Pylons/pyramid/issues/260
137
061154 138 Dependencies
CM 139 ------------
140
141 - The ``zope.configuration`` package is no longer a dependency.
142
f1c6e0 143 1.2a4 (2011-09-02)
CM 144 ==================
1aeae3 145
CM 146 Features
147 --------
148
149 - Support an ``onerror`` keyword argument to
150   ``pyramid.config.Configurator.scan()``.  This onerror keyword argument is
151   passed to ``venusian.Scanner.scan()`` to influence error behavior when
152   an exception is raised during scanning.
153
49f082 154 - The ``request_method`` predicate argument to
CM 155   ``pyramid.config.Configurator.add_view`` and
156   ``pyramid.config.Configurator.add_route`` is now permitted to be a tuple of
157   HTTP method names.  Previously it was restricted to being a string
158   representing a single HTTP method name.
159
33516a 160 - Undeprecated ``pyramid.traversal.find_model``,
CM 161   ``pyramid.traversal.model_path``, ``pyramid.traversal.model_path_tuple``,
162   and ``pyramid.url.model_url``, which were all deprecated in Pyramid 1.0.
163   There's just not much cost to keeping them around forever as aliases to
164   their renamed ``resource_*`` prefixed functions.
165
166 - Undeprecated ``pyramid.view.bfg_view``, which was deprecated in Pyramid
167   1.0.  This is a low-cost alias to ``pyramid.view.view_config`` which we'll
168   just keep around forever.
169
1aeae3 170 Dependencies
CM 171 ------------
172
173 - Pyramid now requires Venusian 1.0a1 or better to support the ``onerror``
174   keyword argument to ``pyramid.config.Configurator.scan``.
175
21a4c9 176 1.2a3 (2011-08-29)
CM 177 ==================
b2c4e0 178
b5c0cb 179 Bug Fixes
CM 180 ---------
181
182 - Pyramid did not properly generate static URLs using
183   ``pyramid.url.static_url`` when passed a caller-package relative path due
0ff9d4 184   to a refactoring done in 1.2a1.
CM 185
186 - The ``settings`` object emitted a deprecation warning any time
187   ``__getattr__`` was called upon it.  However, there are legitimate
188   situations in which ``__getattr__`` is called on arbitrary objects
189   (e.g. ``hasattr``).  Now, the ``settings`` object only emits the warning
190   upon successful lookup.
b5c0cb 191
b2c4e0 192 Internal
CM 193 --------
194
195 - Use ``config.with_package`` in view_config decorator rather than
196   manufacturing a new renderer helper (cleanup).
197
5bee60 198 1.2a2 (2011-08-27)
CM 199 ==================
200
201 Bug Fixes
202 ---------
b93af9 203
CM 204 - When a ``renderers=`` argument is not specified to the Configurator
205   constructor, eagerly register and commit the default renderer set.  This
206   permits the overriding of the default renderers, which was broken in 1.2a1
207   without a commit directly after Configurator construction.
208
8b62d7 209 - Mako rendering exceptions had the wrong value for an error message.
CM 210
2a818a 211 - An include could not set a root factory successfully because the
CM 212   Configurator constructor unconditionally registered one that would be
213   treated as if it were "the word of the user".
214
5bee60 215 Features
CM 216 --------
217
637bda 218 - A session factory can now be passed in using the dotted name syntax.
CM 219
c1a179 220 1.2a1 (2011-08-24)
CM 221 ==================
9a66aa 222
CM 223 Features
224 --------
225
5ec330 226 - The ``[pshell]`` section in an ini configuration file now treats a
CM 227   ``setup`` key as a dotted name that points to a callable that is passed the
228   bootstrap environment.  It can mutate the environment as necessary for
229   great justice.
230
473697 231 - A new configuration setting named ``pyramid.includes`` is now available.
CM 232   It is described in the "Environment Variables and ``.ini`` Files Settings"
233   narrative documentation chapter.
234
83bf91 235 - Added a ``route_prefix`` argument to the
CM 236   ``pyramid.config.Configurator.include`` method.  This argument allows you
237   to compose URL dispatch applications together.  See the section entitled
238   "Using a Route Prefix to Compose Applications" in the "URL Dispatch"
239   narrative documentation chapter.
240
1e88db 241 - Added a ``pyramid.security.NO_PERMISSION_REQUIRED`` constant for use in
CM 242   ``permission=`` statements to view configuration.  This constant has a
243   value of the string ``__no_permission_required__``.  This string value was
244   previously referred to in documentation; now the documentation uses the
245   constant.
246
1f901a 247 - Added a decorator-based way to configure a response adapter:
CM 248   ``pyramid.response.response_adapter``.  This decorator has the same use as
249   ``pyramid.config.Configurator.add_response_adapter`` but it's declarative.
250
9a66aa 251 - The ``pyramid.events.BeforeRender`` event now has an attribute named
CM 252   ``rendering_val``.  This can be used to introspect the value returned by a
253   view in a BeforeRender subscriber.
254
6b2a62 255 - New configurator directive: ``pyramid.config.Configurator.add_tween``.
CM 256   This directive adds a "tween".  A "tween" is used to wrap the Pyramid
257   router's primary request handling function.  This is a feature may be used
258   by Pyramid framework extensions, to provide, for example, view timing
259   support and as a convenient place to hang bookkeeping code.
af2323 260
6b2a62 261   Tweens are further described in the narrative docs section in the Hooks
CM 262   chapter, named "Registering Tweens".
af2323 263
6b2a62 264 - New paster command ``paster ptweens``, which prints the current "tween"
CM 265   configuration for an application.  See the section entitled "Displaying
266   Tweens" in the Command-Line Pyramid chapter of the narrative documentation
267   for more info.
b72379 268
3a8054 269 - The Pyramid debug logger now uses the standard logging configuration
CM 270   (usually set up by Paste as part of startup).  This means that output from
271   e.g. ``debug_notfound``, ``debug_authorization``, etc. will go to the
272   normal logging channels.  The logger name of the debug logger will be the
273   package name of the *caller* of the Configurator's constructor.
274
95a379 275 - A new attribute is available on request objects: ``exc_info``.  Its value
CM 276   will be ``None`` until an exception is caught by the Pyramid router, after
277   which it will be the result of ``sys.exc_info()``.
6b2a62 278
274435 279 - ``pyramid.testing.DummyRequest`` now implements the
CM 280   ``add_finished_callback`` and ``add_response_callback`` methods.
281
1a42bd 282 - New methods of the ``pyramid.config.Configurator`` class:
CM 283   ``set_authentication_policy`` and ``set_authorization_policy``.  These are
284   meant to be consumed mostly by add-on authors.
285
ea824f 286 - New Configurator method: ``set_root_factory``.
CM 287
288 - Pyramid no longer eagerly commits some default configuration statements at
289   Configurator construction time, which permits values passed in as
290   constructor arguments (e.g. ``authentication_policy`` and
291   ``authorization_policy``) to override the same settings obtained via an
292   "include".
293
9f7f4f 294 - Better Mako rendering exceptions via
CM 295   ``pyramid.mako_templating.MakoRenderingException``
296
5c6963 297 - New request methods: ``current_route_url``, ``current_route_path``, and
CM 298   ``static_path``.
12cef0 299
5c6963 300 - New functions in ``pyramid.url``: ``current_route_path`` and
CM 301   ``static_path``.
12cef0 302
b8c797 303 - The ``pyramid.request.Request.static_url`` API (and its brethren
CM 304   ``pyramid.request.Request.static_path``, ``pyramid.url.static_url``, and
305   ``pyramid.url.static_path``) now accept an asbolute filename as a "path"
306   argument.  This will generate a URL to an asset as long as the filename is
307   in a directory which was previously registered as a static view.
308   Previously, trying to generate a URL to an asset using an absolute file
309   path would raise a ValueError.
310
449287 311 - The ``RemoteUserAuthenticationPolicy ``, ``AuthTktAuthenticationPolicy``,
CM 312   and ``SessionAuthenticationPolicy`` constructors now accept an additional
313   keyword argument named ``debug``.  By default, this keyword argument is
314   ``False``.  When it is ``True``, debug information will be sent to the
315   Pyramid debug logger (usually on stderr) when the ``authenticated_userid``
316   or ``effective_principals`` method is called on any of these policies.  The
317   output produced can be useful when trying to diagnose
318   authentication-related problems.
319
141f90 320 - New view predicate: ``match_param``.  Example: a view added via
CM 321   ``config.add_view(aview, match_param='action=edit')`` will be called only
322   when the ``request.matchdict`` has a value inside it named ``action`` with
323   a value of ``edit``.
324
6b2a62 325 Internal
CM 326 --------
327
328 - The Pyramid "exception view" machinery is now implemented as a "tween"
329   (``pyramid.tweens.excview_tween_factory``).
95a379 330
85093d 331 - WSGIHTTPException (HTTPFound, HTTPNotFound, etc) now has a new API named
CM 332   "prepare" which renders the body and content type when it is provided with
333   a WSGI environ.  Required for debug toolbar.
334
335 - Once ``__call__`` or ``prepare`` is called on a WSGIHTTPException, the body
336   will be set, and subsequent calls to ``__call__`` will always return the
337   same body.  Delete the body attribute to rerender the exception body.
338
5c52da 339 - Previously the ``pyramid.events.BeforeRender`` event *wrapped* a dictionary
CM 340   (it addressed it as its ``_system`` attribute).  Now it *is* a dictionary
341   (it inherits from ``dict``), and it's the value that is passed to templates
342   as a top-level dictionary.
343
fb90f0 344 - The ``route_url``, ``route_path``, ``resource_url``, ``static_url``, and
CM 345   ``current_route_url`` functions in the ``pyramid.url`` package now delegate
346   to a method on the request they've been passed, instead of the other way
347   around.  The pyramid.request.Request object now inherits from a mixin named
348   pyramid.url.URLMethodsMixin to make this possible, and all url/path
349   generation logic is embedded in this mixin.
350
5bf23f 351 - Refactor ``pyramid.config`` into a package.
CM 352
66da9b 353 - Removed the ``_set_security_policies`` method of the Configurator.
CM 354
53d9d4 355 - Moved the ``StaticURLInfo`` class from ``pyramid.static`` to
CM 356   ``pyramid.config.views``.
357
5f5a7e 358 - Move the ``Settings`` class from ``pyramid.settings`` to
CM 359   ``pyramid.config.settings``.
360
6da017 361 - Move the ``OverrideProvider``, ``PackageOverrides``, ``DirectoryOverride``,
CM 362   and ``FileOverride`` classes from ``pyramid.asset`` to
363   ``pyramid.config.assets``.
364
ef6f6b 365 Deprecations
CM 366 ------------
367
368 - All Pyramid-related deployment settings (e.g. ``debug_all``,
369   ``debug_notfound``) are now meant to be prefixed with the prefix
370   ``pyramid.``.  For example: ``debug_all`` -> ``pyramid.debug_all``.  The
371   old non-prefixed settings will continue to work indefinitely but supplying
53d9d4 372   them may eventually print a deprecation warning.  All scaffolds and
CM 373   tutorials have been changed to use prefixed settings.
ef6f6b 374
b5ffe3 375 - The ``settings`` dictionary now raises a deprecation warning when you
CM 376   attempt to access its values via ``__getattr__`` instead of
377   via ``__getitem__``.
378
3a8054 379 Backwards Incompatibilities
CM 380 ---------------------------
381
382 - If a string is passed as the ``debug_logger`` parameter to a Configurator,
383   that string is considered to be the name of a global Python logger rather
384   than a dotted name to an instance of a logger.
385
83bf91 386 - The ``pyramid.config.Configurator.include`` method now accepts only a
CM 387   single ``callable`` argument (a sequence of callables used to be
388   permitted).  If you are passing more than one ``callable`` to
389   ``pyramid.config.Configurator.include``, it will break.  You now must now
53d9d4 390   instead make a separate call to the method for each callable.  This change
CM 391   was introduced to support the ``route_prefix`` feature of include.
83bf91 392
04b7ea 393 - It may be necessary to more strictly order configuration route and view
CM 394   statements when using an "autocommitting" Configurator.  In the past, it
395   was possible to add a view which named a route name before adding a route
396   with that name when you used an autocommitting configurator.  For example::
397
398     config = Configurator(autocommit=True)
399     config.add_view('my.pkg.someview', route_name='foo')
400     config.add_route('foo', '/foo')
401
402   The above will raise an exception when the view attempts to add itself.
403   Now you must add the route before adding the view::
404
405     config = Configurator(autocommit=True)
406     config.add_route('foo', '/foo')
407     config.add_view('my.pkg.someview', route_name='foo')
408
409   This won't effect "normal" users, only people who have legacy BFG codebases
410   that used an autommitting configurator and possibly tests that use the
411   configurator API (the configurator returned by ``pyramid.testing.setUp`` is
412   an autocommitting configurator).  The right way to get around this is to
413   use a non-autocommitting configurator (the default), which does not have
414   these directive ordering requirements.
415
416 - The ``pyramid.config.Configurator.add_route`` directive no longer returns a
417   route object.  This change was required to make route vs. view
418   configuration processing work properly.
419
6b2a62 420 Documentation
CM 421 -------------
422
fb90f0 423 - Narrative and API documentation which used the ``route_url``,
CM 424   ``route_path``, ``resource_url``, ``static_url``, and ``current_route_url``
425   functions in the ``pyramid.url`` package have now been changed to use
426   eponymous methods of the request instead.
427
83bf91 428 - Added a section entitled "Using a Route Prefix to Compose Applications" to
CM 429   the "URL Dispatch" narrative documentation chapter.
430
6b2a62 431 - Added a new module to the API docs: ``pyramid.tweens``.
CM 432
433 - Added a "Registering Tweens" section to the "Hooks" narrative chapter.
434
435 - Added a "Displaying Tweens" section to the "Command-Line Pyramid" narrative
436   chapter.
437
473697 438 - Added documentation for the ``pyramid.tweens`` and ``pyramid.includes``
CM 439   configuration settings to the "Environment Variables and ``.ini`` Files
440   Settings" chapter.
441
1ae7af 442 - Added a Logging chapter to the narrative docs (based on the Pylons logging
CM 443   docs, thanks Phil).
444
53d9d4 445 - Added a Paste chapter to the narrative docs (moved content from the Project
CM 446   chapter).
447
5c52da 448 - Added the ``pyramid.interfaces.IDict`` interface representing the methods
CM 449   of a dictionary, for documentation purposes only (IMultiDict and
450   IBeforeRender inherit from it).
451
42d31c 452 - All tutorials now use - The ``route_url``, ``route_path``,
CM 453   ``resource_url``, ``static_url``, and ``current_route_url`` methods of the
454   request rather than the function variants imported from ``pyramid.url``.
455
b25335 456 - The ZODB wiki tutorial now uses the ``pyramid_zodbconn`` package rather
CM 457   than the ``repoze.zodbconn`` package to provide ZODB integration.
458
eef972 459 Dependency Changes
CM 460 ------------------
461
462 - Pyramid now relies on PasteScript >= 1.7.4.  This version contains a
463   feature important for allowing flexible logging configuration.
464
391402 465 Scaffolds
CM 466 ----------
467
468 - All scaffolds now use the ``pyramid_tm`` package rather than the
469   ``repoze.tm2`` middleware to manage transaction management.
470
b25335 471 - The ZODB scaffold now uses the ``pyramid_zodbconn`` package rather than the
CM 472   ``repoze.zodbconn`` package to provide ZODB integration.
473
391402 474 - All scaffolds now use the ``pyramid_debugtoolbar`` package rather than the
CM 475   ``WebError`` package to provide interactive debugging features.
476
477 - Projects created via a scaffold no longer depend on the ``WebError``
478   package at all; configuration in the ``production.ini`` file which used to
479   require its ``error_catcher`` middleware has been removed.  Configuring
480   error catching / email sending is now the domain of the ``pyramid_exclog``
481   package (see https://docs.pylonsproject.org/projects/pyramid_exclog/dev/).
482
1939d0 483 Bug Fixes
CM 484 ---------
485
486 - Fixed an issue with the default renderer not working at certain times.  See
487   https://github.com/Pylons/pyramid/issues/249
488