Commit 34dcba4
authored
Remove explicit __del__'s in threaded classes (#4590)
The changes in #4577 introduced a bit of flakiness on pre-3.10 due to a
weird interaction of `capsys`, `stderr` logging and our object
lifecycles.
In this PR, I'm removing all the explicit `__del__` `kill`s since we
[call them all explicitly in
`client.close`](https://github.com/getsentry/sentry-python/blob/09c2e32cc7a618e49f5d8ae59e22d8b12f253687/sentry_sdk/client.py#L1001-L1021)
anyway and that's already cleaner. Having logic in `__del__` causes
non-deterministic GC behavior, especially with threaded code.
Stacktrace is linked in a comment below where you can see the
`transport.__del__` method is causing the weird `reentrant` logging bug
to `stderr`.1 parent da8332a commit 34dcba4
3 files changed
+0
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | 161 | | |
169 | 162 | | |
170 | 163 | | |
| |||
0 commit comments