Skip to content

Conversation

@vcfgv
Copy link
Collaborator

@vcfgv vcfgv commented Dec 2, 2025

📝 Pull Request Template

1. Related Issue

Closes # (issue number)

2. Type of Change (select one)

Bug Fix

3. Description

PyCharm's debugger replaces sys.stdin with a custom wrapper (pydevd / pydev_stdin) to capture console input. That wrapper calls debugger internals that rely on thread-local state. When a background thread (such as stdin-control thread) iterates sys.stdin, the debugger helper checks a thread-local attribute (e.g. is_lock_acquired) that only exists for the debugger's main thread. In other threads the attribute is missing, causing AttributeError: '_thread._local' object has no attribute 'is_lock_acquired'.

4. Testing

  • I have tested this locally.
  • I have updated or added relevant tests.

5. Checklist

@su8su su8su merged commit 2d65790 into main Dec 2, 2025
3 checks passed
@su8su su8su deleted the bugfix/disable-control-thread-for-local-dev-env branch December 2, 2025 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants