summaryrefslogtreecommitdiffstats
path: root/Doc/library/py_compile.rst
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-03-13 16:37:42 (GMT)
committerBrett Cannon <brett@python.org>2013-03-13 16:37:42 (GMT)
commitaa73a1c9c9c149002f98dbf6fdd12eb3d41225ee (patch)
tree6f282d3d40824ece178641322c04b9d304ce7ecf /Doc/library/py_compile.rst
parent3b965a237ce987d9c7e2918acf3ce5c0d068fc9c (diff)
downloadcpython-aa73a1c9c9c149002f98dbf6fdd12eb3d41225ee.zip
cpython-aa73a1c9c9c149002f98dbf6fdd12eb3d41225ee.tar.gz
cpython-aa73a1c9c9c149002f98dbf6fdd12eb3d41225ee.tar.bz2
Issue #17222: Document that py_compile now uses importlib for its file
writing and thus its semantics.
Diffstat (limited to 'Doc/library/py_compile.rst')
-rw-r--r--Doc/library/py_compile.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst
index 07ddc25..0c8c99d 100644
--- a/Doc/library/py_compile.rst
+++ b/Doc/library/py_compile.rst
@@ -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)