[Python-checkins] bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818)

Miss Islington (bot) webhook-mailer at python.org
Mon Sep 9 23:29:05 EDT 2019


https://github.com/python/cpython/commit/29bde48ade5dbd5d88cfe309653014c84bebb89c
commit: 29bde48ade5dbd5d88cfe309653014c84bebb89c
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-09-09T20:29:01-07:00
summary:

bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818)


This only happened when initializing the subprocess to run a module.
This recent bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4.
(cherry picked from commit c59295a1ca304f37ca136dd7efca9e560db27d28)

Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>

files:
A Misc/NEWS.d/next/IDLE/2019-09-09-22-08-36.bpo-38077.Mzpfe2.rst
M Lib/idlelib/NEWS.txt
M Lib/idlelib/runscript.py

diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index 559ffd0cf4f3..3ccc5c07fb00 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -3,6 +3,9 @@ Released on 2019-10-20?
 ======================================
 
 
+bpo-38077: IDLE no longer adds 'argv' to the user namespace when
+initializing it.  This bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4.
+
 bpo-38401: Shell restart lines now fill the window width, always start
 with '=', and avoid wrapping unnecessarily. The line will still wrap
 if the included file name is long relative to the width.
diff --git a/Lib/idlelib/runscript.py b/Lib/idlelib/runscript.py
index f97cf528cce6..de73bf845815 100644
--- a/Lib/idlelib/runscript.py
+++ b/Lib/idlelib/runscript.py
@@ -164,7 +164,7 @@ def _run_module_event(self, event, *, customize=False):
                 _sys.argv = argv
             import os as _os
             _os.chdir({dirname!r})
-            del _sys, _basename, _os
+            del _sys, argv, _basename, _os
             \n""")
         interp.prepend_syspath(filename)
         # XXX KBK 03Jul04 When run w/o subprocess, runtime warnings still
diff --git a/Misc/NEWS.d/next/IDLE/2019-09-09-22-08-36.bpo-38077.Mzpfe2.rst b/Misc/NEWS.d/next/IDLE/2019-09-09-22-08-36.bpo-38077.Mzpfe2.rst
new file mode 100644
index 000000000000..ba1fd55defaa
--- /dev/null
+++ b/Misc/NEWS.d/next/IDLE/2019-09-09-22-08-36.bpo-38077.Mzpfe2.rst
@@ -0,0 +1,2 @@
+IDLE no longer adds 'argv' to the user namespace when initializing it.  This
+bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4.



More information about the Python-checkins mailing list