summaryrefslogtreecommitdiffstats
path: root/Doc/library/compileall.rst
Commit message (Collapse)AuthorAgeFilesLines
* bpo-39769: Fix compileall ddir for subpkgs. (GH-18676)Gregory P. Smith2020-02-291-2/+2
| | | | | | | | | | Fix compileall.compile_dir() ddir= behavior on sub-packages. Fixes compileall.compile_dir's ddir parameter and compileall command line flag `-d` to no longer write the wrong pathname to the generated pyc file for submodules beneath the root of the directory tree being compiled. This fixes a regression introduced with Python 3.5. Also marks the _new_ in 3.9 from PR #16012 parameters to compile_dir as keyword only (as that is the only way they will be used) and fixes an omission of them in one place from the docs.
* bpo-38112: Compileall improvements (GH-16012)Lumír 'Frenzy' Balhar2019-09-261-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Raise the limit of maximum path depth to actual recursion limit * Add posibilities to adjust a path compiled in .pyc file. Now, you can: - Strip a part of path from a beggining of path into compiled file example "-s /test /test/build/real/test.py" → "build/real/test.py" - Append some new path to a beggining of path into compiled file example "-p /boo real/test.py" → "/boo/real/test.py" You can also use both options in the same time. In that case, striping is done before appending. * Add a possibility to specify multiple optimization levels Each optimization level then leads to separated compiled file. Use `action='append'` instead of `nargs='+'` for the -o option. Instead of `-o 0 1 2`, specify `-o 0 -o 1 -o 2`. It's more to type, but much more explicit. * Add a symlinks limitation feature This feature allows us to limit byte-compilation of symbolic links if they are pointing outside specified dir (build root for example).
* bpo-37775: Update compileall doc for invalidation_mode parameter (GH-15148)Hai Shi2019-08-141-3/+12
|
* bpo-36786: Run compileall in parallel during "make install" (GH-13078)Antoine Pitrou2019-05-151-1/+5
|
* Doc: Use `option` word for command line interface. (GH-12142)NAKAMURA Osamu2019-03-051-1/+1
| | | For command line option, `option` is better than `parameter`.
* bpo-34022: Stop forcing of hash-based invalidation with SOURCE_DATE_EPOCH ↵Elvis Pranskevichus2018-10-101-4/+7
| | | | | | | | | | | | | | | | | | | | (GH-9607) Unconditional forcing of ``CHECKED_HASH`` invalidation was introduced in 3.7.0 in bpo-29708. The change is bad, as it unconditionally overrides *invalidation_mode*, even if it was passed as an explicit argument to ``py_compile.compile()`` or ``compileall``. An environment variable should *never* override an explicit argument to a library function. That change leads to multiple test failures if the ``SOURCE_DATE_EPOCH`` environment variable is set. This changes ``py_compile.compile()`` to only look at ``SOURCE_DATE_EPOCH`` if no explicit *invalidation_mode* was specified. I also made various relevant tests run with explicit control over the value of ``SOURCE_DATE_EPOCH``. While looking at this, I noticed that ``zipimport`` does not work with hash-based .pycs _at all_, though I left the fixes for subsequent commits.
* bpo-33499: Add PYTHONPYCACHEPREFIX env var for alt bytecode cache location. ↵Carl Meyer2018-06-161-0/+5
| | | | | | | | | | | | | | | (GH-6834) In some development setups it is inconvenient or impossible to write bytecode caches to the code tree, but the bytecode caches are still useful. The PYTHONPYCACHEPREFIX environment variable allows specifying an alternate location for cached bytecode files, within which a directory tree mirroring the code tree will be created. This cache tree is then used (for both reading and writing) instead of the local `__pycache__` subdirectory within each source directory. Exposed at runtime as sys.pycache_prefix (defaulting to None), and can be set from the CLI as "-X pycache_prefix=path". Patch by Carl Meyer.
* closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575)Benjamin Peterson2017-12-091-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | Python now supports checking bytecode cache up-to-dateness with a hash of the source contents rather than volatile source metadata. See the PEP for details. While a fairly straightforward idea, quite a lot of code had to be modified due to the pervasiveness of pyc implementation details in the codebase. Changes in this commit include: - The core changes to importlib to understand how to read, validate, and regenerate hash-based pycs. - Support for generating hash-based pycs in py_compile and compileall. - Modifications to our siphash implementation to support passing a custom key. We then expose it to importlib through _imp. - Updates to all places in the interpreter, standard library, and tests that manually generate or parse pyc files to grok the new format. - Support in the interpreter command line code for long options like --check-hash-based-pycs. - Tests and documentation for all of the above.
* Issue #28226: compileall now supports pathlibBerker Peksag2016-09-301-0/+6
|
* Merge Issue #22558.Terry Jan Reedy2016-06-111-1/+0
|\
| * Issue #22558: Add remaining doc links to source code for Python-coded modules.Terry Jan Reedy2016-06-111-1/+0
| | | | | | | | | | Reformat header above separator line (added if missing) to a common format. Patch by Yoni Lavi.
* | Issue #25768: Make compileall functions return booleans and documentBrett Cannon2015-12-271-4/+8
|/ | | | | | the return values as well as test them. Thanks to Nicholas Chammas for the bug report and initial patch.
* Fixed a typo in the -b option.Serhiy Storchaka2015-09-131-1/+1
|
* docs.compileall: Fix markup (rendering was off, noticed by Berker Peksag)Yury Selivanov2015-09-091-6/+3
|
* whatsnew/3.5: Fix library news till Py3.5a1. Update other docs.Yury Selivanov2015-09-091-7/+5
|
* Issue #23917: Fall back to sequential compilation when ProcessPoolExecutor ↵Berker Peksag2015-04-221-2/+2
| | | | | | doesn't exist. Patch by Claudiu Popa.
* Issue #23731: Implement PEP 488.Brett Cannon2015-04-131-0/+16
| | | | | | 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.
* Issue #21338: Add silent mode for compileall.Berker Peksag2014-10-151-8/+20
| | | | | | | | | quiet parameters of compile_{dir, file, path} functions now have a multilevel value. Also, -q option of the CLI now have a multilevel value. Patch by Thomas Kluyver.
* merge with 3.4Georg Brandl2014-10-021-0/+4
|\
| * closes #22528: add source links to symtable and compileallGeorg Brandl2014-10-021-0/+4
| |
* | Issue #16104: Allow compileall to do parallel bytecode compilation.Brett Cannon2014-09-121-2/+17
| | | | | | | | | | | | | | Both compileall.compile_dir() and the CLI for compileall now allow for specifying how many workers to use (or 0 to use all CPUs). Thanks to Claudiu Popa for the patch.
* | allow recursion depth to be specified (closes #19628)Benjamin Peterson2014-08-191-0/+11
|/ | | | Patch from Claudiu Popa.
* Fix option description that is a warning in new Sphinx versions.Georg Brandl2014-03-181-1/+2
|
* Fix example ignoring ".svn" directories in compileall.Georg Brandl2013-04-141-1/+1
|
* #10553: Explain why compileall has no command-line argument to control ↵Éric Araujo2011-03-261-0/+3
| | | | optimization
* Fix argument name typo in compileall docs.R. David Murray2011-02-111-1/+1
|
* #10454: clarify the compileall docs and help messages.R. David Murray2010-12-171-32/+63
|
* Add missing docs and directives related to PEP 3147 and byte-compilationÉric Araujo2010-12-161-4/+26
|
* Add versionadded directive missing from r78983.Éric Araujo2010-12-161-0/+3
|
* Add an "optimize" parameter to compile() to control the optimization level, ↵Georg Brandl2010-12-041-5/+14
| | | | and provide an interface to it in py_compile, compileall and PyZipFile.
* Fix usage of :option: in the docs (#9312).Éric Araujo2010-11-181-11/+47
| | | | | | | | | | | | | | | | | :option: is used to create a link to an option of python, not to mark up any instance of any arbitrary command-line option. These were changed to ````. For modules which do have a command-line interface, lists of options have been properly marked up with the program/cmdoption directives combo. Options defined in such blocks can be linked to with :option: later in the same file, they won’t link to an option of python. Finally, the markup of command-line fragments in optparse.rst has been cleaned to use ``x`` instead of ``"x"``, keeping that latter form for actual Python strings. Patch by Eli Bendersky and Éric Araujo.
* PEP 3147Barry Warsaw2010-04-171-3/+9
|
* Remove surplus empty lines and convert more files to new optional arg style.Georg Brandl2009-05-171-1/+0
|
* Update signature style for optional arguments, part 3.Georg Brandl2009-04-101-2/+2
|
* Merged revisions 66457-66459,66465-66468,66483-66485,66487-66491 via ↵Benjamin Peterson2008-09-171-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r66457 | antoine.pitrou | 2008-09-13 15:30:30 -0500 (Sat, 13 Sep 2008) | 5 lines Issue #3850: Misc/find_recursionlimit.py was broken. Reviewed by A.M. Kuchling. ........ r66458 | benjamin.peterson | 2008-09-13 17:54:43 -0500 (Sat, 13 Sep 2008) | 1 line fix a name issue; note all doc files should be encoded in utf8 ........ r66459 | benjamin.peterson | 2008-09-14 11:02:22 -0500 (Sun, 14 Sep 2008) | 1 line clarify that radix for int is not 'guessed' ........ r66465 | skip.montanaro | 2008-09-14 21:03:05 -0500 (Sun, 14 Sep 2008) | 3 lines Review usage. Fix a mistake in the new-style class definition. Add a couple new definitions (CPython and virtual machine). ........ r66466 | skip.montanaro | 2008-09-14 21:19:53 -0500 (Sun, 14 Sep 2008) | 2 lines Pick up a few more definitions from the glossary on the wiki. ........ r66467 | benjamin.peterson | 2008-09-14 21:53:23 -0500 (Sun, 14 Sep 2008) | 1 line mention that object.__init__ no longer takes arbitrary args and kwargs ........ r66468 | andrew.kuchling | 2008-09-15 08:08:32 -0500 (Mon, 15 Sep 2008) | 1 line Rewrite item a bit ........ r66483 | georg.brandl | 2008-09-16 05:17:45 -0500 (Tue, 16 Sep 2008) | 2 lines Fix typo. ........ r66484 | benjamin.peterson | 2008-09-16 16:20:28 -0500 (Tue, 16 Sep 2008) | 2 lines be less wordy ........ r66485 | georg.brandl | 2008-09-17 03:45:54 -0500 (Wed, 17 Sep 2008) | 2 lines #3888: add some deprecated modules in whatsnew. ........ r66487 | skip.montanaro | 2008-09-17 06:50:36 -0500 (Wed, 17 Sep 2008) | 2 lines usage ........ r66488 | andrew.kuchling | 2008-09-17 07:57:04 -0500 (Wed, 17 Sep 2008) | 1 line Markup fixes ........ r66489 | andrew.kuchling | 2008-09-17 07:58:22 -0500 (Wed, 17 Sep 2008) | 2 lines Remove comment about improvement: pystone is about the same, and the improvements seem to be difficult to quantify ........ r66490 | andrew.kuchling | 2008-09-17 08:04:53 -0500 (Wed, 17 Sep 2008) | 1 line Note sqlite3 version; move item ........ r66491 | benjamin.peterson | 2008-09-17 16:54:56 -0500 (Wed, 17 Sep 2008) | 1 line document compileall command flags ........
* Move the 3k reST doc tree in place.Georg Brandl2007-08-151-0/+57