TST: Catch ResourceWarning under bad combo#307
TST: Catch ResourceWarning under bad combo#307bsipocz merged 4 commits intoscientific-python:mainfrom
Conversation
because it mutated
|
Sorry for the messy commits. Just faster to edit on GH as I am working on different things at once. Would be nice if we have the "squash and merge" button here. If not, I can squash manually later when I have time. Thanks for your patience. |
bsipocz
left a comment
There was a problem hiding this comment.
OK, this is fine for now. Hopefully it will ring a bell if we start seeing anything similar in library CI, too.
| if os.name == "nt" and python_version() == "3.14.0" and not PYTEST_LT_8_5: | ||
| with warnings.catch_warnings(): | ||
| # ResourceWarning unclosed file pytest.EXE --> PytestUnraisableExceptionWarning | ||
| warnings.filterwarnings("ignore") |
There was a problem hiding this comment.
this may be a bit too wide, but there are so many conditions it needs to catch that I don't mind it much.
There was a problem hiding this comment.
I tried to catch ResourceWarning specifically but it didn't work. Catching PytestUnraisableExceptionWarning is a little meaningless.
|
squash merge button messes with my release scripts, so would prefer a rebase, but also no big deal to have the commits in the history, so I will just go ahead and merge it as is. Thanks! |
[ci skip]
and globally ignore ResourceWarning TST: Revert scientific-python#307
and globally ignore ResourceWarning TST: Revert scientific-python#307
Close #305
I think this is okay for now? Looks like the problem is somewhere in between Python 3.14 and pytest. Not sure how to debug. The conditions are specific enough that it won't accidentally ignore other stuff, I hope. Who knows, might magically fixed in Python 3.14.1 if it is Python. Or we can also open reminder issue to revisit in the future. What do you think?