Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Remote dataset loader leaks a temp file per cache=False fetch

Open Beginner friendly
#2,841 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
data

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/PyRIT

All issues in microsoft/PyRIT

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.