Skip to content

Use a deeper copy for frame vars #3392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

sl0thentr0py
Copy link
Member

@sl0thentr0py sl0thentr0py commented Aug 2, 2024

Since we added the recursive option for the EventScrubber in #2755, vars nested inside could be replaced with AnnotatedValue and potentially break userland code.

We really shouldn't be holding references to frame.f_locals throughout our SDK, this has all sorts of breakage potential.

To make this work, I had to add a port of python's copy.deepcopy (license included) that falls back to safe_repr instead of the pickling step. This ensures that we have a deepcopy of all data structure like objects - dicts/lists/tuples and so on while we make a repr early for other random objects.

Copy link

codecov bot commented Aug 2, 2024

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 19636 tests with 160 failed, 17014 passed and 2462 skipped.

View the full list of failed tests

py3.10-common

  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == '<failed to serialize, use init(debug=True) to see error logs>'
    E - <failed to serialize, use init(debug=True) to see error logs>
    E + '<failed to serialize, use init(debug=True) to see error logs>'
    E & + +
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == {'a': '<This is me>'}
    E +"'<failed to serialize, use init(debug=True) to see error logs>'"
    E -{'a': '<This is me>'}
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E assert "'hi, i am a repr'" == 'hi, i am a repr'
    E - hi, i am a repr
    E + 'hi, i am a repr'
    E & + +

