======================================================================
FAIL: test_commit_conflict_with_two_includes (pyramid.tests.test_config.test_init.ConfiguratorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/xistence/Projects/pyramid/pyramid/tests/test_config/test_init.py", line 1112, in test_commit_conflict_with_two_includes
config.commit()
pyramid.exceptions.ConfigurationConflictError: Conflicting configuration actions
For: ('view', None, '', None, 'd41d8cd98f00b204e9800998ecf8427e')
Line 526 of file /Users/xistence/Projects/pyramid/pyramid/util.py:
return wrapped(self, *arg, **defaults)
Line 526 of file /Users/xistence/Projects/pyramid/pyramid/util.py:
return wrapped(self, *arg, **defaults)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/xistence/Projects/pyramid/pyramid/tests/test_config/test_init.py", line 1116, in test_commit_conflict_with_two_includes
self.assertEqual(c1, 'includeme1')
AssertionError: 'wrapper' != 'includeme1'
- wrapper
+ includeme1
======================================================================
FAIL: test_conflict_set_forbidden_view (pyramid.tests.test_config.test_init.ConfiguratorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/xistence/Projects/pyramid/pyramid/tests/test_config/test_init.py", line 1172, in test_conflict_set_forbidden_view
config.commit()
pyramid.exceptions.ConfigurationConflictError: Conflicting configuration actions
For: ('view', <class 'pyramid.httpexceptions.HTTPForbidden'>, '', None, 'd41d8cd98f00b204e9800998ecf8427e')
Line 526 of file /Users/xistence/Projects/pyramid/pyramid/util.py:
return wrapped(self, *arg, **defaults)
Line 526 of file /Users/xistence/Projects/pyramid/pyramid/util.py:
return wrapped(self, *arg, **defaults)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/xistence/Projects/pyramid/pyramid/tests/test_config/test_init.py", line 1175, in test_conflict_set_forbidden_view
self.assertEqual(c1, 'test_conflict_set_forbidden_view')
AssertionError: 'wrapper' != 'test_conflict_set_forbidden_view'
- wrapper
+ test_conflict_set_forbidden_view
======================================================================
FAIL: test_conflict_set_notfound_view (pyramid.tests.test_config.test_init.ConfiguratorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/xistence/Projects/pyramid/pyramid/tests/test_config/test_init.py", line 1157, in test_conflict_set_notfound_view
config.commit()
pyramid.exceptions.ConfigurationConflictError: Conflicting configuration actions
For: ('view', <class 'pyramid.httpexceptions.HTTPNotFound'>, '', None, 'd41d8cd98f00b204e9800998ecf8427e')
Line 526 of file /Users/xistence/Projects/pyramid/pyramid/util.py:
return wrapped(self, *arg, **defaults)
Line 526 of file /Users/xistence/Projects/pyramid/pyramid/util.py:
return wrapped(self, *arg, **defaults)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/xistence/Projects/pyramid/pyramid/tests/test_config/test_init.py", line 1160, in test_conflict_set_notfound_view
self.assertEqual(c1, 'test_conflict_set_notfound_view')
AssertionError: 'wrapper' != 'test_conflict_set_notfound_view'
- wrapper
+ test_conflict_set_notfound_view
----------------------------------------------------------------------
Ran 2467 tests in 6.874s
FAILED (failures=3)
diff --git a/pyramid/util.py b/pyramid/util.py
index 1ae7e6a..828f0d8 100644
--- a/pyramid/util.py
+++ b/pyramid/util.py
@@ -548,13 +548,13 @@ def action_method(wrapped):
self._ainfo = []
info = kw.pop('_info', None)
# backframes for outer decorators to actionmethods
- backframes = kw.pop('_backframes', 0) + 2
+ backframes = kw.pop('_backframes', 0) + 3
if is_nonstr_iter(info) and len(info) == 4:
# _info permitted as extract_stack tuple
info = ActionInfo(*info)
if info is None:
try:
- f = traceback.extract_stack(limit=3)
+ f = traceback.extract_stack(limit=4)
info = ActionInfo(*f[-backframes])
except: # pragma: no cover
info = ActionInfo(None, 0, '', '')
This will fix Python 3.5, but break all other Python versions: