Skip to content

Commit

Permalink
add incompatibilities to whatsnew
Browse files Browse the repository at this point in the history
  • Loading branch information
mmerickel committed May 4, 2017
1 parent e2e51b3 commit ab8c578
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/whatsnew-1.9.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,29 @@ Deprecations

See https://github.com/Pylons/pyramid/pull/2854 and https://github.com/Pylons/pyramid/pull/3019

Backward Incompatibilities
--------------------------

- ``request.exception`` and ``request.exc_info`` will only be set if the
response was generated by the EXCVIEW tween. This is to avoid any confusion
where a response was generated elsewhere in the pipeline and not in
direct relation to the original exception. If anyone upstream wants to
catch and render responses for exceptions they should set
``request.exception`` and ``request.exc_info`` themselves to indicate
the exception that was squashed when generating the response.

Similar behavior occurs with
:meth:`pyramid.request.Request.invoke_exception_view` in which
the exception properties are set to reflect the exception if a response
is successfully generated by the method.

This is a very minor incompatibility. Most tweens right now would give
priority to the raised exception and ignore ``request.exception``. This
change just improves and clarifies that bookkeeping by trying to be
more clear about the relationship between the response and its squashed
exception. See https://github.com/Pylons/pyramid/pull/3029 and
https://github.com/Pylons/pyramid/pull/3031

Documentation Enhancements
--------------------------

Expand Down

0 comments on commit ab8c578

Please sign in to comment.