[Python-checkins] cpython: Issue #17222: Document that py_compile now uses importlib for its file

brett.cannon python-checkins at python.org
Wed Mar 13 17:38:26 CET 2013


http://hg.python.org/cpython/rev/55806d234653
changeset: 82642:55806d234653
user: Brett Cannon <brett at python.org>
date: Wed Mar 13 09:37:42 2013 -0700
summary:
 Issue #17222: Document that py_compile now uses importlib for its file
writing and thus its semantics.
files:
 Doc/library/py_compile.rst | 7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst
--- a/Doc/library/py_compile.rst
+++ b/Doc/library/py_compile.rst
@@ -28,7 +28,7 @@
 
 .. 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 @@
 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)
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /