Skip to content

Extract Python session I/O modules#124

Merged
t-kalinowski merged 1 commit into
mainfrom
extract-python-session-io
Jun 18, 2026
Merged

Extract Python session I/O modules#124
t-kalinowski merged 1 commit into
mainfrom
extract-python-session-io

Conversation

@t-kalinowski

Copy link
Copy Markdown
Member

Summary

Extract the remaining Python session stdin/readline and runtime stdio code into focused modules so python_session.rs is centered on session lifecycle, CPython embedding, callback registration, and the public facade.

User-facing changes

No intended behavior changes. The Python backend stdin/readline behavior, raw stdin reads, interrupt handling, prompt visibility, prompt completion, plot gating, callback registration, and IPC messages are preserved.

Internal changes

  • Add python_session/state.rs for shared session state, prompt helpers, stdin read accounting, raw stdin errors, and the Unix prompt-wait unit tests.
  • Add python_session/windows_stdin.rs for Windows turn input queuing, raw turn input, stdin pipe draining, pending-byte checks, and interrupt turn handling.
  • Add python_session/stdio.rs for Python runtime C stdio setup, PTY stdio setup, C line reads, and Python thread release while blocking on stdin.
  • Update python_session/unix_stdin.rs to import shared state and stdio helpers from the new modules.

@t-kalinowski t-kalinowski marked this pull request as ready for review June 18, 2026 21:53
@t-kalinowski t-kalinowski merged commit 9c7d25c into main Jun 18, 2026
5 checks passed
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.

1 participant