py3.10-django-latest

  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application0]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application1]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.test_basic
    Test name: test_queryset_repr

    .../integrations/django/test_basic.py:286: in test_queryset_repr
    assert frame["vars"]["my_queryset"].startswith(
    E assert False
    E + where False = <built-in method startswith of str object at 0x7ff7dbc3e240>('<QuerySet from django.db.models.query at')
    E + where <built-in method startswith of str object at 0x7ff7dbc3e240> = "'<QuerySet [<User: john>]>'".startswith
  • Class name: tests.integrations.django.test_basic
    Test name: test_view_exceptions

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_custom_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_removed

    No failure message available

py3.10-django-v5.0

  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application0]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application1]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.test_basic
    Test name: test_queryset_repr

    .../integrations/django/test_basic.py:286: in test_queryset_repr
    assert frame["vars"]["my_queryset"].startswith(
    E assert False
    E + where False = <built-in method startswith of str object at 0x7fc743c80da0>('<QuerySet from django.db.models.query at')
    E + where <built-in method startswith of str object at 0x7fc743c80da0> = "'<QuerySet [<User: john>]>'".startswith
  • Class name: tests.integrations.django.test_basic
    Test name: test_view_exceptions

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_custom_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_removed

    No failure message available

py3.10-gevent

  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == '<failed to serialize, use init(debug=True) to see error logs>'
    E - <failed to serialize, use init(debug=True) to see error logs>
    E + '<failed to serialize, use init(debug=True) to see error logs>'
    E & + +
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == {'a': '<This is me>'}
    E +"'<failed to serialize, use init(debug=True) to see error logs>'"
    E -{'a': '<This is me>'}
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E assert "'hi, i am a repr'" == 'hi, i am a repr'
    E - hi, i am a repr
    E + 'hi, i am a repr'
    E & + +

py3.11-asgi

  • Class name: tests.integrations.asgi.test_asgi
    Test name: test_capture_transaction_with_error

    No failure message available

py3.11-common

  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == '<failed to serialize, use init(debug=True) to see error logs>'
    E - <failed to serialize, use init(debug=True) to see error logs>
    E + '<failed to serialize, use init(debug=True) to see error logs>'
    E & + +
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == {'a': '<This is me>'}
    E +"'<failed to serialize, use init(debug=True) to see error logs>'"
    E -{'a': '<This is me>'}
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E assert "'hi, i am a repr'" == 'hi, i am a repr'
    E - hi, i am a repr
    E + 'hi, i am a repr'
    E & + +

py3.11-django-latest

  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application0]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application1]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.test_basic
    Test name: test_queryset_repr

    .../integrations/django/test_basic.py:286: in test_queryset_repr
    assert frame["vars"]["my_queryset"].startswith(
    E assert False
    E + where False = <built-in method startswith of str object at 0x7fead2b21c50>('<QuerySet from django.db.models.query at')
    E + where <built-in method startswith of str object at 0x7fead2b21c50> = "'<QuerySet [<User: john>]>'".startswith
  • Class name: tests.integrations.django.test_basic
    Test name: test_view_exceptions

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_custom_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_removed

    No failure message available

py3.11-django-v5.1

  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application0]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application1]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.test_basic
    Test name: test_queryset_repr

    .../integrations/django/test_basic.py:286: in test_queryset_repr
    assert frame["vars"]["my_queryset"].startswith(
    E assert False
    E + where False = <built-in method startswith of str object at 0x7f4435b053e0>('<QuerySet from django.db.models.query at')
    E + where <built-in method startswith of str object at 0x7f4435b053e0> = "'<QuerySet [<User: john>]>'".startswith
  • Class name: tests.integrations.django.test_basic
    Test name: test_view_exceptions

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_custom_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_removed

    No failure message available

py3.11-falcon-latest

  • Class name: tests.integrations.falcon.test_falcon
    Test name: test_error_in_errorhandler

    .../integrations/falcon/test_falcon.py:356: in test_error_in_errorhandler
    assert last_ex_values["stacktrace"]["frames"][-1]["vars"]["ex"] == "ValueError()"
    E assert "'ValueError()'" == 'ValueError()'
    E
    E - ValueError()
    E + 'ValueError()'
    E & + +

py3.11-gevent

  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == '<failed to serialize, use init(debug=True) to see error logs>'
    E - <failed to serialize, use init(debug=True) to see error logs>
    E + '<failed to serialize, use init(debug=True) to see error logs>'
    E & + +
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == {'a': '<This is me>'}
    E +"'<failed to serialize, use init(debug=True) to see error logs>'"
    E -{'a': '<This is me>'}
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E assert "'hi, i am a repr'" == 'hi, i am a repr'
    E - hi, i am a repr
    E + 'hi, i am a repr'
    E & + +

py3.11-langchain-latest

  • Class name: tests.integrations.langchain.test_langchain
    Test name: test_langchain_error

    No failure message available

py3.11-langchain-v0.1

  • Class name: tests.integrations.langchain.test_langchain
    Test name: test_langchain_error

    No failure message available

py3.12-asgi

  • Class name: tests.integrations.asgi.test_asgi
    Test name: test_capture_transaction_with_error

    No failure message available

py3.12-common

  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == '<failed to serialize, use init(debug=True) to see error logs>'
    E - <failed to serialize, use init(debug=True) to see error logs>
    E + '<failed to serialize, use init(debug=True) to see error logs>'
    E & + +
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == {'a': '<This is me>'}
    E +"'<failed to serialize, use init(debug=True) to see error logs>'"
    E -{'a': '<This is me>'}
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E assert "'hi, i am a repr'" == 'hi, i am a repr'
    E - hi, i am a repr
    E + 'hi, i am a repr'
    E & + +

py3.12-django-latest

  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application0]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application1]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.test_basic
    Test name: test_queryset_repr

    .../integrations/django/test_basic.py:286: in test_queryset_repr
    assert frame["vars"]["my_queryset"].startswith(
    E assert False
    E + where False = <built-in method startswith of str object at 0x7f8716f90710>('<QuerySet from django.db.models.query at')
    E + where <built-in method startswith of str object at 0x7f8716f90710> = "'<QuerySet [<User: john>]>'".startswith
  • Class name: tests.integrations.django.test_basic
    Test name: test_view_exceptions

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_custom_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_removed

    No failure message available

py3.12-django-v5.1

  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application0]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application1]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.test_basic
    Test name: test_queryset_repr

    .../integrations/django/test_basic.py:286: in test_queryset_repr
    assert frame["vars"]["my_queryset"].startswith(
    E assert False
    E + where False = <built-in method startswith of str object at 0x7fcac2a61ca0>('<QuerySet from django.db.models.query at')
    E + where <built-in method startswith of str object at 0x7fcac2a61ca0> = "'<QuerySet [<User: john>]>'".startswith
  • Class name: tests.integrations.django.test_basic
    Test name: test_view_exceptions

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_custom_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_removed

    No failure message available

py3.12-falcon-latest

  • Class name: tests.integrations.falcon.test_falcon
    Test name: test_error_in_errorhandler

    .../integrations/falcon/test_falcon.py:356: in test_error_in_errorhandler
    assert last_ex_values["stacktrace"]["frames"][-1]["vars"]["ex"] == "ValueError()"
    E assert "'ValueError()'" == 'ValueError()'
    E
    E - ValueError()
    E + 'ValueError()'
    E & + +

py3.12-gevent

  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == '<failed to serialize, use init(debug=True) to see error logs>'
    E - <failed to serialize, use init(debug=True) to see error logs>
    E + '<failed to serialize, use init(debug=True) to see error logs>'
    E & + +
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == {'a': '<This is me>'}
    E +"'<failed to serialize, use init(debug=True) to see error logs>'"
    E -{'a': '<This is me>'}
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E assert "'hi, i am a repr'" == 'hi, i am a repr'
    E - hi, i am a repr
    E + 'hi, i am a repr'
    E & + +

py3.12-langchain-latest

  • Class name: tests.integrations.langchain.test_langchain
    Test name: test_langchain_error

    No failure message available

py3.12-langchain-notiktoken

  • Class name: tests.integrations.langchain.test_langchain
    Test name: test_langchain_error

    No failure message available

py3.13-common

  • Class name: tests.new_scopes_compat.test_new_scopes_compat_event
    Test name: test_event

    tests/new_scopes_compat/test_new_scopes_compat_event.py:352: in test_event
    assert error == expected_error(trx, span)
    E assert {'level': 'warning-X', 'exception': {'values': [{'mechanism': {'type': 'generic', 'handled': True}, 'module': None, 'type': 'ValueError', 'value': 'This is a test exception', 'stacktrace': {'frames': [{'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py', 'abs_path': '.../tests/new_scopes_compat/test_new_scopes_compat_event.py', 'function': '_faulty_function', 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event', 'lineno': 244, 'pre_context': [' return create_expected_transaction_event', '', '', 'def _faulty_function():', ' try:'], 'context_line': ' raise ValueError("This is a test exception")', 'post_context': [' except ValueError as ex:', ' sentry_sdk.capture_exception(ex)', '', '', 'def _test_before_send(event, hint):'], 'vars': '"{\'ex\': ValueError(\'This is a test exception\')}"', 'in_app': True}]}}]}, 'event_id': '502c31a710734f2fae03ec3c04e2435f', 'timestamp': '2024-08-07T14:58:03.053663Z', 'contexts': {'character': {'name': 'Mighty Fighter changed by before_send', 'age': 19, 'attack_type': 'melee'}, 'trace': {'trace_id': '611329bdf6fe41e3b51a0b28b1704e74', 'span_id': '8d47c62e4ae5498d', 'parent_span_id': 'bd1c7b3347f8e30e', 'op': 'test_span', 'description': None, 'origin': 'manual', 'data': {'thread.id': '139948996503360', 'thread.name': 'MainThread'}}, 'runtime': {'name': 'CPython', 'version': '3.13.0', 'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) [GCC 9.4.0]'}}, 'user': {'id': '123', 'email': '[email protected]', 'ip_address': '[Filtered]'}, 'transaction': 'test_transaction', 'transaction_info': {'source': 'custom'}, 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'}, 'extra': {'extra1': 'extra1_value', 'extra2': 'extra2_value', 'should_be_removed_by_event_scrubber': '[Filtered]', 'sys.argv': '[Filtered]'}, 'breadcrumbs': {'values': [{'category': 'error-level', 'message': 'Authenticated user %s', 'level': 'error', 'data': {'breadcrumb2': 'somedata'}, 'timestamp': '2024-08-07T14:58:03.051486Z', 'type': 'default'}]}, 'modules': {'sentry-sdk': '2.12.0', 'asttokens': '2.4.1', 'pytest-localserver': '0.8.1', 'referencing': '0.35.1', 'iniconfig': '2.0.0', 'jsonschema': '4.23.0', 'pluggy': '1.5.0', 'watchdog': '4.0.1', 'docopt': '0.6.2', 'requests': '2.32.3', 'pytest-cov': '5.0.0', 'responses': '0.25.3', 'pysocks': '1.7.1', 'attrs': '24.2.0', 'six': '1.16.0', 'certifi': '2024.7.4', 'markupsafe': '2.1.5', 'pytest-forked': '1.6.0', 'colorama': '0.4.6', 'idna': '3.7', 'urllib3': '2.2.2', 'pytest-asyncio': '0.23.8', 'rpds-py': '0.20.0', 'pyrsistent': '0.20.0', 'setuptools': '72.1.0', 'py': '1.11.0', 'pytest': '8.3.2', 'coverage': '7.6.1', 'executing': '2.0.1', 'pytest-watch': '4.2.0', 'pyyaml': '6.0.2', 'pip': '24.0', 'packaging': '24.1', 'jsonschema-specifications': '2023.12.1', 'werkzeug': '3.0.3', 'charset-normalizer': '3.3.2'}, 'release': '0.1.2rc3', 'environment': 'checking-compatibility-with-sdk1', 'server_name': 'fv-az1790-326', 'sdk': {'name': 'sentry.python', 'version': '2.12.0', 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.12.0'}], 'integrations': ['argv', 'atexit', 'dedupe', 'excepthook', 'logging', 'modules', 'stdlib', 'threading']}, 'platform': 'python', '_meta': {'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}, 'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config', 's']]}}, 'sys.argv': {'': {'rem': [['!config', 's']]}}}}} == {'level': 'warning-X', 'exception': {'values': [{'mechanism': {'type': 'generic', 'handled': True}, 'module': None, 'type': 'ValueError', 'value': 'This is a test exception', 'stacktrace': {'frames': [{'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py', 'abs_path': <ANY>, 'function': '_faulty_function', 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event', 'lineno': <ANY>, 'pre_context': [' return create_expected_transaction_event', '', '', 'def _faulty_function():', ' try:'], 'context_line': ' raise ValueError("This is a test exception")', 'post_context': [' except ValueError as ex:', ' sentry_sdk.capture_exception(ex)', '', '', 'def _test_before_send(event, hint):'], 'vars': {'ex': <ANY>}, 'in_app': True}]}}]}, 'event_id': <ANY>, 'timestamp': <ANY>, 'contexts': {'character': {'name': 'Mighty Fighter changed by before_send', 'age': 19, 'attack_type': 'melee'}, 'trace': {'trace_id': '611329bdf6fe41e3b51a0b28b1704e74', 'span_id': '8d47c62e4ae5498d', 'parent_span_id': 'bd1c7b3347f8e30e', 'op': 'test_span', 'origin': 'manual', 'description': None, 'data': {'thread.id': <ANY>, 'thread.name': 'MainThread'}}, 'runtime': {'name': 'CPython', 'version': <ANY>, 'build': <ANY>}}, 'user': {'id': '123', 'email': '[email protected]', 'ip_address': '[Filtered]'}, 'transaction': 'test_transaction', 'transaction_info': {'source': 'custom'}, 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'}, 'extra': {'extra1': 'extra1_value', 'extra2': 'extra2_value', 'should_be_removed_by_event_scrubber': '[Filtered]', 'sys.argv': '[Filtered]'}, 'breadcrumbs': {'values': [{'category': 'error-level', 'message': 'Authenticated user %s', 'level': 'error', 'data': {'breadcrumb2': 'somedata'}, 'timestamp': <ANY>, 'type': 'default'}]}, 'modules': <ANY>, 'release': '0.1.2rc3', 'environment': 'checking-compatibility-with-sdk1', 'server_name': <ANY>, 'sdk': {'name': 'sentry.python', 'version': <ANY>, 'packages': [{'name': 'pypi:sentry-sdk', 'version': <ANY>}], 'integrations': ['argv', 'atexit', 'dedupe', 'excepthook', 'logging', 'modules', 'stdlib', 'threading']}, 'platform': 'python', '_meta': {'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}, 'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config', 's']]}}, 'sys.argv': {'': {'rem': [['!config', 's']]}}}}}
    E
    E Common items:
    E {'_meta': {'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config',
    E 's']]}},
    E 'sys.argv': {'': {'rem': [['!config', 's']]}}},
    E 'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}},
    E 'breadcrumbs': {'values': [{'category': 'error-level',
    E 'data': {'breadcrumb2': 'somedata'},
    E 'level': 'error',
    E 'message': 'Authenticated user %s',
    E 'timestamp': '2024-08-07T14:58:03.051486Z',
    E 'type': 'default'}]},
    E 'contexts': {'character': {'age': 19,
    E 'attack_type': 'melee',
    E 'name': 'Mighty Fighter changed by before_send'},
    E 'runtime': {'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) '
    E '[GCC 9.4.0]',
    E 'name': 'CPython',
    E 'version': '3.13.0'},
    E 'trace': {'data': {'thread.id': '139948996503360',
    E 'thread.name': 'MainThread'},
    E 'description': None,
    E 'op': 'test_span',
    E 'origin': 'manual',
    E 'parent_span_id': 'bd1c7b3347f8e30e',
    E 'span_id': '8d47c62e4ae5498d',
    E 'trace_id': '611329bdf6fe41e3b51a0b28b1704e74'}},
    E 'environment': 'checking-compatibility-with-sdk1',
    E 'event_id': '502c31a710734f2fae03ec3c04e2435f',
    E 'extra': {'extra1': 'extra1_value',
    E 'extra2': 'extra2_value',
    E 'should_be_removed_by_event_scrubber': '[Filtered]',
    E 'sys.argv': '[Filtered]'},
    E 'level': 'warning-X',
    E 'modules': {'asttokens': '2.4.1',
    E 'attrs': '24.2.0',
    E 'certifi': '2024.7.4',
    E 'charset-normalizer': '3.3.2',
    E 'colorama': '0.4.6',
    E 'coverage': '7.6.1',
    E 'docopt': '0.6.2',
    E 'executing': '2.0.1',
    E 'idna': '3.7',
    E 'iniconfig': '2.0.0',
    E 'jsonschema': '4.23.0',
    E 'jsonschema-specifications': '2023.12.1',
    E 'markupsafe': '2.1.5',
    E 'packaging': '24.1',
    E 'pip': '24.0',
    E 'pluggy': '1.5.0',
    E 'py': '1.11.0',
    E 'pyrsistent': '0.20.0',
    E 'pysocks': '1.7.1',
    E 'pytest': '8.3.2',
    E 'pytest-asyncio': '0.23.8',
    E 'pytest-cov': '5.0.0',
    E 'pytest-forked': '1.6.0',
    E 'pytest-localserver': '0.8.1',
    E 'pytest-watch': '4.2.0',
    E 'pyyaml': '6.0.2',
    E 'referencing': '0.35.1',
    E 'requests': '2.32.3',
    E 'responses': '0.25.3',
    E 'rpds-py': '0.20.0',
    E 'sentry-sdk': '2.12.0',
    E 'setuptools': '72.1.0',
    E 'six': '1.16.0',
    E 'urllib3': '2.2.2',
    E 'watchdog': '4.0.1',
    E 'werkzeug': '3.0.3'},
    E 'platform': 'python',
    E 'release': '0.1.2rc3',
    E 'sdk': {'integrations': ['argv',
    E 'atexit',
    E 'dedupe',
    E 'excepthook',
    E 'logging',
    E 'modules',
    E 'stdlib',
    E 'threading'],
    E 'name': 'sentry.python',
    E 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.12.0'}],
    E 'version': '2.12.0'},
    E 'server_name': 'fv-az1790-326',
    E 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'},
    E 'timestamp': '2024-08-07T14:58:03.053663Z',
    E 'transaction': 'test_transaction',
    E 'transaction_info': {'source': 'custom'},
    E 'user': {'email': '[email protected]',
    E 'id': '123',
    E 'ip_address': '[Filtered]'}}
    E Differing items:
    E {'exception': {'values': [{'mechanism': {'handled': True, 'type': 'generic'}, 'module': None, 'stacktrace': {'frames': [{...}]}, 'type': 'ValueError', ...}]}} != {'exception': {'values': [{'mechanism': {'handled': True, 'type': 'generic'}, 'module': None, 'stacktrace': {'frames': [{...}]}, 'type': 'ValueError', ...}]}}
    E
    E Full diff:
    E {
    E '_meta': {
    E 'extra': {
    E 'should_be_removed_by_event_scrubber': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E 'sys.argv': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E },
    E 'user': {
    E 'ip_address': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E },
    E },
    E 'breadcrumbs': {
    E 'values': [
    E {
    E 'category': 'error-level',
    E 'data': {
    E 'breadcrumb2': 'somedata',
    E },
    E 'level': 'error',
    E 'message': 'Authenticated user %s',
    E - 'timestamp': <ANY>,
    E + 'timestamp': '2024-08-07T14:58:03.051486Z',
    E 'type': 'default',
    E },
    E ],
    E },
    E 'contexts': {
    E 'character': {
    E 'age': 19,
    E 'attack_type': 'melee',
    E 'name': 'Mighty Fighter changed by before_send',
    E },
    E 'runtime': {
    E - 'build': <ANY>,
    E + 'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) [GCC 9.4.0]',
    E 'name': 'CPython',
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '3.13.0',
    E & ^^^^^^^^
    E },
    E 'trace': {
    E 'data': {
    E - 'thread.id': <ANY>,
    E + 'thread.id': '139948996503360',
    E 'thread.name': 'MainThread',
    E },
    E 'description': None,
    E 'op': 'test_span',
    E 'origin': 'manual',
    E 'parent_span_id': 'bd1c7b3347f8e30e',
    E 'span_id': '8d47c62e4ae5498d',
    E 'trace_id': '611329bdf6fe41e3b51a0b28b1704e74',
    E },
    E },
    E 'environment': 'checking-compatibility-with-sdk1',
    E - 'event_id': <ANY>,
    E + 'event_id': '502c31a710734f2fae03ec3c04e2435f',
    E 'exception': {
    E 'values': [
    E {
    E 'mechanism': {
    E 'handled': True,
    E 'type': 'generic',
    E },
    E 'module': None,
    E 'stacktrace': {
    E 'frames': [
    E {
    E - 'abs_path': <ANY>,
    E + 'abs_path': '.../tests/new_scopes_compat/test_new_scopes_compat_event.py',
    E 'context_line': ' raise ValueError("This is a test '
    E 'exception")',
    E 'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py',
    E 'function': '_faulty_function',
    E 'in_app': True,
    E - 'lineno': <ANY>,
    E & ^^^^^
    E + 'lineno': 244,
    E & ^^^
    E 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event',
    E 'post_context': [
    E ' except ValueError as ex:',
    E ' sentry_sdk.capture_exception(ex)',
    E '',
    E '',
    E 'def _test_before_send(event, hint):',
    E ],
    E 'pre_context': [
    E ' return create_expected_transaction_event',
    E '',
    E '',
    E 'def _faulty_function():',
    E ' try:',
    E ],
    E + 'vars': '"{\'ex\': ValueError(\'This is a test '
    E - 'vars': {
    E - 'ex': <ANY>,
    E - },
    E + 'exception\')}"',
    E & +++++++++++++ ++
    E },
    E ],
    E },
    E 'type': 'ValueError',
    E 'value': 'This is a test exception',
    E },
    E ],
    E },
    E 'extra': {
    E 'extra1': 'extra1_value',
    E 'extra2': 'extra2_value',
    E 'should_be_removed_by_event_scrubber': '[Filtered]',
    E 'sys.argv': '[Filtered]',
    E },
    E 'level': 'warning-X',
    E - 'modules': <ANY>,
    E & ^^^^^^
    E + 'modules': {
    E & ^
    E + 'asttokens': '2.4.1',
    E + 'attrs': '24.2.0',
    E + 'certifi': '2024.7.4',
    E + 'charset-normalizer': '3.3.2',
    E + 'colorama': '0.4.6',
    E + 'coverage': '7.6.1',
    E + 'docopt': '0.6.2',
    E + 'executing': '2.0.1',
    E + 'idna': '3.7',
    E + 'iniconfig': '2.0.0',
    E + 'jsonschema': '4.23.0',
    E + 'jsonschema-specifications': '2023.12.1',
    E + 'markupsafe': '2.1.5',
    E + 'packaging': '24.1',
    E + 'pip': '24.0',
    E + 'pluggy': '1.5.0',
    E + 'py': '1.11.0',
    E + 'pyrsistent': '0.20.0',
    E + 'pysocks': '1.7.1',
    E + 'pytest': '8.3.2',
    E + 'pytest-asyncio': '0.23.8',
    E + 'pytest-cov': '5.0.0',
    E + 'pytest-forked': '1.6.0',
    E + 'pytest-localserver': '0.8.1',
    E + 'pytest-watch': '4.2.0',
    E + 'pyyaml': '6.0.2',
    E + 'referencing': '0.35.1',
    E + 'requests': '2.32.3',
    E + 'responses': '0.25.3',
    E + 'rpds-py': '0.20.0',
    E + 'sentry-sdk': '2.12.0',
    E + 'setuptools': '72.1.0',
    E + 'six': '1.16.0',
    E + 'urllib3': '2.2.2',
    E + 'watchdog': '4.0.1',
    E + 'werkzeug': '3.0.3',
    E + },
    E 'platform': 'python',
    E 'release': '0.1.2rc3',
    E 'sdk': {
    E 'integrations': [
    E 'argv',
    E 'atexit',
    E 'dedupe',
    E 'excepthook',
    E 'logging',
    E 'modules',
    E 'stdlib',
    E 'threading',
    E ],
    E 'name': 'sentry.python',
    E 'packages': [
    E {
    E 'name': 'pypi:sentry-sdk',
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '2.12.0',
    E & ^^^^^^^^
    E - },
    E - ],
    E & ^
    E + },
    E & ^^^^^
    E + ],
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '2.12.0',
    E & ^^^^^^^^
    E },
    E - 'server_name': <ANY>,
    E + 'server_name': 'fv-az1790-326',
    E 'tags': {
    E 'tag1': 'tag1_value',
    E 'tag2': 'tag2_value',
    E },
    E - 'timestamp': <ANY>,
    E + 'timestamp': '2024-08-07T14:58:03.053663Z',
    E 'transaction': 'test_transaction',
    E 'transaction_info': {
    E 'source': 'custom',
    E },
    E 'user': {
    E 'email': '[email protected]',
    E 'id': '123',
    E 'ip_address': '[Filtered]',
    E },
    E }
  • Class name: tests.new_scopes_compat.test_new_scopes_compat_event
    Test name: test_event2

    tests/new_scopes_compat/test_new_scopes_compat_event.py:388: in test_event2
    assert error == expected_error(trx, span)
    E assert {'level': 'warning-X', 'exception': {'values': [{'mechanism': {'type': 'generic', 'handled': True}, 'module': None, 'type': 'ValueError', 'value': 'This is a test exception', 'stacktrace': {'frames': [{'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py', 'abs_path': '.../tests/new_scopes_compat/test_new_scopes_compat_event.py', 'function': '_faulty_function', 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event', 'lineno': 244, 'pre_context': [' return create_expected_transaction_event', '', '', 'def _faulty_function():', ' try:'], 'context_line': ' raise ValueError("This is a test exception")', 'post_context': [' except ValueError as ex:', ' sentry_sdk.capture_exception(ex)', '', '', 'def _test_before_send(event, hint):'], 'vars': '"{\'ex\': ValueError(\'This is a test exception\')}"', 'in_app': True}]}}]}, 'event_id': '4b7ca20f4a7d4b148d2148105e368c75', 'timestamp': '2024-08-07T14:58:03.091697Z', 'contexts': {'character': {'name': 'Mighty Fighter changed by before_send', 'age': 19, 'attack_type': 'melee'}, 'trace': {'trace_id': 'f598ad6c6b4d4609a36178e286e950de', 'span_id': 'b7a4e5d25d357fad', 'parent_span_id': '949b4065da915df7', 'op': 'test_span', 'description': None, 'origin': 'manual', 'data': {'thread.id': '139948996503360', 'thread.name': 'MainThread'}}, 'runtime': {'name': 'CPython', 'version': '3.13.0', 'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) [GCC 9.4.0]'}}, 'user': {'id': '123', 'email': '[email protected]', 'ip_address': '[Filtered]'}, 'transaction': 'test_transaction', 'transaction_info': {'source': 'custom'}, 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'}, 'extra': {'extra1': 'extra1_value', 'extra2': 'extra2_value', 'should_be_removed_by_event_scrubber': '[Filtered]', 'sys.argv': '[Filtered]'}, 'breadcrumbs': {'values': [{'category': 'error-level', 'message': 'Authenticated user %s', 'level': 'error', 'data': {'breadcrumb2': 'somedata'}, 'timestamp': '2024-08-07T14:58:03.091329Z', 'type': 'default'}]}, 'modules': {'sentry-sdk': '2.12.0', 'asttokens': '2.4.1', 'pytest-localserver': '0.8.1', 'referencing': '0.35.1', 'iniconfig': '2.0.0', 'jsonschema': '4.23.0', 'pluggy': '1.5.0', 'watchdog': '4.0.1', 'docopt': '0.6.2', 'requests': '2.32.3', 'pytest-cov': '5.0.0', 'responses': '0.25.3', 'pysocks': '1.7.1', 'attrs': '24.2.0', 'six': '1.16.0', 'certifi': '2024.7.4', 'markupsafe': '2.1.5', 'pytest-forked': '1.6.0', 'colorama': '0.4.6', 'idna': '3.7', 'urllib3': '2.2.2', 'pytest-asyncio': '0.23.8', 'rpds-py': '0.20.0', 'pyrsistent': '0.20.0', 'setuptools': '72.1.0', 'py': '1.11.0', 'pytest': '8.3.2', 'coverage': '7.6.1', 'executing': '2.0.1', 'pytest-watch': '4.2.0', 'pyyaml': '6.0.2', 'pip': '24.0', 'packaging': '24.1', 'jsonschema-specifications': '2023.12.1', 'werkzeug': '3.0.3', 'charset-normalizer': '3.3.2'}, 'release': '0.1.2rc3', 'environment': 'checking-compatibility-with-sdk1', 'server_name': 'fv-az1790-326', 'sdk': {'name': 'sentry.python', 'version': '2.12.0', 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.12.0'}], 'integrations': ['argv', 'atexit', 'dedupe', 'excepthook', 'logging', 'modules', 'stdlib', 'threading']}, 'platform': 'python', '_meta': {'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}, 'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config', 's']]}}, 'sys.argv': {'': {'rem': [['!config', 's']]}}}}} == {'level': 'warning-X', 'exception': {'values': [{'mechanism': {'type': 'generic', 'handled': True}, 'module': None, 'type': 'ValueError', 'value': 'This is a test exception', 'stacktrace': {'frames': [{'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py', 'abs_path': <ANY>, 'function': '_faulty_function', 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event', 'lineno': <ANY>, 'pre_context': [' return create_expected_transaction_event', '', '', 'def _faulty_function():', ' try:'], 'context_line': ' raise ValueError("This is a test exception")', 'post_context': [' except ValueError as ex:', ' sentry_sdk.capture_exception(ex)', '', '', 'def _test_before_send(event, hint):'], 'vars': {'ex': <ANY>}, 'in_app': True}]}}]}, 'event_id': <ANY>, 'timestamp': <ANY>, 'contexts': {'character': {'name': 'Mighty Fighter changed by before_send', 'age': 19, 'attack_type': 'melee'}, 'trace': {'trace_id': 'f598ad6c6b4d4609a36178e286e950de', 'span_id': 'b7a4e5d25d357fad', 'parent_span_id': '949b4065da915df7', 'op': 'test_span', 'origin': 'manual', 'description': None, 'data': {'thread.id': <ANY>, 'thread.name': 'MainThread'}}, 'runtime': {'name': 'CPython', 'version': <ANY>, 'build': <ANY>}}, 'user': {'id': '123', 'email': '[email protected]', 'ip_address': '[Filtered]'}, 'transaction': 'test_transaction', 'transaction_info': {'source': 'custom'}, 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'}, 'extra': {'extra1': 'extra1_value', 'extra2': 'extra2_value', 'should_be_removed_by_event_scrubber': '[Filtered]', 'sys.argv': '[Filtered]'}, 'breadcrumbs': {'values': [{'category': 'error-level', 'message': 'Authenticated user %s', 'level': 'error', 'data': {'breadcrumb2': 'somedata'}, 'timestamp': <ANY>, 'type': 'default'}]}, 'modules': <ANY>, 'release': '0.1.2rc3', 'environment': 'checking-compatibility-with-sdk1', 'server_name': <ANY>, 'sdk': {'name': 'sentry.python', 'version': <ANY>, 'packages': [{'name': 'pypi:sentry-sdk', 'version': <ANY>}], 'integrations': ['argv', 'atexit', 'dedupe', 'excepthook', 'logging', 'modules', 'stdlib', 'threading']}, 'platform': 'python', '_meta': {'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}, 'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config', 's']]}}, 'sys.argv': {'': {'rem': [['!config', 's']]}}}}}
    E
    E Common items:
    E {'_meta': {'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config',
    E 's']]}},
    E 'sys.argv': {'': {'rem': [['!config', 's']]}}},
    E 'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}},
    E 'breadcrumbs': {'values': [{'category': 'error-level',
    E 'data': {'breadcrumb2': 'somedata'},
    E 'level': 'error',
    E 'message': 'Authenticated user %s',
    E 'timestamp': '2024-08-07T14:58:03.091329Z',
    E 'type': 'default'}]},
    E 'contexts': {'character': {'age': 19,
    E 'attack_type': 'melee',
    E 'name': 'Mighty Fighter changed by before_send'},
    E 'runtime': {'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) '
    E '[GCC 9.4.0]',
    E 'name': 'CPython',
    E 'version': '3.13.0'},
    E 'trace': {'data': {'thread.id': '139948996503360',
    E 'thread.name': 'MainThread'},
    E 'description': None,
    E 'op': 'test_span',
    E 'origin': 'manual',
    E 'parent_span_id': '949b4065da915df7',
    E 'span_id': 'b7a4e5d25d357fad',
    E 'trace_id': 'f598ad6c6b4d4609a36178e286e950de'}},
    E 'environment': 'checking-compatibility-with-sdk1',
    E 'event_id': '4b7ca20f4a7d4b148d2148105e368c75',
    E 'extra': {'extra1': 'extra1_value',
    E 'extra2': 'extra2_value',
    E 'should_be_removed_by_event_scrubber': '[Filtered]',
    E 'sys.argv': '[Filtered]'},
    E 'level': 'warning-X',
    E 'modules': {'asttokens': '2.4.1',
    E 'attrs': '24.2.0',
    E 'certifi': '2024.7.4',
    E 'charset-normalizer': '3.3.2',
    E 'colorama': '0.4.6',
    E 'coverage': '7.6.1',
    E 'docopt': '0.6.2',
    E 'executing': '2.0.1',
    E 'idna': '3.7',
    E 'iniconfig': '2.0.0',
    E 'jsonschema': '4.23.0',
    E 'jsonschema-specifications': '2023.12.1',
    E 'markupsafe': '2.1.5',
    E 'packaging': '24.1',
    E 'pip': '24.0',
    E 'pluggy': '1.5.0',
    E 'py': '1.11.0',
    E 'pyrsistent': '0.20.0',
    E 'pysocks': '1.7.1',
    E 'pytest': '8.3.2',
    E 'pytest-asyncio': '0.23.8',
    E 'pytest-cov': '5.0.0',
    E 'pytest-forked': '1.6.0',
    E 'pytest-localserver': '0.8.1',
    E 'pytest-watch': '4.2.0',
    E 'pyyaml': '6.0.2',
    E 'referencing': '0.35.1',
    E 'requests': '2.32.3',
    E 'responses': '0.25.3',
    E 'rpds-py': '0.20.0',
    E 'sentry-sdk': '2.12.0',
    E 'setuptools': '72.1.0',
    E 'six': '1.16.0',
    E 'urllib3': '2.2.2',
    E 'watchdog': '4.0.1',
    E 'werkzeug': '3.0.3'},
    E 'platform': 'python',
    E 'release': '0.1.2rc3',
    E 'sdk': {'integrations': ['argv',
    E 'atexit',
    E 'dedupe',
    E 'excepthook',
    E 'logging',
    E 'modules',
    E 'stdlib',
    E 'threading'],
    E 'name': 'sentry.python',
    E 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.12.0'}],
    E 'version': '2.12.0'},
    E 'server_name': 'fv-az1790-326',
    E 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'},
    E 'timestamp': '2024-08-07T14:58:03.091697Z',
    E 'transaction': 'test_transaction',
    E 'transaction_info': {'source': 'custom'},
    E 'user': {'email': '[email protected]',
    E 'id': '123',
    E 'ip_address': '[Filtered]'}}
    E Differing items:
    E {'exception': {'values': [{'mechanism': {'handled': True, 'type': 'generic'}, 'module': None, 'stacktrace': {'frames': [{...}]}, 'type': 'ValueError', ...}]}} != {'exception': {'values': [{'mechanism': {'handled': True, 'type': 'generic'}, 'module': None, 'stacktrace': {'frames': [{...}]}, 'type': 'ValueError', ...}]}}
    E
    E Full diff:
    E {
    E '_meta': {
    E 'extra': {
    E 'should_be_removed_by_event_scrubber': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E 'sys.argv': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E },
    E 'user': {
    E 'ip_address': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E },
    E },
    E 'breadcrumbs': {
    E 'values': [
    E {
    E 'category': 'error-level',
    E 'data': {
    E 'breadcrumb2': 'somedata',
    E },
    E 'level': 'error',
    E 'message': 'Authenticated user %s',
    E - 'timestamp': <ANY>,
    E + 'timestamp': '2024-08-07T14:58:03.091329Z',
    E 'type': 'default',
    E },
    E ],
    E },
    E 'contexts': {
    E 'character': {
    E 'age': 19,
    E 'attack_type': 'melee',
    E 'name': 'Mighty Fighter changed by before_send',
    E },
    E 'runtime': {
    E - 'build': <ANY>,
    E + 'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) [GCC 9.4.0]',
    E 'name': 'CPython',
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '3.13.0',
    E & ^^^^^^^^
    E },
    E 'trace': {
    E 'data': {
    E - 'thread.id': <ANY>,
    E + 'thread.id': '139948996503360',
    E 'thread.name': 'MainThread',
    E },
    E 'description': None,
    E 'op': 'test_span',
    E 'origin': 'manual',
    E 'parent_span_id': '949b4065da915df7',
    E 'span_id': 'b7a4e5d25d357fad',
    E 'trace_id': 'f598ad6c6b4d4609a36178e286e950de',
    E },
    E },
    E 'environment': 'checking-compatibility-with-sdk1',
    E - 'event_id': <ANY>,
    E + 'event_id': '4b7ca20f4a7d4b148d2148105e368c75',
    E 'exception': {
    E 'values': [
    E {
    E 'mechanism': {
    E 'handled': True,
    E 'type': 'generic',
    E },
    E 'module': None,
    E 'stacktrace': {
    E 'frames': [
    E {
    E - 'abs_path': <ANY>,
    E + 'abs_path': '.../tests/new_scopes_compat/test_new_scopes_compat_event.py',
    E 'context_line': ' raise ValueError("This is a test '
    E 'exception")',
    E 'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py',
    E 'function': '_faulty_function',
    E 'in_app': True,
    E - 'lineno': <ANY>,
    E & ^^^^^
    E + 'lineno': 244,
    E & ^^^
    E 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event',
    E 'post_context': [
    E ' except ValueError as ex:',
    E ' sentry_sdk.capture_exception(ex)',
    E '',
    E '',
    E 'def _test_before_send(event, hint):',
    E ],
    E 'pre_context': [
    E ' return create_expected_transaction_event',
    E '',
    E '',
    E 'def _faulty_function():',
    E ' try:',
    E ],
    E + 'vars': '"{\'ex\': ValueError(\'This is a test '
    E - 'vars': {
    E - 'ex': <ANY>,
    E - },
    E + 'exception\')}"',
    E & +++++++++++++ ++
    E },
    E ],
    E },
    E 'type': 'ValueError',
    E 'value': 'This is a test exception',
    E },
    E ],
    E },
    E 'extra': {
    E 'extra1': 'extra1_value',
    E 'extra2': 'extra2_value',
    E 'should_be_removed_by_event_scrubber': '[Filtered]',
    E 'sys.argv': '[Filtered]',
    E },
    E 'level': 'warning-X',
    E - 'modules': <ANY>,
    E & ^^^^^^
    E + 'modules': {
    E & ^
    E + 'asttokens': '2.4.1',
    E + 'attrs': '24.2.0',
    E + 'certifi': '2024.7.4',
    E + 'charset-normalizer': '3.3.2',
    E + 'colorama': '0.4.6',
    E + 'coverage': '7.6.1',
    E + 'docopt': '0.6.2',
    E + 'executing': '2.0.1',
    E + 'idna': '3.7',
    E + 'iniconfig': '2.0.0',
    E + 'jsonschema': '4.23.0',
    E + 'jsonschema-specifications': '2023.12.1',
    E + 'markupsafe': '2.1.5',
    E + 'packaging': '24.1',
    E + 'pip': '24.0',
    E + 'pluggy': '1.5.0',
    E + 'py': '1.11.0',
    E + 'pyrsistent': '0.20.0',
    E + 'pysocks': '1.7.1',
    E + 'pytest': '8.3.2',
    E + 'pytest-asyncio': '0.23.8',
    E + 'pytest-cov': '5.0.0',
    E + 'pytest-forked': '1.6.0',
    E + 'pytest-localserver': '0.8.1',
    E + 'pytest-watch': '4.2.0',
    E + 'pyyaml': '6.0.2',
    E + 'referencing': '0.35.1',
    E + 'requests': '2.32.3',
    E + 'responses': '0.25.3',
    E + 'rpds-py': '0.20.0',
    E + 'sentry-sdk': '2.12.0',
    E + 'setuptools': '72.1.0',
    E + 'six': '1.16.0',
    E + 'urllib3': '2.2.2',
    E + 'watchdog': '4.0.1',
    E + 'werkzeug': '3.0.3',
    E + },
    E 'platform': 'python',
    E 'release': '0.1.2rc3',
    E 'sdk': {
    E 'integrations': [
    E 'argv',
    E 'atexit',
    E 'dedupe',
    E 'excepthook',
    E 'logging',
    E 'modules',
    E 'stdlib',
    E 'threading',
    E ],
    E 'name': 'sentry.python',
    E 'packages': [
    E {
    E 'name': 'pypi:sentry-sdk',
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '2.12.0',
    E & ^^^^^^^^
    E - },
    E - ],
    E & ^
    E + },
    E & ^^^^^
    E + ],
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '2.12.0',
    E & ^^^^^^^^
    E },
    E - 'server_name': <ANY>,
    E + 'server_name': 'fv-az1790-326',
    E 'tags': {
    E 'tag1': 'tag1_value',
    E 'tag2': 'tag2_value',
    E },
    E - 'timestamp': <ANY>,
    E + 'timestamp': '2024-08-07T14:58:03.091697Z',
    E 'transaction': 'test_transaction',
    E 'transaction_info': {
    E 'source': 'custom',
    E },
    E 'user': {
    E 'email': '[email protected]',
    E 'id': '123',
    E 'ip_address': '[Filtered]',
    E },
    E }
  • Class name: tests.new_scopes_compat.test_new_scopes_compat_event
    Test name: test_event3

    tests/new_scopes_compat/test_new_scopes_compat_event.py:424: in test_event3
    assert error == expected_error(trx, span)
    E assert {'level': 'warning-X', 'exception': {'values': [{'mechanism': {'type': 'generic', 'handled': True}, 'module': None, 'type': 'ValueError', 'value': 'This is a test exception', 'stacktrace': {'frames': [{'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py', 'abs_path': '.../tests/new_scopes_compat/test_new_scopes_compat_event.py', 'function': '_faulty_function', 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event', 'lineno': 244, 'pre_context': [' return create_expected_transaction_event', '', '', 'def _faulty_function():', ' try:'], 'context_line': ' raise ValueError("This is a test exception")', 'post_context': [' except ValueError as ex:', ' sentry_sdk.capture_exception(ex)', '', '', 'def _test_before_send(event, hint):'], 'vars': '"{\'ex\': ValueError(\'This is a test exception\')}"', 'in_app': True}]}}]}, 'event_id': 'a5e472c9a79a4091b48a39d31a2b2afc', 'timestamp': '2024-08-07T14:58:03.128183Z', 'contexts': {'character': {'name': 'Mighty Fighter changed by before_send', 'age': 19, 'attack_type': 'melee'}, 'trace': {'trace_id': '1c12c1b186a7431e8943fc04b181bb19', 'span_id': 'a9cf45d58806e847', 'parent_span_id': '860e5f8b022d0d6f', 'op': 'test_span', 'description': None, 'origin': 'manual', 'data': {'thread.id': '139948996503360', 'thread.name': 'MainThread'}}, 'runtime': {'name': 'CPython', 'version': '3.13.0', 'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) [GCC 9.4.0]'}}, 'user': {'id': '123', 'email': '[email protected]', 'ip_address': '[Filtered]'}, 'transaction': 'test_transaction', 'transaction_info': {'source': 'custom'}, 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'}, 'extra': {'extra1': 'extra1_value', 'extra2': 'extra2_value', 'should_be_removed_by_event_scrubber': '[Filtered]', 'sys.argv': '[Filtered]'}, 'breadcrumbs': {'values': [{'category': 'error-level', 'message': 'Authenticated user %s', 'level': 'error', 'data': {'breadcrumb2': 'somedata'}, 'timestamp': '2024-08-07T14:58:03.127774Z', 'type': 'default'}]}, 'modules': {'sentry-sdk': '2.12.0', 'asttokens': '2.4.1', 'pytest-localserver': '0.8.1', 'referencing': '0.35.1', 'iniconfig': '2.0.0', 'jsonschema': '4.23.0', 'pluggy': '1.5.0', 'watchdog': '4.0.1', 'docopt': '0.6.2', 'requests': '2.32.3', 'pytest-cov': '5.0.0', 'responses': '0.25.3', 'pysocks': '1.7.1', 'attrs': '24.2.0', 'six': '1.16.0', 'certifi': '2024.7.4', 'markupsafe': '2.1.5', 'pytest-forked': '1.6.0', 'colorama': '0.4.6', 'idna': '3.7', 'urllib3': '2.2.2', 'pytest-asyncio': '0.23.8', 'rpds-py': '0.20.0', 'pyrsistent': '0.20.0', 'setuptools': '72.1.0', 'py': '1.11.0', 'pytest': '8.3.2', 'coverage': '7.6.1', 'executing': '2.0.1', 'pytest-watch': '4.2.0', 'pyyaml': '6.0.2', 'pip': '24.0', 'packaging': '24.1', 'jsonschema-specifications': '2023.12.1', 'werkzeug': '3.0.3', 'charset-normalizer': '3.3.2'}, 'release': '0.1.2rc3', 'environment': 'checking-compatibility-with-sdk1', 'server_name': 'fv-az1790-326', 'sdk': {'name': 'sentry.python', 'version': '2.12.0', 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.12.0'}], 'integrations': ['argv', 'atexit', 'dedupe', 'excepthook', 'logging', 'modules', 'stdlib', 'threading']}, 'platform': 'python', '_meta': {'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}, 'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config', 's']]}}, 'sys.argv': {'': {'rem': [['!config', 's']]}}}}} == {'level': 'warning-X', 'exception': {'values': [{'mechanism': {'type': 'generic', 'handled': True}, 'module': None, 'type': 'ValueError', 'value': 'This is a test exception', 'stacktrace': {'frames': [{'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py', 'abs_path': <ANY>, 'function': '_faulty_function', 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event', 'lineno': <ANY>, 'pre_context': [' return create_expected_transaction_event', '', '', 'def _faulty_function():', ' try:'], 'context_line': ' raise ValueError("This is a test exception")', 'post_context': [' except ValueError as ex:', ' sentry_sdk.capture_exception(ex)', '', '', 'def _test_before_send(event, hint):'], 'vars': {'ex': <ANY>}, 'in_app': True}]}}]}, 'event_id': <ANY>, 'timestamp': <ANY>, 'contexts': {'character': {'name': 'Mighty Fighter changed by before_send', 'age': 19, 'attack_type': 'melee'}, 'trace': {'trace_id': '1c12c1b186a7431e8943fc04b181bb19', 'span_id': 'a9cf45d58806e847', 'parent_span_id': '860e5f8b022d0d6f', 'op': 'test_span', 'origin': 'manual', 'description': None, 'data': {'thread.id': <ANY>, 'thread.name': 'MainThread'}}, 'runtime': {'name': 'CPython', 'version': <ANY>, 'build': <ANY>}}, 'user': {'id': '123', 'email': '[email protected]', 'ip_address': '[Filtered]'}, 'transaction': 'test_transaction', 'transaction_info': {'source': 'custom'}, 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'}, 'extra': {'extra1': 'extra1_value', 'extra2': 'extra2_value', 'should_be_removed_by_event_scrubber': '[Filtered]', 'sys.argv': '[Filtered]'}, 'breadcrumbs': {'values': [{'category': 'error-level', 'message': 'Authenticated user %s', 'level': 'error', 'data': {'breadcrumb2': 'somedata'}, 'timestamp': <ANY>, 'type': 'default'}]}, 'modules': <ANY>, 'release': '0.1.2rc3', 'environment': 'checking-compatibility-with-sdk1', 'server_name': <ANY>, 'sdk': {'name': 'sentry.python', 'version': <ANY>, 'packages': [{'name': 'pypi:sentry-sdk', 'version': <ANY>}], 'integrations': ['argv', 'atexit', 'dedupe', 'excepthook', 'logging', 'modules', 'stdlib', 'threading']}, 'platform': 'python', '_meta': {'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}, 'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config', 's']]}}, 'sys.argv': {'': {'rem': [['!config', 's']]}}}}}
    E
    E Common items:
    E {'_meta': {'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config',
    E 's']]}},
    E 'sys.argv': {'': {'rem': [['!config', 's']]}}},
    E 'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}},
    E 'breadcrumbs': {'values': [{'category': 'error-level',
    E 'data': {'breadcrumb2': 'somedata'},
    E 'level': 'error',
    E 'message': 'Authenticated user %s',
    E 'timestamp': '2024-08-07T14:58:03.127774Z',
    E 'type': 'default'}]},
    E 'contexts': {'character': {'age': 19,
    E 'attack_type': 'melee',
    E 'name': 'Mighty Fighter changed by before_send'},
    E 'runtime': {'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) '
    E '[GCC 9.4.0]',
    E 'name': 'CPython',
    E 'version': '3.13.0'},
    E 'trace': {'data': {'thread.id': '139948996503360',
    E 'thread.name': 'MainThread'},
    E 'description': None,
    E 'op': 'test_span',
    E 'origin': 'manual',
    E 'parent_span_id': '860e5f8b022d0d6f',
    E 'span_id': 'a9cf45d58806e847',
    E 'trace_id': '1c12c1b186a7431e8943fc04b181bb19'}},
    E 'environment': 'checking-compatibility-with-sdk1',
    E 'event_id': 'a5e472c9a79a4091b48a39d31a2b2afc',
    E 'extra': {'extra1': 'extra1_value',
    E 'extra2': 'extra2_value',
    E 'should_be_removed_by_event_scrubber': '[Filtered]',
    E 'sys.argv': '[Filtered]'},
    E 'level': 'warning-X',
    E 'modules': {'asttokens': '2.4.1',
    E 'attrs': '24.2.0',
    E 'certifi': '2024.7.4',
    E 'charset-normalizer': '3.3.2',
    E 'colorama': '0.4.6',
    E 'coverage': '7.6.1',
    E 'docopt': '0.6.2',
    E 'executing': '2.0.1',
    E 'idna': '3.7',
    E 'iniconfig': '2.0.0',
    E 'jsonschema': '4.23.0',
    E 'jsonschema-specifications': '2023.12.1',
    E 'markupsafe': '2.1.5',
    E 'packaging': '24.1',
    E 'pip': '24.0',
    E 'pluggy': '1.5.0',
    E 'py': '1.11.0',
    E 'pyrsistent': '0.20.0',
    E 'pysocks': '1.7.1',
    E 'pytest': '8.3.2',
    E 'pytest-asyncio': '0.23.8',
    E 'pytest-cov': '5.0.0',
    E 'pytest-forked': '1.6.0',
    E 'pytest-localserver': '0.8.1',
    E 'pytest-watch': '4.2.0',
    E 'pyyaml': '6.0.2',
    E 'referencing': '0.35.1',
    E 'requests': '2.32.3',
    E 'responses': '0.25.3',
    E 'rpds-py': '0.20.0',
    E 'sentry-sdk': '2.12.0',
    E 'setuptools': '72.1.0',
    E 'six': '1.16.0',
    E 'urllib3': '2.2.2',
    E 'watchdog': '4.0.1',
    E 'werkzeug': '3.0.3'},
    E 'platform': 'python',
    E 'release': '0.1.2rc3',
    E 'sdk': {'integrations': ['argv',
    E 'atexit',
    E 'dedupe',
    E 'excepthook',
    E 'logging',
    E 'modules',
    E 'stdlib',
    E 'threading'],
    E 'name': 'sentry.python',
    E 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.12.0'}],
    E 'version': '2.12.0'},
    E 'server_name': 'fv-az1790-326',
    E 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'},
    E 'timestamp': '2024-08-07T14:58:03.128183Z',
    E 'transaction': 'test_transaction',
    E 'transaction_info': {'source': 'custom'},
    E 'user': {'email': '[email protected]',
    E 'id': '123',
    E 'ip_address': '[Filtered]'}}
    E Differing items:
    E {'exception': {'values': [{'mechanism': {'handled': True, 'type': 'generic'}, 'module': None, 'stacktrace': {'frames': [{...}]}, 'type': 'ValueError', ...}]}} != {'exception': {'values': [{'mechanism': {'handled': True, 'type': 'generic'}, 'module': None, 'stacktrace': {'frames': [{...}]}, 'type': 'ValueError', ...}]}}
    E
    E Full diff:
    E {
    E '_meta': {
    E 'extra': {
    E 'should_be_removed_by_event_scrubber': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E 'sys.argv': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E },
    E 'user': {
    E 'ip_address': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E },
    E },
    E 'breadcrumbs': {
    E 'values': [
    E {
    E 'category': 'error-level',
    E 'data': {
    E 'breadcrumb2': 'somedata',
    E },
    E 'level': 'error',
    E 'message': 'Authenticated user %s',
    E - 'timestamp': <ANY>,
    E + 'timestamp': '2024-08-07T14:58:03.127774Z',
    E 'type': 'default',
    E },
    E ],
    E },
    E 'contexts': {
    E 'character': {
    E 'age': 19,
    E 'attack_type': 'melee',
    E 'name': 'Mighty Fighter changed by before_send',
    E },
    E 'runtime': {
    E - 'build': <ANY>,
    E + 'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) [GCC 9.4.0]',
    E 'name': 'CPython',
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '3.13.0',
    E & ^^^^^^^^
    E },
    E 'trace': {
    E 'data': {
    E - 'thread.id': <ANY>,
    E + 'thread.id': '139948996503360',
    E 'thread.name': 'MainThread',
    E },
    E 'description': None,
    E 'op': 'test_span',
    E 'origin': 'manual',
    E 'parent_span_id': '860e5f8b022d0d6f',
    E 'span_id': 'a9cf45d58806e847',
    E 'trace_id': '1c12c1b186a7431e8943fc04b181bb19',
    E },
    E },
    E 'environment': 'checking-compatibility-with-sdk1',
    E - 'event_id': <ANY>,
    E + 'event_id': 'a5e472c9a79a4091b48a39d31a2b2afc',
    E 'exception': {
    E 'values': [
    E {
    E 'mechanism': {
    E 'handled': True,
    E 'type': 'generic',
    E },
    E 'module': None,
    E 'stacktrace': {
    E 'frames': [
    E {
    E - 'abs_path': <ANY>,
    E + 'abs_path': '.../tests/new_scopes_compat/test_new_scopes_compat_event.py',
    E 'context_line': ' raise ValueError("This is a test '
    E 'exception")',
    E 'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py',
    E 'function': '_faulty_function',
    E 'in_app': True,
    E - 'lineno': <ANY>,
    E & ^^^^^
    E + 'lineno': 244,
    E & ^^^
    E 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event',
    E 'post_context': [
    E ' except ValueError as ex:',
    E ' sentry_sdk.capture_exception(ex)',
    E '',
    E '',
    E 'def _test_before_send(event, hint):',
    E ],
    E 'pre_context': [
    E ' return create_expected_transaction_event',
    E '',
    E '',
    E 'def _faulty_function():',
    E ' try:',
    E ],
    E + 'vars': '"{\'ex\': ValueError(\'This is a test '
    E - 'vars': {
    E - 'ex': <ANY>,
    E - },
    E + 'exception\')}"',
    E & +++++++++++++ ++
    E },
    E ],
    E },
    E 'type': 'ValueError',
    E 'value': 'This is a test exception',
    E },
    E ],
    E },
    E 'extra': {
    E 'extra1': 'extra1_value',
    E 'extra2': 'extra2_value',
    E 'should_be_removed_by_event_scrubber': '[Filtered]',
    E 'sys.argv': '[Filtered]',
    E },
    E 'level': 'warning-X',
    E - 'modules': <ANY>,
    E & ^^^^^^
    E + 'modules': {
    E & ^
    E + 'asttokens': '2.4.1',
    E + 'attrs': '24.2.0',
    E + 'certifi': '2024.7.4',
    E + 'charset-normalizer': '3.3.2',
    E + 'colorama': '0.4.6',
    E + 'coverage': '7.6.1',
    E + 'docopt': '0.6.2',
    E + 'executing': '2.0.1',
    E + 'idna': '3.7',
    E + 'iniconfig': '2.0.0',
    E + 'jsonschema': '4.23.0',
    E + 'jsonschema-specifications': '2023.12.1',
    E + 'markupsafe': '2.1.5',
    E + 'packaging': '24.1',
    E + 'pip': '24.0',
    E + 'pluggy': '1.5.0',
    E + 'py': '1.11.0',
    E + 'pyrsistent': '0.20.0',
    E + 'pysocks': '1.7.1',
    E + 'pytest': '8.3.2',
    E + 'pytest-asyncio': '0.23.8',
    E + 'pytest-cov': '5.0.0',
    E + 'pytest-forked': '1.6.0',
    E + 'pytest-localserver': '0.8.1',
    E + 'pytest-watch': '4.2.0',
    E + 'pyyaml': '6.0.2',
    E + 'referencing': '0.35.1',
    E + 'requests': '2.32.3',
    E + 'responses': '0.25.3',
    E + 'rpds-py': '0.20.0',
    E + 'sentry-sdk': '2.12.0',
    E + 'setuptools': '72.1.0',
    E + 'six': '1.16.0',
    E + 'urllib3': '2.2.2',
    E + 'watchdog': '4.0.1',
    E + 'werkzeug': '3.0.3',
    E + },
    E 'platform': 'python',
    E 'release': '0.1.2rc3',
    E 'sdk': {
    E 'integrations': [
    E 'argv',
    E 'atexit',
    E 'dedupe',
    E 'excepthook',
    E 'logging',
    E 'modules',
    E 'stdlib',
    E 'threading',
    E ],
    E 'name': 'sentry.python',
    E 'packages': [
    E {
    E 'name': 'pypi:sentry-sdk',
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '2.12.0',
    E & ^^^^^^^^
    E - },
    E - ],
    E & ^
    E + },
    E & ^^^^^
    E + ],
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '2.12.0',
    E & ^^^^^^^^
    E },
    E - 'server_name': <ANY>,
    E + 'server_name': 'fv-az1790-326',
    E 'tags': {
    E 'tag1': 'tag1_value',
    E 'tag2': 'tag2_value',
    E },
    E - 'timestamp': <ANY>,
    E + 'timestamp': '2024-08-07T14:58:03.128183Z',
    E 'transaction': 'test_transaction',
    E 'transaction_info': {
    E 'source': 'custom',
    E },
    E 'user': {
    E 'email': '[email protected]',
    E 'id': '123',
    E 'ip_address': '[Filtered]',
    E },
    E }
  • Class name: tests.new_scopes_compat.test_new_scopes_compat_event
    Test name: test_event4

    tests/new_scopes_compat/test_new_scopes_compat_event.py:460: in test_event4
    assert error == expected_error(trx, span)
    E assert {'level': 'warning-X', 'exception': {'values': [{'mechanism': {'type': 'generic', 'handled': True}, 'module': None, 'type': 'ValueError', 'value': 'This is a test exception', 'stacktrace': {'frames': [{'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py', 'abs_path': '.../tests/new_scopes_compat/test_new_scopes_compat_event.py', 'function': '_faulty_function', 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event', 'lineno': 244, 'pre_context': [' return create_expected_transaction_event', '', '', 'def _faulty_function():', ' try:'], 'context_line': ' raise ValueError("This is a test exception")', 'post_context': [' except ValueError as ex:', ' sentry_sdk.capture_exception(ex)', '', '', 'def _test_before_send(event, hint):'], 'vars': '"{\'ex\': ValueError(\'This is a test exception\')}"', 'in_app': True}]}}]}, 'event_id': '785638d2717749648974e1da457a1b74', 'timestamp': '2024-08-07T14:58:03.164734Z', 'contexts': {'character': {'name': 'Mighty Fighter changed by before_send', 'age': 19, 'attack_type': 'melee'}, 'trace': {'trace_id': '1abc747669804c6f82aa65b836848ff4', 'span_id': 'bee4a1783e5bc9c8', 'parent_span_id': 'af6a51f5010d6d78', 'op': 'test_span', 'description': None, 'origin': 'manual', 'data': {'thread.id': '139948996503360', 'thread.name': 'MainThread'}}, 'runtime': {'name': 'CPython', 'version': '3.13.0', 'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) [GCC 9.4.0]'}}, 'user': {'id': '123', 'email': '[email protected]', 'ip_address': '[Filtered]'}, 'transaction': 'test_transaction', 'transaction_info': {'source': 'custom'}, 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'}, 'extra': {'extra1': 'extra1_value', 'extra2': 'extra2_value', 'should_be_removed_by_event_scrubber': '[Filtered]', 'sys.argv': '[Filtered]'}, 'breadcrumbs': {'values': [{'category': 'error-level', 'message': 'Authenticated user %s', 'level': 'error', 'data': {'breadcrumb2': 'somedata'}, 'timestamp': '2024-08-07T14:58:03.164367Z', 'type': 'default'}]}, 'modules': {'sentry-sdk': '2.12.0', 'asttokens': '2.4.1', 'pytest-localserver': '0.8.1', 'referencing': '0.35.1', 'iniconfig': '2.0.0', 'jsonschema': '4.23.0', 'pluggy': '1.5.0', 'watchdog': '4.0.1', 'docopt': '0.6.2', 'requests': '2.32.3', 'pytest-cov': '5.0.0', 'responses': '0.25.3', 'pysocks': '1.7.1', 'attrs': '24.2.0', 'six': '1.16.0', 'certifi': '2024.7.4', 'markupsafe': '2.1.5', 'pytest-forked': '1.6.0', 'colorama': '0.4.6', 'idna': '3.7', 'urllib3': '2.2.2', 'pytest-asyncio': '0.23.8', 'rpds-py': '0.20.0', 'pyrsistent': '0.20.0', 'setuptools': '72.1.0', 'py': '1.11.0', 'pytest': '8.3.2', 'coverage': '7.6.1', 'executing': '2.0.1', 'pytest-watch': '4.2.0', 'pyyaml': '6.0.2', 'pip': '24.0', 'packaging': '24.1', 'jsonschema-specifications': '2023.12.1', 'werkzeug': '3.0.3', 'charset-normalizer': '3.3.2'}, 'release': '0.1.2rc3', 'environment': 'checking-compatibility-with-sdk1', 'server_name': 'fv-az1790-326', 'sdk': {'name': 'sentry.python', 'version': '2.12.0', 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.12.0'}], 'integrations': ['argv', 'atexit', 'dedupe', 'excepthook', 'logging', 'modules', 'stdlib', 'threading']}, 'platform': 'python', '_meta': {'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}, 'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config', 's']]}}, 'sys.argv': {'': {'rem': [['!config', 's']]}}}}} == {'level': 'warning-X', 'exception': {'values': [{'mechanism': {'type': 'generic', 'handled': True}, 'module': None, 'type': 'ValueError', 'value': 'This is a test exception', 'stacktrace': {'frames': [{'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py', 'abs_path': <ANY>, 'function': '_faulty_function', 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event', 'lineno': <ANY>, 'pre_context': [' return create_expected_transaction_event', '', '', 'def _faulty_function():', ' try:'], 'context_line': ' raise ValueError("This is a test exception")', 'post_context': [' except ValueError as ex:', ' sentry_sdk.capture_exception(ex)', '', '', 'def _test_before_send(event, hint):'], 'vars': {'ex': <ANY>}, 'in_app': True}]}}]}, 'event_id': <ANY>, 'timestamp': <ANY>, 'contexts': {'character': {'name': 'Mighty Fighter changed by before_send', 'age': 19, 'attack_type': 'melee'}, 'trace': {'trace_id': '1abc747669804c6f82aa65b836848ff4', 'span_id': 'bee4a1783e5bc9c8', 'parent_span_id': 'af6a51f5010d6d78', 'op': 'test_span', 'origin': 'manual', 'description': None, 'data': {'thread.id': <ANY>, 'thread.name': 'MainThread'}}, 'runtime': {'name': 'CPython', 'version': <ANY>, 'build': <ANY>}}, 'user': {'id': '123', 'email': '[email protected]', 'ip_address': '[Filtered]'}, 'transaction': 'test_transaction', 'transaction_info': {'source': 'custom'}, 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'}, 'extra': {'extra1': 'extra1_value', 'extra2': 'extra2_value', 'should_be_removed_by_event_scrubber': '[Filtered]', 'sys.argv': '[Filtered]'}, 'breadcrumbs': {'values': [{'category': 'error-level', 'message': 'Authenticated user %s', 'level': 'error', 'data': {'breadcrumb2': 'somedata'}, 'timestamp': <ANY>, 'type': 'default'}]}, 'modules': <ANY>, 'release': '0.1.2rc3', 'environment': 'checking-compatibility-with-sdk1', 'server_name': <ANY>, 'sdk': {'name': 'sentry.python', 'version': <ANY>, 'packages': [{'name': 'pypi:sentry-sdk', 'version': <ANY>}], 'integrations': ['argv', 'atexit', 'dedupe', 'excepthook', 'logging', 'modules', 'stdlib', 'threading']}, 'platform': 'python', '_meta': {'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}, 'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config', 's']]}}, 'sys.argv': {'': {'rem': [['!config', 's']]}}}}}
    E
    E Common items:
    E {'_meta': {'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config',
    E 's']]}},
    E 'sys.argv': {'': {'rem': [['!config', 's']]}}},
    E 'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}},
    E 'breadcrumbs': {'values': [{'category': 'error-level',
    E 'data': {'breadcrumb2': 'somedata'},
    E 'level': 'error',
    E 'message': 'Authenticated user %s',
    E 'timestamp': '2024-08-07T14:58:03.164367Z',
    E 'type': 'default'}]},
    E 'contexts': {'character': {'age': 19,
    E 'attack_type': 'melee',
    E 'name': 'Mighty Fighter changed by before_send'},
    E 'runtime': {'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) '
    E '[GCC 9.4.0]',
    E 'name': 'CPython',
    E 'version': '3.13.0'},
    E 'trace': {'data': {'thread.id': '139948996503360',
    E 'thread.name': 'MainThread'},
    E 'description': None,
    E 'op': 'test_span',
    E 'origin': 'manual',
    E 'parent_span_id': 'af6a51f5010d6d78',
    E 'span_id': 'bee4a1783e5bc9c8',
    E 'trace_id': '1abc747669804c6f82aa65b836848ff4'}},
    E 'environment': 'checking-compatibility-with-sdk1',
    E 'event_id': '785638d2717749648974e1da457a1b74',
    E 'extra': {'extra1': 'extra1_value',
    E 'extra2': 'extra2_value',
    E 'should_be_removed_by_event_scrubber': '[Filtered]',
    E 'sys.argv': '[Filtered]'},
    E 'level': 'warning-X',
    E 'modules': {'asttokens': '2.4.1',
    E 'attrs': '24.2.0',
    E 'certifi': '2024.7.4',
    E 'charset-normalizer': '3.3.2',
    E 'colorama': '0.4.6',
    E 'coverage': '7.6.1',
    E 'docopt': '0.6.2',
    E 'executing': '2.0.1',
    E 'idna': '3.7',
    E 'iniconfig': '2.0.0',
    E 'jsonschema': '4.23.0',
    E 'jsonschema-specifications': '2023.12.1',
    E 'markupsafe': '2.1.5',
    E 'packaging': '24.1',
    E 'pip': '24.0',
    E 'pluggy': '1.5.0',
    E 'py': '1.11.0',
    E 'pyrsistent': '0.20.0',
    E 'pysocks': '1.7.1',
    E 'pytest': '8.3.2',
    E 'pytest-asyncio': '0.23.8',
    E 'pytest-cov': '5.0.0',
    E 'pytest-forked': '1.6.0',
    E 'pytest-localserver': '0.8.1',
    E 'pytest-watch': '4.2.0',
    E 'pyyaml': '6.0.2',
    E 'referencing': '0.35.1',
    E 'requests': '2.32.3',
    E 'responses': '0.25.3',
    E 'rpds-py': '0.20.0',
    E 'sentry-sdk': '2.12.0',
    E 'setuptools': '72.1.0',
    E 'six': '1.16.0',
    E 'urllib3': '2.2.2',
    E 'watchdog': '4.0.1',
    E 'werkzeug': '3.0.3'},
    E 'platform': 'python',
    E 'release': '0.1.2rc3',
    E 'sdk': {'integrations': ['argv',
    E 'atexit',
    E 'dedupe',
    E 'excepthook',
    E 'logging',
    E 'modules',
    E 'stdlib',
    E 'threading'],
    E 'name': 'sentry.python',
    E 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.12.0'}],
    E 'version': '2.12.0'},
    E 'server_name': 'fv-az1790-326',
    E 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'},
    E 'timestamp': '2024-08-07T14:58:03.164734Z',
    E 'transaction': 'test_transaction',
    E 'transaction_info': {'source': 'custom'},
    E 'user': {'email': '[email protected]',
    E 'id': '123',
    E 'ip_address': '[Filtered]'}}
    E Differing items:
    E {'exception': {'values': [{'mechanism': {'handled': True, 'type': 'generic'}, 'module': None, 'stacktrace': {'frames': [{...}]}, 'type': 'ValueError', ...}]}} != {'exception': {'values': [{'mechanism': {'handled': True, 'type': 'generic'}, 'module': None, 'stacktrace': {'frames': [{...}]}, 'type': 'ValueError', ...}]}}
    E
    E Full diff:
    E {
    E '_meta': {
    E 'extra': {
    E 'should_be_removed_by_event_scrubber': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E 'sys.argv': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E },
    E 'user': {
    E 'ip_address': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E },
    E },
    E 'breadcrumbs': {
    E 'values': [
    E {
    E 'category': 'error-level',
    E 'data': {
    E 'breadcrumb2': 'somedata',
    E },
    E 'level': 'error',
    E 'message': 'Authenticated user %s',
    E - 'timestamp': <ANY>,
    E + 'timestamp': '2024-08-07T14:58:03.164367Z',
    E 'type': 'default',
    E },
    E ],
    E },
    E 'contexts': {
    E 'character': {
    E 'age': 19,
    E 'attack_type': 'melee',
    E 'name': 'Mighty Fighter changed by before_send',
    E },
    E 'runtime': {
    E - 'build': <ANY>,
    E + 'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) [GCC 9.4.0]',
    E 'name': 'CPython',
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '3.13.0',
    E & ^^^^^^^^
    E },
    E 'trace': {
    E 'data': {
    E - 'thread.id': <ANY>,
    E + 'thread.id': '139948996503360',
    E 'thread.name': 'MainThread',
    E },
    E 'description': None,
    E 'op': 'test_span',
    E 'origin': 'manual',
    E 'parent_span_id': 'af6a51f5010d6d78',
    E 'span_id': 'bee4a1783e5bc9c8',
    E 'trace_id': '1abc747669804c6f82aa65b836848ff4',
    E },
    E },
    E 'environment': 'checking-compatibility-with-sdk1',
    E - 'event_id': <ANY>,
    E + 'event_id': '785638d2717749648974e1da457a1b74',
    E 'exception': {
    E 'values': [
    E {
    E 'mechanism': {
    E 'handled': True,
    E 'type': 'generic',
    E },
    E 'module': None,
    E 'stacktrace': {
    E 'frames': [
    E {
    E - 'abs_path': <ANY>,
    E + 'abs_path': '.../tests/new_scopes_compat/test_new_scopes_compat_event.py',
    E 'context_line': ' raise ValueError("This is a test '
    E 'exception")',
    E 'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py',
    E 'function': '_faulty_function',
    E 'in_app': True,
    E - 'lineno': <ANY>,
    E & ^^^^^
    E + 'lineno': 244,
    E & ^^^
    E 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event',
    E 'post_context': [
    E ' except ValueError as ex:',
    E ' sentry_sdk.capture_exception(ex)',
    E '',
    E '',
    E 'def _test_before_send(event, hint):',
    E ],
    E 'pre_context': [
    E ' return create_expected_transaction_event',
    E '',
    E '',
    E 'def _faulty_function():',
    E ' try:',
    E ],
    E + 'vars': '"{\'ex\': ValueError(\'This is a test '
    E - 'vars': {
    E - 'ex': <ANY>,
    E - },
    E + 'exception\')}"',
    E & +++++++++++++ ++
    E },
    E ],
    E },
    E 'type': 'ValueError',
    E 'value': 'This is a test exception',
    E },
    E ],
    E },
    E 'extra': {
    E 'extra1': 'extra1_value',
    E 'extra2': 'extra2_value',
    E 'should_be_removed_by_event_scrubber': '[Filtered]',
    E 'sys.argv': '[Filtered]',
    E },
    E 'level': 'warning-X',
    E - 'modules': <ANY>,
    E & ^^^^^^
    E + 'modules': {
    E & ^
    E + 'asttokens': '2.4.1',
    E + 'attrs': '24.2.0',
    E + 'certifi': '2024.7.4',
    E + 'charset-normalizer': '3.3.2',
    E + 'colorama': '0.4.6',
    E + 'coverage': '7.6.1',
    E + 'docopt': '0.6.2',
    E + 'executing': '2.0.1',
    E + 'idna': '3.7',
    E + 'iniconfig': '2.0.0',
    E + 'jsonschema': '4.23.0',
    E + 'jsonschema-specifications': '2023.12.1',
    E + 'markupsafe': '2.1.5',
    E + 'packaging': '24.1',
    E + 'pip': '24.0',
    E + 'pluggy': '1.5.0',
    E + 'py': '1.11.0',
    E + 'pyrsistent': '0.20.0',
    E + 'pysocks': '1.7.1',
    E + 'pytest': '8.3.2',
    E + 'pytest-asyncio': '0.23.8',
    E + 'pytest-cov': '5.0.0',
    E + 'pytest-forked': '1.6.0',
    E + 'pytest-localserver': '0.8.1',
    E + 'pytest-watch': '4.2.0',
    E + 'pyyaml': '6.0.2',
    E + 'referencing': '0.35.1',
    E + 'requests': '2.32.3',
    E + 'responses': '0.25.3',
    E + 'rpds-py': '0.20.0',
    E + 'sentry-sdk': '2.12.0',
    E + 'setuptools': '72.1.0',
    E + 'six': '1.16.0',
    E + 'urllib3': '2.2.2',
    E + 'watchdog': '4.0.1',
    E + 'werkzeug': '3.0.3',
    E + },
    E 'platform': 'python',
    E 'release': '0.1.2rc3',
    E 'sdk': {
    E 'integrations': [
    E 'argv',
    E 'atexit',
    E 'dedupe',
    E 'excepthook',
    E 'logging',
    E 'modules',
    E 'stdlib',
    E 'threading',
    E ],
    E 'name': 'sentry.python',
    E 'packages': [
    E {
    E 'name': 'pypi:sentry-sdk',
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '2.12.0',
    E & ^^^^^^^^
    E - },
    E - ],
    E & ^
    E + },
    E & ^^^^^
    E + ],
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '2.12.0',
    E & ^^^^^^^^
    E },
    E - 'server_name': <ANY>,
    E + 'server_name': 'fv-az1790-326',
    E 'tags': {
    E 'tag1': 'tag1_value',
    E 'tag2': 'tag2_value',
    E },
    E - 'timestamp': <ANY>,
    E + 'timestamp': '2024-08-07T14:58:03.164734Z',
    E 'transaction': 'test_transaction',
    E 'transaction_info': {
    E 'source': 'custom',
    E },
    E 'user': {
    E 'email': '[email protected]',
    E 'id': '123',
    E 'ip_address': '[Filtered]',
    E },
    E }
  • Class name: tests.new_scopes_compat.test_new_scopes_compat_event
    Test name: test_event5

    tests/new_scopes_compat/test_new_scopes_compat_event.py:496: in test_event5
    assert error == expected_error(trx, span)
    E assert {'level': 'warning-X', 'exception': {'values': [{'mechanism': {'type': 'generic', 'handled': True}, 'module': None, 'type': 'ValueError', 'value': 'This is a test exception', 'stacktrace': {'frames': [{'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py', 'abs_path': '.../tests/new_scopes_compat/test_new_scopes_compat_event.py', 'function': '_faulty_function', 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event', 'lineno': 244, 'pre_context': [' return create_expected_transaction_event', '', '', 'def _faulty_function():', ' try:'], 'context_line': ' raise ValueError("This is a test exception")', 'post_context': [' except ValueError as ex:', ' sentry_sdk.capture_exception(ex)', '', '', 'def _test_before_send(event, hint):'], 'vars': '"{\'ex\': ValueError(\'This is a test exception\')}"', 'in_app': True}]}}]}, 'event_id': 'b30f712b873242e685aace8488f1dec2', 'timestamp': '2024-08-07T14:58:03.200724Z', 'contexts': {'character': {'name': 'Mighty Fighter changed by before_send', 'age': 19, 'attack_type': 'melee'}, 'trace': {'trace_id': 'e05e7779a5bc4613acc91d1bd64c6166', 'span_id': '997ca7b58a3f39f3', 'parent_span_id': 'a39fc2b4026c0631', 'op': 'test_span', 'description': None, 'origin': 'manual', 'data': {'thread.id': '139948996503360', 'thread.name': 'MainThread'}}, 'runtime': {'name': 'CPython', 'version': '3.13.0', 'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) [GCC 9.4.0]'}}, 'user': {'id': '123', 'email': '[email protected]', 'ip_address': '[Filtered]'}, 'transaction': 'test_transaction', 'transaction_info': {'source': 'custom'}, 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'}, 'extra': {'extra1': 'extra1_value', 'extra2': 'extra2_value', 'should_be_removed_by_event_scrubber': '[Filtered]', 'sys.argv': '[Filtered]'}, 'breadcrumbs': {'values': [{'category': 'error-level', 'message': 'Authenticated user %s', 'level': 'error', 'data': {'breadcrumb2': 'somedata'}, 'timestamp': '2024-08-07T14:58:03.200269Z', 'type': 'default'}]}, 'modules': {'sentry-sdk': '2.12.0', 'asttokens': '2.4.1', 'pytest-localserver': '0.8.1', 'referencing': '0.35.1', 'iniconfig': '2.0.0', 'jsonschema': '4.23.0', 'pluggy': '1.5.0', 'watchdog': '4.0.1', 'docopt': '0.6.2', 'requests': '2.32.3', 'pytest-cov': '5.0.0', 'responses': '0.25.3', 'pysocks': '1.7.1', 'attrs': '24.2.0', 'six': '1.16.0', 'certifi': '2024.7.4', 'markupsafe': '2.1.5', 'pytest-forked': '1.6.0', 'colorama': '0.4.6', 'idna': '3.7', 'urllib3': '2.2.2', 'pytest-asyncio': '0.23.8', 'rpds-py': '0.20.0', 'pyrsistent': '0.20.0', 'setuptools': '72.1.0', 'py': '1.11.0', 'pytest': '8.3.2', 'coverage': '7.6.1', 'executing': '2.0.1', 'pytest-watch': '4.2.0', 'pyyaml': '6.0.2', 'pip': '24.0', 'packaging': '24.1', 'jsonschema-specifications': '2023.12.1', 'werkzeug': '3.0.3', 'charset-normalizer': '3.3.2'}, 'release': '0.1.2rc3', 'environment': 'checking-compatibility-with-sdk1', 'server_name': 'fv-az1790-326', 'sdk': {'name': 'sentry.python', 'version': '2.12.0', 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.12.0'}], 'integrations': ['argv', 'atexit', 'dedupe', 'excepthook', 'logging', 'modules', 'stdlib', 'threading']}, 'platform': 'python', '_meta': {'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}, 'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config', 's']]}}, 'sys.argv': {'': {'rem': [['!config', 's']]}}}}} == {'level': 'warning-X', 'exception': {'values': [{'mechanism': {'type': 'generic', 'handled': True}, 'module': None, 'type': 'ValueError', 'value': 'This is a test exception', 'stacktrace': {'frames': [{'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py', 'abs_path': <ANY>, 'function': '_faulty_function', 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event', 'lineno': <ANY>, 'pre_context': [' return create_expected_transaction_event', '', '', 'def _faulty_function():', ' try:'], 'context_line': ' raise ValueError("This is a test exception")', 'post_context': [' except ValueError as ex:', ' sentry_sdk.capture_exception(ex)', '', '', 'def _test_before_send(event, hint):'], 'vars': {'ex': <ANY>}, 'in_app': True}]}}]}, 'event_id': <ANY>, 'timestamp': <ANY>, 'contexts': {'character': {'name': 'Mighty Fighter changed by before_send', 'age': 19, 'attack_type': 'melee'}, 'trace': {'trace_id': 'e05e7779a5bc4613acc91d1bd64c6166', 'span_id': '997ca7b58a3f39f3', 'parent_span_id': 'a39fc2b4026c0631', 'op': 'test_span', 'origin': 'manual', 'description': None, 'data': {'thread.id': <ANY>, 'thread.name': 'MainThread'}}, 'runtime': {'name': 'CPython', 'version': <ANY>, 'build': <ANY>}}, 'user': {'id': '123', 'email': '[email protected]', 'ip_address': '[Filtered]'}, 'transaction': 'test_transaction', 'transaction_info': {'source': 'custom'}, 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'}, 'extra': {'extra1': 'extra1_value', 'extra2': 'extra2_value', 'should_be_removed_by_event_scrubber': '[Filtered]', 'sys.argv': '[Filtered]'}, 'breadcrumbs': {'values': [{'category': 'error-level', 'message': 'Authenticated user %s', 'level': 'error', 'data': {'breadcrumb2': 'somedata'}, 'timestamp': <ANY>, 'type': 'default'}]}, 'modules': <ANY>, 'release': '0.1.2rc3', 'environment': 'checking-compatibility-with-sdk1', 'server_name': <ANY>, 'sdk': {'name': 'sentry.python', 'version': <ANY>, 'packages': [{'name': 'pypi:sentry-sdk', 'version': <ANY>}], 'integrations': ['argv', 'atexit', 'dedupe', 'excepthook', 'logging', 'modules', 'stdlib', 'threading']}, 'platform': 'python', '_meta': {'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}, 'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config', 's']]}}, 'sys.argv': {'': {'rem': [['!config', 's']]}}}}}
    E
    E Common items:
    E {'_meta': {'extra': {'should_be_removed_by_event_scrubber': {'': {'rem': [['!config',
    E 's']]}},
    E 'sys.argv': {'': {'rem': [['!config', 's']]}}},
    E 'user': {'ip_address': {'': {'rem': [['!config', 's']]}}}},
    E 'breadcrumbs': {'values': [{'category': 'error-level',
    E 'data': {'breadcrumb2': 'somedata'},
    E 'level': 'error',
    E 'message': 'Authenticated user %s',
    E 'timestamp': '2024-08-07T14:58:03.200269Z',
    E 'type': 'default'}]},
    E 'contexts': {'character': {'age': 19,
    E 'attack_type': 'melee',
    E 'name': 'Mighty Fighter changed by before_send'},
    E 'runtime': {'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) '
    E '[GCC 9.4.0]',
    E 'name': 'CPython',
    E 'version': '3.13.0'},
    E 'trace': {'data': {'thread.id': '139948996503360',
    E 'thread.name': 'MainThread'},
    E 'description': None,
    E 'op': 'test_span',
    E 'origin': 'manual',
    E 'parent_span_id': 'a39fc2b4026c0631',
    E 'span_id': '997ca7b58a3f39f3',
    E 'trace_id': 'e05e7779a5bc4613acc91d1bd64c6166'}},
    E 'environment': 'checking-compatibility-with-sdk1',
    E 'event_id': 'b30f712b873242e685aace8488f1dec2',
    E 'extra': {'extra1': 'extra1_value',
    E 'extra2': 'extra2_value',
    E 'should_be_removed_by_event_scrubber': '[Filtered]',
    E 'sys.argv': '[Filtered]'},
    E 'level': 'warning-X',
    E 'modules': {'asttokens': '2.4.1',
    E 'attrs': '24.2.0',
    E 'certifi': '2024.7.4',
    E 'charset-normalizer': '3.3.2',
    E 'colorama': '0.4.6',
    E 'coverage': '7.6.1',
    E 'docopt': '0.6.2',
    E 'executing': '2.0.1',
    E 'idna': '3.7',
    E 'iniconfig': '2.0.0',
    E 'jsonschema': '4.23.0',
    E 'jsonschema-specifications': '2023.12.1',
    E 'markupsafe': '2.1.5',
    E 'packaging': '24.1',
    E 'pip': '24.0',
    E 'pluggy': '1.5.0',
    E 'py': '1.11.0',
    E 'pyrsistent': '0.20.0',
    E 'pysocks': '1.7.1',
    E 'pytest': '8.3.2',
    E 'pytest-asyncio': '0.23.8',
    E 'pytest-cov': '5.0.0',
    E 'pytest-forked': '1.6.0',
    E 'pytest-localserver': '0.8.1',
    E 'pytest-watch': '4.2.0',
    E 'pyyaml': '6.0.2',
    E 'referencing': '0.35.1',
    E 'requests': '2.32.3',
    E 'responses': '0.25.3',
    E 'rpds-py': '0.20.0',
    E 'sentry-sdk': '2.12.0',
    E 'setuptools': '72.1.0',
    E 'six': '1.16.0',
    E 'urllib3': '2.2.2',
    E 'watchdog': '4.0.1',
    E 'werkzeug': '3.0.3'},
    E 'platform': 'python',
    E 'release': '0.1.2rc3',
    E 'sdk': {'integrations': ['argv',
    E 'atexit',
    E 'dedupe',
    E 'excepthook',
    E 'logging',
    E 'modules',
    E 'stdlib',
    E 'threading'],
    E 'name': 'sentry.python',
    E 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.12.0'}],
    E 'version': '2.12.0'},
    E 'server_name': 'fv-az1790-326',
    E 'tags': {'tag1': 'tag1_value', 'tag2': 'tag2_value'},
    E 'timestamp': '2024-08-07T14:58:03.200724Z',
    E 'transaction': 'test_transaction',
    E 'transaction_info': {'source': 'custom'},
    E 'user': {'email': '[email protected]',
    E 'id': '123',
    E 'ip_address': '[Filtered]'}}
    E Differing items:
    E {'exception': {'values': [{'mechanism': {'handled': True, 'type': 'generic'}, 'module': None, 'stacktrace': {'frames': [{...}]}, 'type': 'ValueError', ...}]}} != {'exception': {'values': [{'mechanism': {'handled': True, 'type': 'generic'}, 'module': None, 'stacktrace': {'frames': [{...}]}, 'type': 'ValueError', ...}]}}
    E
    E Full diff:
    E {
    E '_meta': {
    E 'extra': {
    E 'should_be_removed_by_event_scrubber': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E 'sys.argv': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E },
    E 'user': {
    E 'ip_address': {
    E '': {
    E 'rem': [
    E [
    E '!config',
    E 's',
    E ],
    E ],
    E },
    E },
    E },
    E },
    E 'breadcrumbs': {
    E 'values': [
    E {
    E 'category': 'error-level',
    E 'data': {
    E 'breadcrumb2': 'somedata',
    E },
    E 'level': 'error',
    E 'message': 'Authenticated user %s',
    E - 'timestamp': <ANY>,
    E + 'timestamp': '2024-08-07T14:58:03.200269Z',
    E 'type': 'default',
    E },
    E ],
    E },
    E 'contexts': {
    E 'character': {
    E 'age': 19,
    E 'attack_type': 'melee',
    E 'name': 'Mighty Fighter changed by before_send',
    E },
    E 'runtime': {
    E - 'build': <ANY>,
    E + 'build': '3.13.0rc1 (main, Aug 5 2024, 13:55:26) [GCC 9.4.0]',
    E 'name': 'CPython',
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '3.13.0',
    E & ^^^^^^^^
    E },
    E 'trace': {
    E 'data': {
    E - 'thread.id': <ANY>,
    E + 'thread.id': '139948996503360',
    E 'thread.name': 'MainThread',
    E },
    E 'description': None,
    E 'op': 'test_span',
    E 'origin': 'manual',
    E 'parent_span_id': 'a39fc2b4026c0631',
    E 'span_id': '997ca7b58a3f39f3',
    E 'trace_id': 'e05e7779a5bc4613acc91d1bd64c6166',
    E },
    E },
    E 'environment': 'checking-compatibility-with-sdk1',
    E - 'event_id': <ANY>,
    E + 'event_id': 'b30f712b873242e685aace8488f1dec2',
    E 'exception': {
    E 'values': [
    E {
    E 'mechanism': {
    E 'handled': True,
    E 'type': 'generic',
    E },
    E 'module': None,
    E 'stacktrace': {
    E 'frames': [
    E {
    E - 'abs_path': <ANY>,
    E + 'abs_path': '.../tests/new_scopes_compat/test_new_scopes_compat_event.py',
    E 'context_line': ' raise ValueError("This is a test '
    E 'exception")',
    E 'filename': 'tests/new_scopes_compat/test_new_scopes_compat_event.py',
    E 'function': '_faulty_function',
    E 'in_app': True,
    E - 'lineno': <ANY>,
    E & ^^^^^
    E + 'lineno': 244,
    E & ^^^
    E 'module': 'tests.new_scopes_compat.test_new_scopes_compat_event',
    E 'post_context': [
    E ' except ValueError as ex:',
    E ' sentry_sdk.capture_exception(ex)',
    E '',
    E '',
    E 'def _test_before_send(event, hint):',
    E ],
    E 'pre_context': [
    E ' return create_expected_transaction_event',
    E '',
    E '',
    E 'def _faulty_function():',
    E ' try:',
    E ],
    E + 'vars': '"{\'ex\': ValueError(\'This is a test '
    E - 'vars': {
    E - 'ex': <ANY>,
    E - },
    E + 'exception\')}"',
    E & +++++++++++++ ++
    E },
    E ],
    E },
    E 'type': 'ValueError',
    E 'value': 'This is a test exception',
    E },
    E ],
    E },
    E 'extra': {
    E 'extra1': 'extra1_value',
    E 'extra2': 'extra2_value',
    E 'should_be_removed_by_event_scrubber': '[Filtered]',
    E 'sys.argv': '[Filtered]',
    E },
    E 'level': 'warning-X',
    E - 'modules': <ANY>,
    E & ^^^^^^
    E + 'modules': {
    E & ^
    E + 'asttokens': '2.4.1',
    E + 'attrs': '24.2.0',
    E + 'certifi': '2024.7.4',
    E + 'charset-normalizer': '3.3.2',
    E + 'colorama': '0.4.6',
    E + 'coverage': '7.6.1',
    E + 'docopt': '0.6.2',
    E + 'executing': '2.0.1',
    E + 'idna': '3.7',
    E + 'iniconfig': '2.0.0',
    E + 'jsonschema': '4.23.0',
    E + 'jsonschema-specifications': '2023.12.1',
    E + 'markupsafe': '2.1.5',
    E + 'packaging': '24.1',
    E + 'pip': '24.0',
    E + 'pluggy': '1.5.0',
    E + 'py': '1.11.0',
    E + 'pyrsistent': '0.20.0',
    E + 'pysocks': '1.7.1',
    E + 'pytest': '8.3.2',
    E + 'pytest-asyncio': '0.23.8',
    E + 'pytest-cov': '5.0.0',
    E + 'pytest-forked': '1.6.0',
    E + 'pytest-localserver': '0.8.1',
    E + 'pytest-watch': '4.2.0',
    E + 'pyyaml': '6.0.2',
    E + 'referencing': '0.35.1',
    E + 'requests': '2.32.3',
    E + 'responses': '0.25.3',
    E + 'rpds-py': '0.20.0',
    E + 'sentry-sdk': '2.12.0',
    E + 'setuptools': '72.1.0',
    E + 'six': '1.16.0',
    E + 'urllib3': '2.2.2',
    E + 'watchdog': '4.0.1',
    E + 'werkzeug': '3.0.3',
    E + },
    E 'platform': 'python',
    E 'release': '0.1.2rc3',
    E 'sdk': {
    E 'integrations': [
    E 'argv',
    E 'atexit',
    E 'dedupe',
    E 'excepthook',
    E 'logging',
    E 'modules',
    E 'stdlib',
    E 'threading',
    E ],
    E 'name': 'sentry.python',
    E 'packages': [
    E {
    E 'name': 'pypi:sentry-sdk',
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '2.12.0',
    E & ^^^^^^^^
    E - },
    E - ],
    E & ^
    E + },
    E & ^^^^^
    E + ],
    E - 'version': <ANY>,
    E & ^^^^^
    E + 'version': '2.12.0',
    E & ^^^^^^^^
    E },
    E - 'server_name': <ANY>,
    E + 'server_name': 'fv-az1790-326',
    E 'tags': {
    E 'tag1': 'tag1_value',
    E 'tag2': 'tag2_value',
    E },
    E - 'timestamp': <ANY>,
    E + 'timestamp': '2024-08-07T14:58:03.200724Z',
    E 'transaction': 'test_transaction',
    E 'transaction_info': {
    E 'source': 'custom',
    E },
    E 'user': {
    E 'email': '[email protected]',
    E 'id': '123',
    E 'ip_address': '[Filtered]',
    E },
    E }
  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E TypeError: string indices must be integers, not 'str'
  • Class name: tests.test_client
    Test name: test_cyclic_frame_vars

    tests/test_client.py:674: in test_cyclic_frame_vars
    assert event["exception"]["values"][0]["stacktrace"]["frames"][0]["vars"]["a"] == {
    E TypeError: string indices must be integers, not 'str'
  • Class name: tests.test_client
    Test name: test_databag_breadth_stripping

    tests/test_client.py:742: in test_databag_breadth_stripping
    @benchmark
    tests/conftest.py:59: in <lambda>
    return lambda x: x()
    tests/test_client.py:753: in inner
    assert (
    E TypeError: string indices must be integers, not 'str'
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E TypeError: string indices must be integers, not 'str'
  • Class name: tests.test_client
    Test name: test_mapping_sends_exception

    tests/test_client.py:845: in test_mapping_sends_exception
    assert event["exception"]["values"][0]["stacktrace"]["frames"][0]["vars"]["a"] == {
    E TypeError: string indices must be integers, not 'str'
  • Class name: tests.test_client
    Test name: test_nan

    tests/test_client.py:658: in test_nan
    assert frame["vars"]["nan"] == "nan"
    E TypeError: string indices must be integers, not 'str'
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E TypeError: string indices must be integers, not 'str'
  • Class name: tests.test_scrubber
    Test name: test_custom_denylist

    tests/test_scrubber.py:148: in test_custom_denylist
    assert frame["vars"]["my_sensitive_var"] == "[Filtered]"
    E TypeError: string indices must be integers, not 'str'
  • Class name: tests.test_scrubber
    Test name: test_recursive_scrubber_does_not_override_original

    tests/test_scrubber.py:206: in test_recursive_scrubber_does_not_override_original
    assert frame["vars"]["data"]["csrf"] == "[Filtered]"
    E TypeError: string indices must be integers, not 'str'
  • Class name: tests.test_scrubber
    Test name: test_scrubbing_doesnt_affect_local_vars

    tests/test_scrubber.py:173: in test_scrubbing_doesnt_affect_local_vars
    assert frame["vars"]["password"] == "[Filtered]"
    E TypeError: string indices must be integers, not 'str'
  • Class name: tests.test_scrubber
    Test name: test_stack_var_scrubbing

    tests/test_scrubber.py:79: in test_stack_var_scrubbing
    assert frame["vars"]["password"] == "[Filtered]"
    E TypeError: string indices must be integers, not 'str'

py3.6-common

  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == '<failed to serialize, use init(debug=True) to see error logs>'
    E - <failed to serialize, use init(debug=True) to see error logs>
    E + '<failed to serialize, use init(debug=True) to see error logs>'
    E & + +
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == {'a': '<This is me>'}
    E +"'<failed to serialize, use init(debug=True) to see error logs>'"
    E -{'a': '<This is me>'}
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E assert "'hi, i am a repr'" == 'hi, i am a repr'
    E - hi, i am a repr
    E + 'hi, i am a repr'
    E & + +

py3.6-django-v3.2

  • Class name: tests.integrations.django.test_basic
    Test name: test_queryset_repr

    .../integrations/django/test_basic.py:286: in test_queryset_repr
    assert frame["vars"]["my_queryset"].startswith(
    E assert False
    E + where False = <built-in method startswith of str object at 0x7f1ea60058a0>('<QuerySet from django.db.models.query at')
    E + where <built-in method startswith of str object at 0x7f1ea60058a0> = "'<QuerySet [<User: john>]>'".startswith
  • Class name: tests.integrations.django.test_basic
    Test name: test_view_exceptions

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_custom_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_removed

    No failure message available

py3.6-falcon-v3

  • Class name: tests.integrations.falcon.test_falcon
    Test name: test_error_in_errorhandler

    .../integrations/falcon/test_falcon.py:356: in test_error_in_errorhandler
    assert last_ex_values["stacktrace"]["frames"][-1]["vars"]["ex"] == "ValueError()"
    E assert "'ValueError()'" == 'ValueError()'
    E - ValueError()
    E + 'ValueError()'
    E & + +

py3.6-gevent

  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == '<failed to serialize, use init(debug=True) to see error logs>'
    E - <failed to serialize, use init(debug=True) to see error logs>
    E + '<failed to serialize, use init(debug=True) to see error logs>'
    E & + +
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == {'a': '<This is me>'}
    E +"'<failed to serialize, use init(debug=True) to see error logs>'"
    E -{'a': '<This is me>'}
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E assert "'hi, i am a repr'" == 'hi, i am a repr'
    E - hi, i am a repr
    E + 'hi, i am a repr'
    E & + +

py3.6-pyramid-latest

  • Class name: tests.integrations.pyramid.test_pyramid
    Test name: test_view_exceptions

    No failure message available

py3.7-asgi

  • Class name: tests.integrations.asgi.test_asgi
    Test name: test_capture_transaction_with_error

    No failure message available

py3.7-common

  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == '<failed to serialize, use init(debug=True) to see error logs>'
    E - <failed to serialize, use init(debug=True) to see error logs>
    E + '<failed to serialize, use init(debug=True) to see error logs>'
    E & + +
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == {'a': '<This is me>'}
    E +"'<failed to serialize, use init(debug=True) to see error logs>'"
    E -{'a': '<This is me>'}
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E assert "'hi, i am a repr'" == 'hi, i am a repr'
    E - hi, i am a repr
    E + 'hi, i am a repr'
    E & + +

py3.7-django-v2.0

  • Class name: tests.integrations.django.test_basic
    Test name: test_queryset_repr

    .../integrations/django/test_basic.py:286: in test_queryset_repr
    assert frame["vars"]["my_queryset"].startswith(
    E assert False
    E + where False = <built-in method startswith of str object at 0x7f22afac99e0>('<QuerySet from django.db.models.query at')
    E + where <built-in method startswith of str object at 0x7f22afac99e0> = "'<QuerySet [<User: john>]>'".startswith
  • Class name: tests.integrations.django.test_basic
    Test name: test_view_exceptions

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_custom_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_removed

    No failure message available

py3.7-falcon-latest

  • Class name: tests.integrations.falcon.test_falcon
    Test name: test_error_in_errorhandler

    .../integrations/falcon/test_falcon.py:356: in test_error_in_errorhandler
    assert last_ex_values["stacktrace"]["frames"][-1]["vars"]["ex"] == "ValueError()"
    E assert "'ValueError()'" == 'ValueError()'
    E - ValueError()
    E + 'ValueError()'
    E & + +

py3.8-common

  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == '<failed to serialize, use init(debug=True) to see error logs>'
    E - <failed to serialize, use init(debug=True) to see error logs>
    E + '<failed to serialize, use init(debug=True) to see error logs>'
    E & + +
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == {'a': '<This is me>'}
    E +"'<failed to serialize, use init(debug=True) to see error logs>'"
    E -{'a': '<This is me>'}
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E assert "'hi, i am a repr'" == 'hi, i am a repr'
    E - hi, i am a repr
    E + 'hi, i am a repr'
    E & + +

py3.8-django-v4.0

  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application0]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_basic[application1]

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_has_trace_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_disabled

    No failure message available
  • Class name: tests.integrations.django.asgi.test_asgi
    Test name: test_trace_from_headers_if_performance_enabled

    No failure message available
  • Class name: tests.integrations.django.test_basic
    Test name: test_queryset_repr

    .../integrations/django/test_basic.py:286: in test_queryset_repr
    assert frame["vars"]["my_queryset"].startswith(
    E assert False
    E + where False = <built-in method startswith of str object at 0x7f026e409c10>('<QuerySet from django.db.models.query at')
    E + where <built-in method startswith of str object at 0x7f026e409c10> = "'<QuerySet [<User: john>]>'".startswith
  • Class name: tests.integrations.django.test_basic
    Test name: test_view_exceptions

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_custom_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_removed

    No failure message available

py3.8-gevent

  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == '<failed to serialize, use init(debug=True) to see error logs>'
    E - <failed to serialize, use init(debug=True) to see error logs>
    E + '<failed to serialize, use init(debug=True) to see error logs>'
    E & + +
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == {'a': '<This is me>'}
    E +"'<failed to serialize, use init(debug=True) to see error logs>'"
    E -{'a': '<This is me>'}
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E assert "'hi, i am a repr'" == 'hi, i am a repr'
    E - hi, i am a repr
    E + 'hi, i am a repr'
    E & + +

py3.8-sanic-v20

  • Class name: tests.integrations.sanic.test_sanic
    Test name: test_errors

    No failure message available

py3.8-tornado-latest

  • Class name: tests.integrations.tornado.test_tornado
    Test name: test_basic

    No failure message available

py3.9-common

  • Class name: tests.test_client
    Test name: test_broken_mapping

    tests/test_client.py:808: in test_broken_mapping
    assert (
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == '<failed to serialize, use init(debug=True) to see error logs>'
    E - <failed to serialize, use init(debug=True) to see error logs>
    E + '<failed to serialize, use init(debug=True) to see error logs>'
    E & + +
  • Class name: tests.test_client
    Test name: test_dict_changed_during_iteration

    tests/test_client.py:944: in test_dict_changed_during_iteration
    assert frame["vars"]["environ"] == {"a": "<This is me>"}
    E assert "'<failed to serialize, use init(debug=True) to see error logs>'" == {'a': '<This is me>'}
    E +"'<failed to serialize, use init(debug=True) to see error logs>'"
    E -{'a': '<This is me>'}
  • Class name: tests.test_client
    Test name: test_object_sends_exception

    tests/test_client.py:870: in test_object_sends_exception
    assert (
    E assert "'hi, i am a repr'" == 'hi, i am a repr'
    E - hi, i am a repr
    E + 'hi, i am a repr'
    E & + +

py3.9-django-v3.2

  • Class name: tests.integrations.django.test_basic
    Test name: test_queryset_repr

    .../integrations/django/test_basic.py:286: in test_queryset_repr
    assert frame["vars"]["my_queryset"].startswith(
    E assert False
    E + where False = <built-in method startswith of str object at 0x7efe0d02f670>('<QuerySet from django.db.models.query at')
    E + where <built-in method startswith of str object at 0x7efe0d02f670> = "'<QuerySet [<User: john>]>'".startswith
  • Class name: tests.integrations.django.test_basic
    Test name: test_view_exceptions

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_custom_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_filtered

    No failure message available
  • Class name: tests.integrations.django.test_data_scrubbing
    Test name: test_scrub_django_session_cookies_removed

    No failure message available

py3.9-langchain-latest

  • Class name: tests.integrations.langchain.test_langchain
    Test name: test_langchain_error

    No failure message available

py3.9-langchain-v0.1

  • Class name: tests.integrations.langchain.test_langchain
    Test name: test_langchain_error

    No failure message available

@sl0thentr0py sl0thentr0py force-pushed the nee/fix-scrubber-overwrite branch from 7ae3b1c to 2db1b27 Compare August 2, 2024 14:44
@sl0thentr0py sl0thentr0py requested a review from sentrivana August 2, 2024 14:46
@sl0thentr0py sl0thentr0py force-pushed the nee/fix-scrubber-overwrite branch from 2db1b27 to 7d3bcc0 Compare August 2, 2024 15:19
@sl0thentr0py sl0thentr0py changed the title Use deepcopy for frame vars Use a deeper copy for frame vars Aug 2, 2024
@sl0thentr0py sl0thentr0py force-pushed the nee/fix-scrubber-overwrite branch from 7d3bcc0 to 009d046 Compare August 2, 2024 15:24
@sl0thentr0py sl0thentr0py force-pushed the nee/fix-scrubber-overwrite branch 3 times, most recently from 7f6f4ee to e8ba3c9 Compare August 7, 2024 11:45
To make this work, I had to add a port of python's `copy.deepcopy` (license included)
that falls back to `safe_repr` instead of the pickling step.
This ensures that we have a deepcopy of all data structure like objects - dicts/lists/tuples and so on
and we make a repr early for other random objects.
@sl0thentr0py sl0thentr0py force-pushed the nee/fix-scrubber-overwrite branch from e8ba3c9 to 9e54be5 Compare August 7, 2024 11:46
@sl0thentr0py
Copy link
Member Author

this is getting out of hand so i'm trying another solution

@sl0thentr0py sl0thentr0py deleted the nee/fix-scrubber-overwrite branch August 26, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants