Skip to content

Commit db7b742

Browse files
committed
Support Python 3.9 to 3.12
1 parent 5e5374c commit db7b742

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/helpers/constants.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""Constants shared by multiple tests"""
22

3-
STANDARD_MSG_ATTRIBUTES = {
3+
import sys
4+
5+
_msg_attrs = [
46
"written_at",
57
"written_ts",
68
"msg",
@@ -11,4 +13,9 @@
1113
"module",
1214
"line_no",
1315
"correlation_id",
14-
}
16+
]
17+
18+
if sys.version_info.major == 3 and sys.version_info.minor >= 12:
19+
_msg_attrs.append("taskName")
20+
21+
STANDARD_MSG_ATTRIBUTES = set(_msg_attrs)

0 commit comments

Comments
 (0)