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