Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚸 Improve support for Windows (#128)
* Resolve encoding crashes that occur on Windows Windows doesn't consistently use UTF-8 as the default system encoding. Enabling universal newlines causes Python to decode STDOUT using the default system encoding, which may not be UTF-8 compatible. In addition, when pip is executed via `subprocess`, it may crash when attempting to write output. To resolve these issues, Python's UTF-8 mode (available in 3.7+) is enabled via an environment variable, universal newlines are disabled, and STDOUT is read and explicitly decoded as UTF-8. * 👷 Add windows-smoketest job in CI * 👷 Add verbosity to windows-smoketest * 🐛 Disable unicode on Windows for --tree * ✅ Add `pragma: no cover` * ♻️ Use encoding check instead of platform check Allows unicode `--tree` on utf-8 windows boxes: "Changed in version 3.7: Return 'utf-8' if the Python UTF-8 Mode is enabled." https://docs.python.org/3/library/sys.html#sys.getfilesystemencoding * 🚨 Run black * 🐛 Disable unicode --tree for Windows again * 🚨 Remove unused import * 🚨 Run black --------- Co-authored-by: ddelange <[email protected]>
- Loading branch information