Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loader/bootstrap: remove NullWriter from Windows noconsole mode #7217

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

rokm
Copy link
Member

@rokm rokm commented Nov 3, 2022

In windowed/noconsole mode, stop setting sys.stdout and sys.stderr to custom NullWriter object, and instead leave them at None.

This matches the behavior of windowed python interpreter (pythonw.exe) and prevents interoperability issues with code that (rightfully) expects the streams to be either None or objects that are fully compatible with io.IOBase.

Closes #3503.

In `windowed`/`noconsole` mode, stop setting `sys.stdout` and
`sys.stderr` to custom `NullWriter` object, and instead leave
them at `None`.

This matches the behavior of windowed python interpreter
(`pythonw.exe`) and prevents interoperability issues with code
that (rightfully) expects the streams to be either `None` or
objects that are fully compatible with `io.IOBase`.
@rokm rokm merged commit 89c120e into pyinstaller:develop Nov 7, 2022
@rokm rokm deleted the remove-nullwriter branch November 7, 2022 19:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NullWriter has no attribute 'closed'
2 participants