Skip to content

Importing numpy alters the execution environment #9861

@serhiy-storchaka

Description

@serhiy-storchaka

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions