File tree Expand file tree Collapse file tree 4 files changed +2
-100
lines changed
Expand file tree Collapse file tree 4 files changed +2
-100
lines changed Original file line number Diff line number Diff line change @@ -991,21 +991,11 @@ def capture_exception(
991991 context_mask = get_code_variables_mask_patterns_context ()
992992 context_ignore = get_code_variables_ignore_patterns_context ()
993993
994- print ("\n \n \n CAPTURING EXCEPTION\n \n \n " )
995-
996994 enabled = (
997995 context_enabled
998996 if context_enabled is not None
999997 else self .capture_exception_code_variables
1000998 )
1001-
1002- print ("Context enabled state: " , context_enabled )
1003- print (
1004- "Self capture_exception_code_variables: " ,
1005- self .capture_exception_code_variables ,
1006- )
1007- print ("Computed enabled state: " , enabled )
1008-
1009999 mask_patterns = (
10101000 context_mask
10111001 if context_mask is not None
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ def process_data():
9696 assert b"'my_number': 42" in output
9797 assert b"'my_bool': 'True'" in output
9898 assert b'"my_dict": "{\\ "name\\ ": \\ "test\\ ", \\ "value\\ ": 123}"' in output
99+ # With repr() fallback, objects without custom __repr__ show full repr including module and memory address
99100 assert b"<__main__.UnserializableObject object at" in output
100101 assert b"'my_password': '$$_posthog_redacted_based_on_masking_rules_$$'" in output
101102 assert b"'__should_be_ignored':" not in output
@@ -335,6 +336,7 @@ def process_data():
335336
336337
337338def test_code_variables_repr_fallback (tmpdir ):
339+ """Test that repr() is used for variables that can't be JSON-serialized but can be repr'd"""
338340 app = tmpdir .join ("app.py" )
339341 app .write (
340342 dedent (
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments