Skip to content

Resolve the issue of outdated winpty.pyi#551

Merged
andfoy merged 1 commit intoandfoy:mainfrom
XY0797:main
Jan 11, 2026
Merged

Resolve the issue of outdated winpty.pyi#551
andfoy merged 1 commit intoandfoy:mainfrom
XY0797:main

Conversation

@XY0797
Copy link
Contributor

@XY0797 XY0797 commented Dec 31, 2025

The changes made to src/lib.rs on July 5, 2025, caused the interface definitions in winpty.pyi to significantly diverge from the actual implementation.

This PR addresses the mismatch between winpty.pyi and the real interface by:

  1. Adding the missing self parameter to cancel_io().
  2. Removing the non-existent method read_stderr.
  3. Removing the unused length parameter from the read() method.
  4. Removing the non-existent encoding parameter from __init__().
  5. General code cleanup and formatting improvements.

Additionally, this PR fixes minor type-related issues in ptyprocess.py:

  1. Removing the unused import import codecs.
  2. Changing the byte literal b'0011Ignore' to the string '0011Ignore' to prevent a potential TypeError: encoding without a string argument.

@XY0797
Copy link
Contributor Author

XY0797 commented Jan 11, 2026

@andfoy

@andfoy andfoy merged commit 3f60d16 into andfoy:main Jan 11, 2026
8 checks passed
@andfoy andfoy added this to the v3.0.3 milestone Feb 4, 2026
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