You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve subprocess text handling and type safety (#485)
- BREAKING: Switch run() to use text=True by default for subprocess commands
- Now uses unicode instead of bytes for subprocess commands
- Removes console_to_str() helper function and related encoding logic
- Removes universal_newlines and text parameters from run()
- Improve type safety:
- Replace StrOrBytesPath with StrPath for better type consistency
- Fix args type handling in CommandError to properly handle string vs sequence inputs
- Add proper None checks for stdout/stderr handling
- Update type hints in subprocess.py for text parameter
- Code cleanup:
- Simplify output handling logic
- Remove redundant string conversions
- Improve error message formatting
Note: This is a breaking change. Users experiencing compatibility issues
should file a ticket.
0 commit comments