Commit 336b177
authored
fix(strawberry): prepare for upstream extension removal (#3649)
As suggested by @szokeasaurusrex in strawberry-graphql/strawberry#3590, Strawberry is preparing to fully remove its deprecated SentryTracingExtension in favor of the integration provided by the Sentry SDK.
This PR prepares the Sentry Strawberry integration for that removal by:
- fixing that the integration would assume Strawberry is not installed if the extension cannot be imported
- making sure tests with Strawberry versions before and after the removal still work
I also checked that removing the extension does not otherwise affect the integration: The extension's sync and async variants are imported to replace them and to guess whether sync or async code is used. Both still works if the imports are defaulted to None.1 parent 8d48961 commit 336b177
File tree
2 files changed
+24
-6
lines changed- sentry_sdk/integrations
- tests/integrations/strawberry
2 files changed
+24
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
38 | | - | |
39 | 43 | | |
40 | | - | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
| |||
28 | 24 | | |
29 | 25 | | |
30 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
146 | 155 | | |
147 | 156 | | |
148 | 157 | | |
| |||
152 | 161 | | |
153 | 162 | | |
154 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
155 | 168 | | |
156 | 169 | | |
157 | 170 | | |
| |||
0 commit comments