[Python-checkins] cpython: whatsnew: frame.clear, expanded entry for -I/isolated mode.

r.david.murray python-checkins at python.org
Mon Feb 24 17:01:44 CET 2014


http://hg.python.org/cpython/rev/50c74ff29894
changeset: 89368:50c74ff29894
user: R David Murray <rdmurray at bitdance.com>
date: Mon Feb 24 10:38:13 2014 -0500
summary:
 whatsnew: frame.clear, expanded entry for -I/isolated mode.
files:
 Doc/whatsnew/3.4.rst | 22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -95,7 +95,7 @@
 * :ref:`pip should always be "available" <whatsnew-pep-453>` (:pep:`453`).
 * :ref:`Make newly created file descriptors non-inheritable <whatsnew-pep-446>`
 (:pep:`446`).
-* command line option for :ref:`isolated mode <using-on-misc-options>`,
+* command line option for :ref:`isolated mode <whatsnew-isolated-mode>`,
 (:issue:`16499`).
 * :ref:`improvements in the handling of codecs <codec-handling-improvements>`
 that are not text encodings (multiple issues).
@@ -373,6 +373,10 @@
 method for its *base* argument. (Contributed by Mark Dickinson in
 :issue:`16772`.)
 
+* Frame objects now have a :func:`~frame.clear` method that clears all
+ references to local variables from the frame. (Contributed by Antoine Pitrou
+ in :issue:`17934`.)
+
 
 New Modules
 ===========
@@ -1253,7 +1257,8 @@
 
 A new :func:`traceback.clear_frames` function takes a traceback object
 and clears the local variables in all of the frames it references,
-reducing the amount of memory consumed (:issue:`1565525`).
+reducing the amount of memory consumed. (Contributed by Andrew Kuchling in
+:issue:`1565525`).
 
 
 urllib
@@ -1485,6 +1490,19 @@
 Other Improvements
 ------------------
 
+.. _whatsnew-isolated-mode:
+
+* The :ref:`python <using-on-cmdline>` command has a new :ref:`option
+ <using-on-misc-options>`, ``-I``, which causes it to run in "isolated mode",
+ which means that :data:`sys.path` contains neither the script's directory nor
+ the user's ``site-packages`` directory, and all :envvar:`PYTHON*` environment
+ variables are ignored (it implies both ``-s`` and ``-E``). Other
+ restrictions may also be applied in the future, with the goal being to
+ isolate the execution of a script from the user's environment. This is
+ appropriate, for example, when Python is used to run a system script. On
+ most POSIX systems it can and should be used in the ``#!`` line of system
+ scripts. (Contributed by Christian Heims in :issue:`16499`.)
+
 * Tab-completion is now enabled by default in the interactive interpreter.
 (Contributed by Antoine Pitrou and Éric Araujo in :issue:`5845`.)
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

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