Skip to content

Commit 783d41c

Browse files
committed
ignore py313 changes to stack trace (error indicators ----^^^^^) and remove py2 specifc stack normalization
1 parent 920c13c commit 783d41c

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

glom/test/test_error.py

+3-10
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def _norm_stack(formatted_stack, exc):
5959

6060
normalized = []
6161
for line in formatted_stack.splitlines():
62+
if set(line.strip()) <= set('^~'):
63+
# python 3.13 added this error indicator which isn't really useful to test
64+
continue
6265
if line.strip().startswith('File'):
6366
file_name = line.split('"')[1]
6467
short_file_name = os.path.split(file_name.strip('"'))[1]
@@ -68,16 +71,6 @@ def _norm_stack(formatted_stack, exc):
6871

6972
line = line.rstrip() # trailing whitespace shouldn't matter
7073

71-
# qualify python2's unqualified error type names
72-
exc_type_name = exc.__class__.__name__
73-
if exc_type_name in line:
74-
mod_name = str(getattr(exc.__class__, '__module__', '') or '')
75-
exc_type_qual_name = exc_type_name
76-
if 'builtin' not in mod_name:
77-
exc_type_qual_name = mod_name + '.' + exc_type_name
78-
if exc_type_qual_name not in line:
79-
line = line.replace(exc_type_name, exc_type_qual_name)
80-
8174
normalized.append(line)
8275

8376
stack = "\n".join(normalized) + '\n'

0 commit comments

Comments
 (0)