Skip to content

Not compatible with Strawberry v0.259.0 #4041

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
pronovic opened this issue Feb 11, 2025 · 3 comments
Closed

Not compatible with Strawberry v0.259.0 #4041

pronovic opened this issue Feb 11, 2025 · 3 comments

Comments

@pronovic
Copy link

pronovic commented Feb 11, 2025

How do you use Sentry?

Sentry Saas (sentry.io)

Version

2.20.0

Steps to Reproduce

v0.259.0 of Strawberry made what they consider to be an internal interface change, which breaks Sentry integration.

Here's the relevant stack trace:

../my_code/server.py:22: in <module>
    sentry_sdk.init(
../../.venv/lib/python3.12/site-packages/sentry_sdk/_init_implementation.py:62: in _init
    client = sentry_sdk.Client(*args, **kwargs)
../../.venv/lib/python3.12/site-packages/sentry_sdk/client.py:263: in __init__
    self._init_impl()
../../.venv/lib/python3.12/site-packages/sentry_sdk/client.py:386: in _init_impl
    self.integrations = setup_integrations(
../../.venv/lib/python3.12/site-packages/sentry_sdk/integrations/__init__.py:196: in setup_integrations
    type(integration).setup_once()
../../.venv/lib/python3.12/site-packages/sentry_sdk/integrations/strawberry.py:81: in setup_once
    _patch_execute()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def _patch_execute():
        # type: () -> None
        old_execute_async = strawberry_schema.execute
>       old_execute_sync = strawberry_schema.execute_sync
E       AttributeError: module 'strawberry.schema.schema' has no attribute 'execute_sync'

../../.venv/lib/python3.12/site-packages/sentry_sdk/integrations/strawberry.py:293: AttributeError

I'm hesitant to propose a patch, since I'm not sure I fully understand the intent of this code... but it looks like you are probably going to need two versions of it, one for Strawberry < 0.259.0 and one for >= 0.259.0, to deal with the change in the way their code is organized.

Expected Result

Integration works with v0.259.0 of Strawberry

Actual Result

Integration does not work with v0.259.0 of Strawberry

@sentrivana
Copy link
Contributor

sentrivana commented Feb 12, 2025

Hey @pronovic, thanks for reporting, this is already fixed on our main branch and the fix will be out tomorrow. EDIT: actually today

@sentrivana
Copy link
Contributor

Actually, I'll keep this open so that it's easier to find. Will close as soon as the release is out.

@sentrivana
Copy link
Contributor

Everyone, the fix for this is out now in 2.21.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants