Skip to content

Commit 920f7e8

Browse files
committed
Revert "fix: remove comments"
This reverts commit a1ace33.
1 parent a1ace33 commit 920f7e8

File tree

4 files changed

+2
-100
lines changed

4 files changed

+2
-100
lines changed

posthog/client.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff 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\nCAPTURING 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

posthog/test/test_exception_capture.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

337338
def 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(

test.py

Lines changed: 0 additions & 57 deletions
This file was deleted.

test_output.txt

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)