This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [PEP 3147] compileall.compile_dir() called multiple times creates empty __pycache__/__pycache__ subdirectories
Type: Stage:
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: barry Nosy List: Arfrever, barry
Priority: normal Keywords: patch

Created on 2010-04-25 01:33 by Arfrever, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
compileall.patch Arfrever, 2010-04-25 01:33 Patch for compileall.compile_dir()
Messages (3)
msg104139 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2010-04-25 01:33
compileall.compile_dir() called multiple times creates empty __pycache__/__pycache__ subdirectories. I'm attaching the patch.

$ mkdir test
$ touch test/__init__.py
$ python3.2 -c 'import compileall; compileall.compile_dir("test")'
Listing test ...
Compiling test/__init__.py ...
$ tree test
test
├── __init__.py
└── __pycache__
    └── __init__.cpython-32.pyc

1 directory, 2 files
$ python3.2 -c 'import compileall; compileall.compile_dir("test")'
Listing test ...
Listing test/__pycache__ ...
$ tree test
test
├── __init__.py
└── __pycache__
    ├── __init__.cpython-32.pyc
    └── __pycache__

2 directories, 2 files
msg104245 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2010-04-26 16:01
Thanks for the patch!  I added a test and committed your patch in r80497.
msg104246 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2010-04-26 16:01
er, make that r80501
History
Date User Action Args
2022-04-11 14:57:00adminsetgithub: 52773
2010-04-26 16:01:46barrysetmessages: + msg104246
2010-04-26 16:01:11barrysetstatus: open -> closed
resolution: fixed
messages: + msg104245
2010-04-25 01:43:19benjamin.petersonsetassignee: barry
2010-04-25 01:33:54Arfrevercreate