-
Notifications
You must be signed in to change notification settings - Fork 42
TST: Catch ResourceWarning under bad combo #307
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?