diff --git a/baseplate/core.py b/baseplate/core.py index fb9f72bde..0f66f110f 100644 --- a/baseplate/core.py +++ b/baseplate/core.py @@ -8,6 +8,7 @@ from .integration.wrapped_context import WrappedRequestContext + class BaseplateObserver(object): """Interface for an observer that watches Baseplate.""" @@ -326,7 +327,6 @@ def __enter__(self): self.start() return self - def __exit__(self, exc_type, value, traceback): if exc_type is not None: self.finish(exc_info=(exc_type, value, traceback)) @@ -374,4 +374,3 @@ class ServerSpan(Span): """ pass - diff --git a/baseplate/integration/__init__.py b/baseplate/integration/__init__.py index 9ed2df2ad..a1b7feeae 100644 --- a/baseplate/integration/__init__.py +++ b/baseplate/integration/__init__.py @@ -4,4 +4,7 @@ application frameworks. """ -from .wrapped_context import WrappedRequestContext +from wrapped_context import WrappedRequestContext +__all__ = [ + "WrappedRequestContext", +] diff --git a/baseplate/integration/wrapped_context.py b/baseplate/integration/wrapped_context.py index b324de7c9..3f3504e94 100644 --- a/baseplate/integration/wrapped_context.py +++ b/baseplate/integration/wrapped_context.py @@ -1,11 +1,13 @@ import copy + def merge_two_dicts(x, y): """Given two dicts, merge them into a new dict as a shallow copy.""" z = x.copy() z.update(y) return z + class WrappedRequestContext(object): def __init__(self, context, trace=None): self._context = context