From 1e332e03d3943b59e8fa315977dc9604a9334145 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 12 Jul 2013 10:42:18 -0400 Subject: [PATCH] don't split the regexps for chop_traceback() --- lib/sqlalchemy/util/langhelpers.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py index 82822b086b..98ba4a2b7c 100644 --- a/lib/sqlalchemy/util/langhelpers.py +++ b/lib/sqlalchemy/util/langhelpers.py @@ -1038,10 +1038,6 @@ def warn(msg, stacklevel=3): warnings.warn(msg, stacklevel=stacklevel) -_SQLA_RE = re.compile(r'sqlalchemy/([a-z_]+/){0,2}[a-z_]+\.py') -_UNITTEST_RE = re.compile(r'unit(?:2|test2?/)') - - def only_once(fn): """Decorate the given function to be a no-op after it is called exactly once.""" @@ -1055,6 +1051,8 @@ def only_once(fn): return update_wrapper(go, fn) +_SQLA_RE = re.compile(r'sqlalchemy/([a-z_]+/){0,2}[a-z_]+\.py') +_UNITTEST_RE = re.compile(r'unit(?:2|test2?/)') def chop_traceback(tb, exclude_prefix=_UNITTEST_RE, exclude_suffix=_SQLA_RE): """Chop extraneous lines off beginning and end of a traceback. -- 2.47.2