Skip to content

Tests warning: Thread.run() takes 1 positional argument but x were given #4361

Open
@sentrivana

Description

@sentrivana

If you run tox -e py3.12-redis-latest locally, this gets logged as a warning:

  /Users/ivana/dev/sentry-python/.tox/py3.13-redis-latest/lib/python3.13/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread sentry.monitor

  Traceback (most recent call last):
    File "/Users/ivana/.pyenv/versions/3.13.1/lib/python3.13/threading.py", line 1041, in _bootstrap_inner
      self.run()
      ~~~~~~~~^^
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 130, in run
      return _run_old_run_func()
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 125, in _run_old_run_func
      reraise(*_capture_exception())
      ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ivana/dev/sentry-python/sentry_sdk/utils.py", line 1746, in reraise
      raise value
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 123, in _run_old_run_func
      return old_run_func(self, *a, **kw)
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 130, in run
      return _run_old_run_func()
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 125, in _run_old_run_func
      reraise(*_capture_exception())
      ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ivana/dev/sentry-python/sentry_sdk/utils.py", line 1746, in reraise
      raise value
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 123, in _run_old_run_func
      return old_run_func(self, *a, **kw)
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 130, in run
      return _run_old_run_func()
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 125, in _run_old_run_func
      reraise(*_capture_exception())
      ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ivana/dev/sentry-python/sentry_sdk/utils.py", line 1746, in reraise
      raise value
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 123, in _run_old_run_func
      return old_run_func(self, *a, **kw)
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 130, in run
      return _run_old_run_func()
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 125, in _run_old_run_func
      reraise(*_capture_exception())
      ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ivana/dev/sentry-python/sentry_sdk/utils.py", line 1746, in reraise
      raise value
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 123, in _run_old_run_func
      return old_run_func(self, *a, **kw)
  TypeError: Thread.run() takes 1 positional argument but 4 were given

The above is repeated multiple times, each time with a longer stacktrace, and with a higher number of provided arguments in the last message.

Not sure yet if this is anything concerning -- but we should take a look

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions