diff options
| author | Chris McDonough <chrism@plope.com> | 2012-07-13 12:08:18 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-07-13 12:08:18 -0400 |
| commit | e652518e00cde05b55b065196a460efd9bc86e32 (patch) | |
| tree | 5f271e76b246458c384a1e68e1f363560273861f | |
| parent | 3074e78a5b3818bf6c6cb43b832e4ab1df845e16 (diff) | |
| download | pyramid-e652518e00cde05b55b065196a460efd9bc86e32.tar.gz pyramid-e652518e00cde05b55b065196a460efd9bc86e32.tar.bz2 pyramid-e652518e00cde05b55b065196a460efd9bc86e32.zip | |
- On at least one 64-bit Ubuntu system under Python 3.2, using the
``view_config`` decorator caused a ``RuntimeError: dictionary changed size
during iteration`` exception. It no longer does. See
https://github.com/Pylons/pyramid/issues/635 for more information.
- Fixes issue #635.
| -rw-r--r-- | CHANGES.txt | 5 | ||||
| -rw-r--r-- | pyramid/view.py | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index c06b8106d..c6afaf0c7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,6 +12,11 @@ Bug Fixes - Explicit url dispatch regexes can now contain colons. https://github.com/Pylons/pyramid/issues/629 +- On at least one 64-bit Ubuntu system under Python 3.2, using the + ``view_config`` decorator caused a ``RuntimeError: dictionary changed size + during iteration`` exception. It no longer does. See + https://github.com/Pylons/pyramid/issues/635 for more information. + Features -------- diff --git a/pyramid/view.py b/pyramid/view.py index bb531c326..1df0849c0 100644 --- a/pyramid/view.py +++ b/pyramid/view.py @@ -199,7 +199,7 @@ class view_config(object): custom_predicates=default, context=default, decorator=default, mapper=default, http_cache=default, match_param=default): - L = locals() + L = dict(locals()) # See issue #635 for dict() rationale if (context is not default) or (for_ is not default): L['context'] = context or for_ for k, v in L.items(): @@ -367,7 +367,7 @@ class notfound_view_config(object): path_info=default, custom_predicates=default, decorator=default, mapper=default, match_param=default, append_slash=False): - L = locals() + L = dict(locals()) # See issue #635 for dict() rationale for k, v in L.items(): if k not in ('self', 'L') and v is not default: self.__dict__[k] = v @@ -432,7 +432,7 @@ class forbidden_view_config(object): xhr=default, accept=default, header=default, path_info=default, custom_predicates=default, decorator=default, mapper=default, match_param=default): - L = locals() + L = dict(locals()) # See issue #635 for dict() rationale for k, v in L.items(): if k not in ('self', 'L') and v is not default: self.__dict__[k] = v |
