Skip to content
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

Fix all warnings from running with PYTHONDEVMODE #974

Open
luizirber opened this issue Apr 30, 2020 · 1 comment
Open

Fix all warnings from running with PYTHONDEVMODE #974

luizirber opened this issue Apr 30, 2020 · 1 comment

Comments

@luizirber
Copy link
Member

The Python 3.8 job in Travis runs with PYTHONDEVMODE enabled. This returns a lot of warnings at the moment, so fixing them might be a good idea =]

Example: https://travis-ci.com/github/dib-lab/sourmash/jobs/325347193#L1127

Can also be run locally with PYTHONDEVMODE=1 make test

@luizirber
Copy link
Member Author

luizirber commented Nov 23, 2023

281 warnings running PYTHONDEVMODE=1 tox -e py39 on 14cb276, log: https://github.com/sourmash-bio/sourmash/actions/runs/6963828432/job/18950065924#step:12:77

luizirber added a commit that referenced this issue Nov 25, 2023
Address
#974 (comment),
down from 281 warnings to 24 after
dib-lab/screed#106 is merged and a new `screed`
version is available.

Most warnings were `ResourceWarnings` for unclosed files in tests, but
there were a couple in `src/sourmash` too. Preferred to use a context
manager with `screed.open` or when passing the file to another library
(like `numpy`), but for tests changed a lot of code to use
`Path(...).read_text().splitlines()` instead.

The remaining 24 warnings are due to duplicate files in `ZipStorage`,
punting it for later because they will require more attention when
modifying `src/sourmash/sbt_storage.py`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant