]> granicus.if.org Git - python/commitdiff
Issue #17222: Document that py_compile now uses importlib for its file
authorBrett Cannon <brett@python.org>
Wed, 13 Mar 2013 16:37:42 +0000 (09:37 -0700)
committerBrett Cannon <brett@python.org>
Wed, 13 Mar 2013 16:37:42 +0000 (09:37 -0700)
writing and thus its semantics.

Doc/library/py_compile.rst

index 07ddc25422c6bca0fd156bf9b66db4de10021dfa..0c8c99d3bfd6a8285b54dafbcc8e03e38a46892e 100644 (file)
@@ -28,7 +28,7 @@ byte-code cache files in the directory containing the source code.
 
 .. function:: compile(file, cfile=None, dfile=None, doraise=False, optimize=-1)
 
-   Compile a source file to byte-code and write out the byte-code cache  file.
+   Compile a source file to byte-code and write out the byte-code cache file.
    The source code is loaded from the file name *file*.  The  byte-code is
    written to *cfile*, which defaults to the :PEP:`3147` path, ending in
    ``.pyc`` (``.pyo`` if optimization is enabled in the current interpreter).
@@ -50,6 +50,11 @@ byte-code cache files in the directory containing the source code.
       default was *file* + ``'c'`` (``'o'`` if optimization was enabled).
       Also added the *optimize* parameter.
 
+   .. versionchanged:: 3.4
+      Changed code to use :mod:`importlib` for the byte-code cache file writing.
+      This means file creation/writing semantics now match what :mod:`importlib`
+      does, e.g. permissions, write-and-move semantics, etc.
+
 
 .. function:: main(args=None)