Message128048
july@julynote:~/test> ls -R
.:
c.py subdir
./subdir:
a.py b.py
july@julynote:~/test> python3
Python 3.2rc2+ (py3k, Feb 6 2011, 13:06:04)
[GCC 4.5.0 20100604 [gcc-4_5-branch revision 160292]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from compileall import compile_dir
>>> compile_dir('.', optimize=1)
Listing . ...
Compiling ./c.py ...
Listing ./subdir ...
Compiling ./subdir/a.py ...
Compiling ./subdir/b.py ...
1
>>>
july@julynote:~/test> ls -R
.:
c.py __pycache__ subdir
./__pycache__:
c.cpython-32.pyo
./subdir:
a.py b.py __pycache__
./subdir/__pycache__:
a.cpython-32.pyc b.cpython-32.pyc
july@julynote:~/test>
It seems that the bug was introduced in svn revision 87019 (Add an "optimize" parameter to compile() to control the optimization level, and provide an interface to it in py_compile, compileall and PyZipFile.).
In recursion, 'optimize' parameter is lost and replaced by default -1 (optimize level of the interpreter).
Test patch added. |
|
Date |
User |
Action |
Args |
2011-02-06 11:03:22 | july | set | recipients:
+ july |
2011-02-06 11:03:22 | july | set | messageid: <1296990202.6.0.306196036221.issue11132@psf.upfronthosting.co.za> |
2011-02-06 11:03:22 | july | link | issue11132 messages |
2011-02-06 11:03:21 | july | create | |
|