Skip to content

Conversation

@pllim
Copy link
Contributor

@pllim pllim commented Oct 29, 2025

Works around #305 , reverts #307

@pllim pllim marked this pull request as ready for review October 29, 2025 01:19
@pllim
Copy link
Contributor Author

pllim commented Oct 29, 2025

So this would work around the whole problem by ignoring ResourceWarning for everything. Is this too hacky? If not, I can clean up the commits. Please let me know!

@pllim pllim requested a review from bsipocz October 29, 2025 01:20
setup.cfg Outdated
# For pytest-asyncio deprecations that is expected to be resolved upstream
# https://github.com/pytest-dev/pytest-asyncio/issues/924
ignore:The configuration option "asyncio_default_fixture_loop_scope":pytest.PytestDeprecationWarning
# Windows + Python 3.14 + pytest-dev have ResourceWarning, see
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we can add conditionals for this ignore and do it only for windows (and maybe for new versions)? I recall that I added that hackery to the config files before, but will need to dig a little bit to find which package it was.

@bsipocz
Copy link
Member

bsipocz commented Oct 29, 2025

OK, so it was surprising easy to dig this up, but I have this hackery for astroquery to add a windows specific filterwarning. This may or may not work for a pytest plugin though, but also, if we are confident that this is only an issue in our test suite and not with the plugin itself than this PR should be good enough as is already.

https://github.com/astropy/astroquery/blob/main/conftest.py#L66

pllim and others added 2 commits October 29, 2025 10:34
and globally ignore ResourceWarning

TST: Revert scientific-python#307
Co-authored-by: Brigitta Sipőcz <bsipocz@gmail.com>
@pllim pllim force-pushed the fix-win-py314-pt2 branch from 3852968 to f75b7c2 Compare October 29, 2025 14:41
@pllim
Copy link
Contributor Author

pllim commented Oct 29, 2025

Re: #308 (comment)

Thanks, @bsipocz ! That is a really neat trick. But why is it not working here? Did I do it wrong?

@bsipocz
Copy link
Member

bsipocz commented Nov 1, 2025

Hmm, weird. Maybe it's not picking up the conftest file? I recall there were reasons we put it at the top level in astroquery.

@pllim pllim closed this Nov 1, 2025
@pllim pllim deleted the fix-win-py314-pt2 branch November 1, 2025 01:35
@pllim
Copy link
Contributor Author

pllim commented Nov 1, 2025

Argh I accidentally deleted the branch instead of force pushing and messed up this PR. I will open another one (#310).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants