Skip to content

BUG: cfuncs.py: fix crash when sys.stderr is not available#27021

Merged
charris merged 1 commit into
numpy:maintenance/2.0.xfrom
charris:backportl-27013
Jul 24, 2024
Merged

BUG: cfuncs.py: fix crash when sys.stderr is not available#27021
charris merged 1 commit into
numpy:maintenance/2.0.xfrom
charris:backportl-27013

Conversation

@charris

@charris charris commented Jul 24, 2024

Copy link
Copy Markdown
Member

Backport of #27013.

In some environments (for example frozen executables created with PyInstaller for GUI applications) sys.stderr and sys.stdout might be None.

The import-time access to sys.stderr.write in some f2py modules was causing such applications to crash during startup.

Fix #26862

In some environments (for example frozen executables created with PyInstaller for GUI applications) `sys.stderr` and `sys.stdout` might be `None`.

The import-time access to `sys.stderr.write` in some `f2py` modules was causing such applications to crash during startup.

Fix numpy#26862
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Jul 24, 2024
@charris charris added this to the 2.0.2 release milestone Jul 24, 2024
@charris charris merged commit bdf54c7 into numpy:maintenance/2.0.x Jul 24, 2024
@charris charris deleted the backportl-27013 branch July 24, 2024 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants