In core/__init__.py two environment variables, 'OPENBLAS_MAIN_FREE' and 'GOTOBLAS_MAIN_FREE', are temporary set for importing the multiarray numpy extension module. But if the importing is failed the environment is not restored.
This affects CPython tests (https://bugs.python.org/issue31792).
Moving the code that restores the environment into the finally block would fix this issue.
In
core/__init__.pytwo environment variables,'OPENBLAS_MAIN_FREE'and'GOTOBLAS_MAIN_FREE', are temporary set for importing the multiarray numpy extension module. But if the importing is failed the environment is not restored.This affects CPython tests (https://bugs.python.org/issue31792).
Moving the code that restores the environment into the
finallyblock would fix this issue.