Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Retirement roadmap for pytest-openfiles #44

Merged
merged 3 commits into from
Feb 17, 2023

Conversation

pllim
Copy link
Member

@pllim pllim commented Jan 25, 2023

@pllim
Copy link
Member Author

pllim commented Jan 25, 2023

I added this to the proposed agenda for infrastructure tag-up.

@astrofrog
Copy link
Member

Could you add details about what to use instead?

@pllim
Copy link
Member Author

pllim commented Jan 25, 2023

README.rst Outdated
Comment on lines 25 to 26
See https://docs.astropy.org/en/latest/development/testguide.html#testing-for-open-files
on how to test for open files without this package.
Copy link
Contributor

@jdavies-st jdavies-st Jan 26, 2023

Choose a reason for hiding this comment

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

I think it would be good to have an example here in this repo that is concrete. I.e.:

For open file testing, use Python's built in warning-to-error handling switch -W. Pytest invocations support this as well. To capture all open file ResourceWarnings:

pytest -W error::ResourceWarning

or set it up in your setup.cfg:

[tool:pytest]
filterwarnings =
    error::ResourceWarning

For more detail on -W, see https://docs.python.org/3/using/cmdline.html#cmdoption-W

Or something similar.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK done. Thanks for the suggestion!

Co-authored-by: James Davies <jdavies@stsci.edu>
@bsipocz
Copy link
Member

bsipocz commented Jan 26, 2023

This needs to be removed from the install list of pytest-astropy, too

@pllim
Copy link
Member Author

pllim commented Jan 26, 2023

This needs to be removed from the install list of pytest-astropy, too

@bsipocz , good point! When would be a good time to do that? I have opened astropy/pytest-astropy#51

@bsipocz
Copy link
Member

bsipocz commented Jan 26, 2023

This needs to be removed from the install list of pytest-astropy, too

@bsipocz , good point! When would be a good time to do that? I have opened astropy/pytest-astropy#51

I think the order of things should be:

1a) remove usage. It's already done for core, but maybe do the good old batch-issue for affiliated packages (or at least for the subset of them that use pytest-astropy). Maybe even open issues for any packages that do pytest --open-files? There are many out there, outside of astronomy who use these plugins (hopefully not open-files).
1b) remove it from pytest-astropy. Can be done asap, but need to communicate it wider than the astropy slack and mailing list.
2) wait
3) archive this repo

@pllim
Copy link
Member Author

pllim commented Jan 26, 2023

Re: batch issue -- Great idea! Though maybe want to wait until this is merged first.

Copy link
Member

@astrofrog astrofrog left a comment

Choose a reason for hiding this comment

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

This is good to go!

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

Successfully merging this pull request may close these issues.

4 participants