diff -r 11be618da9c8 -r 0ee046374dae src/pyams_utils/request.py --- a/src/pyams_utils/request.py Mon Feb 19 09:57:41 2018 +0100 +++ b/src/pyams_utils/request.py Thu Feb 22 11:04:56 2018 +0100 @@ -128,6 +128,17 @@ return request +def copy_request(request): + """Create clone of given request, keeping registry as well""" + request = request.copy() + if not hasattr(request, 'registry'): + registry = get_current_registry() + if registry is None: + registry = get_global_registry() + request.registry = registry + return request + + def get_annotations(request): """Define 'annotations' request property