Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
Bug report
argparse tries to write to stderr inconditionally, even when it'sNone. This is only a problem on Windows. Here:
https://github.com/python/cpython/blob/3.11/Lib/argparse.py#L2596-L2600
I detected this when usingPyInstaller to create a binary on Windows using--noconsole, which triggers usingpythonw.exe. In this case,sys.stderr is None.
This is similar to#89057
Your environment
- Any version of Python on Windows, up to 3.11
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status
Doc issues