Commit 1b4f8d3
authored
Fix threading run patch (#4610)
Since we're using `current_thread` for `self` explicitly, we need to
remove the first argument from `*a`.
This actually doesn't matter since `*a, **kw` are actually both empty
but since this is the way the patch is implemented (presumably for
forward compat), I don't want to change the signature.
This fixes the following warning in CI since what actually happens is
this:
* `Thread.run` is being patched at each `Thread.start` (and not just
once as other patches do)
* So the current thread keeps getting accumulated in `*a` giving the
`TypeError` for subsequent thread runs except the first
```python
TypeError: Thread.run() takes 1 positional argument but 5 were given
tests/integrations/redis/cluster_asyncio/test_redis_cluster_asyncio.py::test_async_span_origin
/Users/neel/sentry/sdks/sentry-python/.tox/py3.12-redis-v5/lib/python3.12/site-packages/_pytest/threadexception.py:58: PytestUnhandledThreadExceptionWarning: Exception in thread sentry.monitor
```
closes #43611 parent 7339704 commit 1b4f8d3
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
0 commit comments