diff options
author | Brett Cannon <brett@python.org> | 2015-04-13 18:21:02 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2015-04-13 18:21:02 (GMT) |
commit | f299abdafa0f2b6eb7abae274861b19b361c96bc (patch) | |
tree | afc3a2bf560e30c7725510eda3b57d71ceddba00 /Doc/library/compileall.rst | |
parent | a63cc212348e276c8ede32773313c60ff7fda651 (diff) | |
download | cpython-f299abdafa0f2b6eb7abae274861b19b361c96bc.zip cpython-f299abdafa0f2b6eb7abae274861b19b361c96bc.tar.gz cpython-f299abdafa0f2b6eb7abae274861b19b361c96bc.tar.bz2 |
Issue #23731: Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
Diffstat (limited to 'Doc/library/compileall.rst')
-rw-r--r-- | Doc/library/compileall.rst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst index 430362e..57f4804 100644 --- a/Doc/library/compileall.rst +++ b/Doc/library/compileall.rst @@ -93,6 +93,10 @@ compile Python sources. .. versionchanged:: 3.5 ``-q`` option was changed to a multilevel value. +.. versionchanged:: 3.5 + ``-b`` will always produce a byte-code file ending in ``.pyc``, never + ``.pyo``. + There is no command-line option to control the optimization level used by the :func:`compile` function, because the Python interpreter itself already @@ -150,6 +154,10 @@ Public functions .. versionchanged:: 3.5 *quiet* parameter was changed to a multilevel value. + .. versionchanged:: 3.5 + The *legacy* parameter only writes out ``.pyc`` files, not ``.pyo`` files + no matter what the value of *optimize* is. + .. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1) Compile the file with path *fullname*. @@ -182,6 +190,10 @@ Public functions .. versionchanged:: 3.5 *quiet* parameter was changed to a multilevel value. + .. versionchanged:: 3.5 + The *legacy* parameter only writes out ``.pyc`` files, not ``.pyo`` files + no matter what the value of *optimize* is. + .. function:: compile_path(skip_curdir=True, maxlevels=0, force=False, quiet=0, legacy=False, optimize=-1) Byte-compile all the :file:`.py` files found along ``sys.path``. If @@ -196,6 +208,10 @@ Public functions .. versionchanged:: 3.5 *quiet* parameter was changed to a multilevel value. + .. versionchanged:: 3.5 + The *legacy* parameter only writes out ``.pyc`` files, not ``.pyo`` files + no matter what the value of *optimize* is. + To force a recompile of all the :file:`.py` files in the :file:`Lib/` subdirectory and all its subdirectories:: |