New submission from July Tikhonov <july.t...@gmail.com>: 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. ---------- components: Library (Lib) files: compileall.compile_dir.optimize.test.diff keywords: patch messages: 128048 nosy: july priority: normal severity: normal status: open title: compileall.compile_dir loses 'optimize' parameter in recursion. type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file20696/compileall.compile_dir.optimize.test.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11132> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com