uabrc / uabrc/uabrc.github.io

Another software writing to `tmp`, potentially.

Open
#1,098 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

style: article/section 📝 system: cheaha 🖧
Dominant language
Python
Stars
24
Forks
15
Avg merge
10d 3h
Merged PRs (30d)
1

Description

Python software using tempfile built-in module.

When using tempfile, all but one function select the temporary directory to write files using the following process. If any step fails, try the next step.

  1. Try the value of tempfile.tempdir (set/get from within Python code) if not None.
  2. Try the value of $TMPDIR.
  3. Try the value of $TEMP.
  4. Try the value of $TMP.
  5. Try /tmp/.
  6. Try /var/tmp/.
  7. Try /usr/tmp/.
  8. Try the current working directory.

Bazel

Extension bazel_contrib.rules_python follows the Python rules above.

What To Do

Leave $TMPDIR alone and don't try to change any environment variables, and Python should work in the correct way.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

No file or test is named. Locate the documentation describing temporary-directory behavior, then compare its guidance with Python's tempfile search order and the stated Bazel behavior. Done means the documentation clearly tells readers to leave $TMPDIR and other environment variables unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.