]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
don't split the regexps for chop_traceback()
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 12 Jul 2013 14:42:18 +0000 (10:42 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 12 Jul 2013 14:42:53 +0000 (10:42 -0400)
lib/sqlalchemy/util/langhelpers.py

index d63cc8e2ae098d89be976f46c7a2113e5be21d05..ef1ff881dc1ce812ef33be1dfc12d841a195a6ef 100644 (file)
@@ -1043,10 +1043,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."""
@@ -1060,6 +1056,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.