Env Variable to Auto-Name and Recognize __pycache__ As .__pycache__
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Feature or enhancement
Proposal:
Introduce a Bash environment variable (PYTHON_PYCACHE_HIDDEN) that, when set, automatically names and recognizes the __pycache__ directory as .__pycache__. This change aims to improve directory cleanliness by making the __pycache__ directory hidden by default, reducing visual clutter in project directories.
The __pycache__ directory, often clutters project directories. While necessary for Python's efficient execution, it can be an eyesore, especially in larger projects. Making this directory hidden by default would: improve directory readability, maintain compiled functionality, and introduce optional visibility.
Bottom line, __pycache__ directory enhances Python's execution efficiency by storing compiled bytecode, but its contents are rarely useful for regular viewing, cluttering project directories unnecessarily.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Contributor guide
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.
Research direction
The issue names no files, tests, or entry points. First locate CPython's handling of pycache directory naming and recognition, then identify how environment variables are processed. Done means an opt-in PYTHON_PYCACHE_HIDDEN setting consistently uses and recognizes .pycache without breaking compiled-bytecode behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100