summaryrefslogtreecommitdiffstats
path: root/Doc/library/imp.rst
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2015-04-13 18:21:02 (GMT)
committerBrett Cannon <brett@python.org>2015-04-13 18:21:02 (GMT)
commitf299abdafa0f2b6eb7abae274861b19b361c96bc (patch)
treeafc3a2bf560e30c7725510eda3b57d71ceddba00 /Doc/library/imp.rst
parenta63cc212348e276c8ede32773313c60ff7fda651 (diff)
downloadcpython-f299abdafa0f2b6eb7abae274861b19b361c96bc.zip
cpython-f299abdafa0f2b6eb7abae274861b19b361c96bc.tar.gz
cpython-f299abdafa0f2b6eb7abae274861b19b361c96bc.tar.bz2
Issue #23731: Implement PEP 488.
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.
Diffstat (limited to 'Doc/library/imp.rst')
-rw-r--r--Doc/library/imp.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst
index c2dbdc5..5557346 100644
--- a/Doc/library/imp.rst
+++ b/Doc/library/imp.rst
@@ -203,11 +203,9 @@ file paths.
value would be ``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2.
The ``cpython-32`` string comes from the current magic tag (see
:func:`get_tag`; if :attr:`sys.implementation.cache_tag` is not defined then
- :exc:`NotImplementedError` will be raised). The returned path will end in
- ``.pyc`` when ``__debug__`` is ``True`` or ``.pyo`` for an optimized Python
- (i.e. ``__debug__`` is ``False``). By passing in ``True`` or ``False`` for
- *debug_override* you can override the system's value for ``__debug__`` for
- extension selection.
+ :exc:`NotImplementedError` will be raised). By passing in ``True`` or
+ ``False`` for *debug_override* you can override the system's value for
+ ``__debug__``, leading to optimized bytecode.
*path* need not exist.
@@ -218,6 +216,9 @@ file paths.
.. deprecated:: 3.4
Use :func:`importlib.util.cache_from_source` instead.
+ .. versionchanged:: 3.5
+ The *debug_override* parameter no longer creates a ``.pyo`` file.
+
.. function:: source_from_cache(path)