From 36434c193146293b7d97b5f4237c09b6303d97f2 Mon Sep 17 00:00:00 2001 From: hai shi Date: Wed, 7 Aug 2019 01:38:50 +0800 Subject: [PATCH 1/3] update doc of compileall --- Doc/library/compileall.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst index bb5000a0736ccc..3ae4029589296d 100644 --- a/Doc/library/compileall.rst +++ b/Doc/library/compileall.rst @@ -120,7 +120,7 @@ runtime. Public functions ---------------- -.. function:: compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalidation_mode=py_compile.PycInvalidationMode.TIMESTAMP) +.. function:: compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalidation_mode=None) Recursively descend the directory tree named by *dir*, compiling all :file:`.py` files along the way. Return a true value if all the files compiled successfully, @@ -188,7 +188,7 @@ Public functions .. versionchanged:: 3.8 Setting *workers* to 0 now chooses the optimal number of cores. -.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=py_compile.PycInvalidationMode.TIMESTAMP) +.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=None) Compile the file with path *fullname*. Return a true value if the file compiled successfully, and a false value otherwise. @@ -232,7 +232,7 @@ Public functions .. versionchanged:: 3.7 The *invalidation_mode* parameter was added. -.. function:: compile_path(skip_curdir=True, maxlevels=0, force=False, quiet=0, legacy=False, optimize=-1, invalidation_mode=py_compile.PycInvalidationMode.TIMESTAMP) +.. function:: compile_path(skip_curdir=True, maxlevels=0, force=False, quiet=0, legacy=False, optimize=-1, invalidation_mode=None) Byte-compile all the :file:`.py` files found along ``sys.path``. Return a true value if all the files compiled successfully, and a false value otherwise. From e190013f8a9104ac477df4d54dbde1416a55f99f Mon Sep 17 00:00:00 2001 From: hai shi Date: Sun, 11 Aug 2019 20:09:45 +0800 Subject: [PATCH 2/3] add versionchanged --- Doc/library/compileall.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst index 3ae4029589296d..3fb0e600ea38a4 100644 --- a/Doc/library/compileall.rst +++ b/Doc/library/compileall.rst @@ -185,6 +185,9 @@ Public functions .. versionchanged:: 3.7 The *invalidation_mode* parameter was added. + .. versionchanged:: 3.7.2 + The *invalidation_mode* parameter's default value is updated to None. + .. versionchanged:: 3.8 Setting *workers* to 0 now chooses the optimal number of cores. @@ -255,6 +258,9 @@ Public functions .. versionchanged:: 3.7 The *invalidation_mode* parameter was added. + .. versionchanged:: 3.7.2 + The *invalidation_mode* parameter's default value is updated to None. + To force a recompile of all the :file:`.py` files in the :file:`Lib/` subdirectory and all its subdirectories:: From c22afa5abe17a8b86df733a53738a3f2b2da0f2d Mon Sep 17 00:00:00 2001 From: hai shi Date: Wed, 14 Aug 2019 23:48:03 +0800 Subject: [PATCH 3/3] update docs of compileall --- Doc/library/compileall.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst index 3fb0e600ea38a4..9ce5ca819c68a1 100644 --- a/Doc/library/compileall.rst +++ b/Doc/library/compileall.rst @@ -235,6 +235,9 @@ Public functions .. versionchanged:: 3.7 The *invalidation_mode* parameter was added. + .. versionchanged:: 3.7.2 + The *invalidation_mode* parameter's default value is updated to None. + .. function:: compile_path(skip_curdir=True, maxlevels=0, force=False, quiet=0, legacy=False, optimize=-1, invalidation_mode=None) Byte-compile all the :file:`.py` files found along ``sys.path``. Return a