Skip to content

Conversation

@ngoldbaum
Copy link
Member

Towards fixing #29293, also see scipy/scipy#23275 where I did this in SciPy.

The only nontrivial changes (IMO, anyway) are in numpy/ma/tests/test_core.py.

Copy link
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, didn't find any larger change that I would worry about. I suspect many would be better as np.errstate, but sometimes that may also be less precise (i.e. doesn't include the function that caused the warning).

The one thing I think, I care about a bit is that it would be nice to use @pytest.mark.filterwarnings() instead of those massive indentations. (Using pytest.warns() as rec would also make the diff smaller in a few places and be nicer).

But, overall nice. And pytest.warns and some other changes improve things quite a bit!

@ngoldbaum ngoldbaum added the 39 - free-threading PRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703) label Jul 7, 2025
@ngoldbaum
Copy link
Member Author

There are some unrelated failures because of cache mismatches reported by apt.

Let's bring this in - thanks for looking this over and the suggestions @seberg!

@ngoldbaum ngoldbaum merged commit fdf5f1b into numpy:main Jul 7, 2025
77 of 82 checks passed
IndifferentArea pushed a commit to IndifferentArea/numpy that referenced this pull request Dec 7, 2025
…mpy#29322)

* MAINT: remove internal uses of assert_warns and suppress_warnings

* MAINT: adjust check for ignore filters in warnings tests

* MAINT: simplify filtering per review comments

* MAINT: fix warnings test

* MAINT: appease linter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

03 - Maintenance 39 - free-threading PRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants