pypi / pywinpty
pywinpty
What changed in pywinpty 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-29.
8 breaking1 new APIs and options2 performance3 tooling8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpywinpty 317 changes
Breaking changes 5
PTY.iseof() now returns True once output is drained. Read loops that relied on it always returning False may behave differently and may need their condition inverted.
PTY.write() no longer returns 0 for payloads the child received in full.
Python 3.13t wheels are no longer built because PyO3 dropped support for that experimental version.
The supported Python requirement is now >=3.10; Python 3.9 is no longer supported.
read no longer accepts num_bytes and returns all available bytes in the stream, delegating buffering to downstream consumers.
New APIs and options 1
pywinpty supports async compatibility on ConPTY through the latest winpty-rs release.
Performance 1
Reading from a pseudoterminal now takes tenths of microseconds rather than 100ms as previously.
Tooling 3
Wheels are now built for Python 3.15 and 3.15t on Windows x64 and ARM64.
ARM64 wheel publishing is introduced, making pywinpty wheels available for ARM64.
The outdated winpty.pyi issue is resolved, so the package's type stub is no longer outdated.
Fixes and other changes 7
Closing a PTY no longer waits a fixed five seconds; a blocking read after child exit returns in about 175 ms, and teardown no longer cancels I/O owned by the host application.
Spawning an executable whose path contains a space now works across both backends, with argv[0] intact.
Large output is no longer truncated after the child exits; output drains in full and reaches EOF.
Closing a PTY no longer hangs or leaves the child process orphaned due to a teardown deadlock against ConPTY 1.25.
Arguments passed to the WinPTY backend are no longer lost.
The published wheels now include the required native binaries, making the x64 and arm64 releases usable.
Event-driven teardown fixes data loss when a child exits quickly and removes the Drop CPU-spin.
pywinpty 25 changes
Breaking changes 3
C++ dependencies were dropped as the PTY implementation moved to winpty-rs, simplifying dependencies and the building environment.
PTY no longer accepts the encoding keyword argument.
PtyProcess no longer accepts the encoding keyword argument.
Performance 1
The reading thread is now blocking and no longer consumes CPU unnecessarily.
Fixes and other changes 1
The backend argument now works on PtyProcess.