Skip to content

Incompatibility: logtail 0.3.4 with Python 3.14.4 – RuntimeError in flusher.py (is_alive) #38

@simone-mezzadri

Description

@simone-mezzadri

DESCFRIPTION:
With Python 3.14.4, the logtail 0.3.4 library throws a RuntimeError in flusher.py, method _is_parent_alive, when calling self.parent_thread.is_alive().
This happens because, starting from Python 3.14, calling is_alive() on an already terminated thread raises a RuntimeError, while in previous versions it simply returned False.

STACKTRACE:
File "logtail/flusher.py", line XX, in _is_parent_alive
return self.parent_thread.is_alive()
RuntimeError: cannot join current thread

TEMPORARY WORKAROUND:
I fixed it locally by handling the exception with a try/except block that returns False in case of RuntimeError (as already present in the source code, but it seems not to cover all cases).

STEP TO REPRODUCE ISSUE:

  1. Install logtail 0.3.4 on Python 3.14.4
  2. Send a log using LogtailHandler
  3. Terminate the process or wait for the thread to close
  4. The above exception occurs

SUGGESTION:
Update the thread management to be compatible with Python 3.14.x

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions