Introduce dynamic scope_path regexps
Instead of relying on scope_path's being "one slash deep", we should
instead allow for either:
1. scope_paths that have a pre-defined depth
2. scope_paths that can be arbitrarily deep
We achieve 1 by setting an entities scope_logic to another logic
module. We then recursively call getScopeDepth until we get to the
topmost entity (that is, an unscoped entity).
A little different is the solution to 2, since some entities can have
an arbitrarily deep scope (such as Documents), we need to have some
way of signaling this to getScopePattern. A clean solution is to
return None, rather than a number. If None is returned, the
SCOPE_PATH_ARG_PATTERN is returned as regexp instead, which will
match an arbitrarily deeply nested scope.
The solution for 2 requires that we return None somewhere in the
scope_logic chain, the most straight forward method to do so is to
override getScopeDepth anywhere such a scope is needed and make it
return None. A more elegant solution however, is to set the
scope_logic to that module in all entities that require it.
Patch by: Sverre Rabbelier
setup.cfg
setup.py
test
WebOb.egg-info/PKG-INFO
WebOb.egg-info/SOURCES.txt
WebOb.egg-info/dependency_links.txt
WebOb.egg-info/top_level.txt
WebOb.egg-info/zip-safe
docs/comment-example.txt
docs/differences.txt
docs/file-example.txt
docs/index.txt
docs/license.txt
docs/news.txt
docs/reference.txt
docs/test-file.txt
docs/wiki-example.txt
docs/comment-example-code/example.py
docs/wiki-example-code/example.py
tests/__init__.py
tests/conftest.py
tests/test_request.py
tests/test_request.txt
tests/test_response.py
tests/test_response.txt
webob/__init__.py
webob/acceptparse.py
webob/byterange.py
webob/cachecontrol.py
webob/datastruct.py
webob/etag.py
webob/exc.py
webob/headerdict.py
webob/multidict.py
webob/statusreasons.py
webob/updatedict.py
webob/util/__init__.py
webob/util/dictmixin.py
webob/util/reversed.py
webob/util/safegzip.py
webob/util/stringtemplate.py