Remote dataset loader leaks a temp file per cache=False fetch
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start at _fetch_from_url and compare its temporary-file handling with the maintainer fix in #1894. Verify that the cache=False fetch path cleans up the temporary dataset file when finished, including after errors, and add or update coverage for repeated non-cached fetches if the surrounding tests provide a location for it.
Written by the indexing model from the issue text.
Description
what happens
the remote dataset loader leaks a full temp file on every cache=False fetch. _fetch_from_url writes the downloaded dataset into a NamedTemporaryFile(delete=False) and then abandons the handle without closing or deleting it, so each non-cached fetch strands a complete copy of the dataset in the temp directory.
this is the same bug class the maintainers already fixed for save_formatted_audio in #1894.
expected
the temp file is cleaned up when the fetch path is done with it (context-managed handle, or explicit close plus unlink in a finally), matching the #1894 fix pattern.
env: main 5503ecb
- Dominant language
- Python
- Stars
- 4.5k
- Forks
- 896
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 208
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/PyRIT
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
Similar issues
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vllm-project/vllm-metal#822 ·
Maintainers usually reply within 1 day
-
vector-store
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
mem0ai/mem0#7461 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: chunk_span_bounds and _validated_chunk_spans reject Pydantic models ChunkSpan and AudioFileOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BasedHardware/omi#19047 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day