Skip to content

Commit 92e6da8

Browse files
committed
Fix support of python < 3.11 issues/445
1 parent 824426a commit 92e6da8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

wfb_ng/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ def __find_caller(depth):
114114
else:
115115
module = ''
116116

117-
fname = f.f_code.co_qualname
117+
# Fix for python < 3.11
118+
# TODO: remove after python3.10 deprecation
119+
120+
fname = getattr(f.f_code, 'co_qualname', f.f_code.co_name)
118121

119122
# Hide closure name if any
120123
if '.<locals>.' in fname:

0 commit comments

Comments
 (0)