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