diff options
| author | Chris McDonough <chrism@plope.com> | 2011-06-22 19:39:45 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-06-22 19:39:45 -0400 |
| commit | cc85e7a96ccbb1671514adb1a1b1992fd1f02461 (patch) | |
| tree | 5511054ab648bec149a645f6e4b2354aaf59198e /docs/whatsnew-1.1.rst | |
| parent | e7e35e87343ce43a8b368076089a95e18aba665f (diff) | |
| download | pyramid-cc85e7a96ccbb1671514adb1a1b1992fd1f02461.tar.gz pyramid-cc85e7a96ccbb1671514adb1a1b1992fd1f02461.tar.bz2 pyramid-cc85e7a96ccbb1671514adb1a1b1992fd1f02461.zip | |
prep for 1.1a2
Diffstat (limited to 'docs/whatsnew-1.1.rst')
| -rw-r--r-- | docs/whatsnew-1.1.rst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/whatsnew-1.1.rst b/docs/whatsnew-1.1.rst index faf8b8b68..180380608 100644 --- a/docs/whatsnew-1.1.rst +++ b/docs/whatsnew-1.1.rst @@ -199,6 +199,32 @@ Backwards Incompatibilities pyramid.httpexceptions.HTTPFound(location='http//foo')`` (the latter will of course continue to work). +- The pyramid Router attempted to set a value into the key + ``environ['repoze.bfg.message']`` when it caught a view-related exception + for backwards compatibility with applications written for :mod:`repoze.bfg` + during error handling. It did this by using code that looked like so:: + + # "why" is an exception object + try: + msg = why[0] + except: + msg = '' + + environ['repoze.bfg.message'] = msg + + Use of the value ``environ['repoze.bfg.message']`` was docs-deprecated in + Pyramid 1.0. Our standing policy is to not remove features after a + deprecation for two full major releases, so this code was originally slated + to be removed in Pyramid 1.2. However, computing the + ``repoze.bfg.message`` value was the source of at least one bug found in + the wild (https://github.com/Pylons/pyramid/issues/199), and there isn't a + foolproof way to both preserve backwards compatibility and to fix the bug. + Therefore, the code which sets the value has been removed in this release. + Code in exception views which relies on this value's presence in the + environment should now use the ``exception`` attribute of the request + (e.g. ``request.exception[0]``) to retrieve the message instead of relying + on ``request.environ['repoze.bfg.message']``. + Deprecations and Behavior Differences ------------------------------------- |
