Skip to content

BUG: Fix environment checking logic for NUMPY_WARN_IF_NO_MEM_POLICY #20238

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

Merged
merged 2 commits into from
Oct 31, 2021

Conversation

seberg
Copy link
Member

@seberg seberg commented Oct 29, 2021

The logic was reversed accidentally, since the default is to not warn.

I would be happy to dig a bit deeper and move the getenv to import
time (with an small internal helper to set it). Since the getenv
right now will be called for quite a bit of pythran code currently.


I have a bit of a problem with these tests locally (but I am not sure it is specific to these test, had simlar problems elsehwere). Somehow the wrong numpy headers get picked up, even though the current include is passed... (so this is untested locally)
Tested locally, the test is a bit "unreliably" because it just prints out when the error is raised, but overall that is fine. My issue with the test locally, is due to debian linking the NumPy includes to: /usr/include/python3.9/numpy which probably gets picked up (I guess that is wrong in debian, and I opened a bug-report there).

Edit: Fixup for gh-20200

The logic was reversed accidentally, since the default is to not warn.

I would be happy to dig a bit deeper and move the `getenv` to import
time (with an small internal helper to set it).  Since the `getenv`
right now will be called for quite a bit of pythran code currently.
@seberg
Copy link
Member Author

seberg commented Oct 30, 2021

Hmm, unclear. The test seems to fail on windows, do the env variables work differently? EDIT: Oh, I guess on PyPy, opst.

@charris
Copy link
Member

charris commented Oct 30, 2021

Strange error on pypy that is probably unrelated. Retrying.

@charris
Copy link
Member

charris commented Oct 30, 2021

Repeatable error on PyPy.

Co-authored-by: Matti Picus <matti.picus@gmail.com>
@charris charris merged commit 07447fd into numpy:main Oct 31, 2021
@charris
Copy link
Member

charris commented Oct 31, 2021

Thanks Sebastian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants