Issue38077
Created on 2019-09-09 21:13 by rhettinger, last changed 2020-10-10 14:47 by terry.reedy. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 15818 | merged | terry.reedy, 2019-09-10 02:22 | |
| PR 15819 | merged | miss-islington, 2019-09-10 03:10 | |
| PR 15820 | merged | miss-islington, 2019-09-10 03:11 | |
| Messages (8) | |||
|---|---|---|---|
| msg351552 - (view) | Author: Raymond Hettinger (rhettinger) * | Date: 2019-09-09 21:13 | |
Reproducer: 1) Turn-on IDLE 2) Create an empty file called: tmp.py 3) Press F5 to run the empty file 4) In the output shell window, type dir() which gives >>> dir() ['__annotations__', '__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'argv'] |
|||
| msg351563 - (view) | Author: Terry J. Reedy (terry.reedy) * | Date: 2019-09-10 02:07 | |
I verified that 'argv' (bound to sys.argv) appears for all three versions after running an editor file, but not when Shell is started normally, without a file. The immediate culprit is the runcommand code in runscript, lines 156-168. As part of the patch to allow additions to sys.argv, temporary name 'argv' was added but not deleted at the end. I missed this when I reviewed the patch. So this bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4. The immediate fix is trivial. The deeper problem is running internal IDLE code in the user namespace. I believe that this is not necessary and opened #38078 to test and fix. |
|||
| msg351566 - (view) | Author: Terry J. Reedy (terry.reedy) * | Date: 2019-09-10 03:10 | |
New changeset c59295a1ca304f37ca136dd7efca9e560db27d28 by Terry Jan Reedy in branch 'master': bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818) https://github.com/python/cpython/commit/c59295a1ca304f37ca136dd7efca9e560db27d28 |
|||
| msg351568 - (view) | Author: miss-islington (miss-islington) | Date: 2019-09-10 03:29 | |
New changeset 29bde48ade5dbd5d88cfe309653014c84bebb89c by Miss Islington (bot) in branch '3.8': bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818) https://github.com/python/cpython/commit/29bde48ade5dbd5d88cfe309653014c84bebb89c |
|||
| msg351569 - (view) | Author: miss-islington (miss-islington) | Date: 2019-09-10 03:33 | |
New changeset 64947dc81a94692fa8ed21c2199a19a0188150ad by Miss Islington (bot) in branch '3.7': bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818) https://github.com/python/cpython/commit/64947dc81a94692fa8ed21c2199a19a0188150ad |
|||
| msg351571 - (view) | Author: Vedran Čačić (veky) * | Date: 2019-09-10 05:00 | |
I just want to express my delight, Terry, about your desire to solve the root of the problem instead of just fixing a particular instance. (This is not the first time I witnessed that.) It's a big part of the reason why I love Python so much. |
|||
| msg378398 - (view) | Author: Irit Katriel (iritkatriel) * | Date: 2020-10-10 13:30 | |
This seems complete, can it be closed? |
|||
| msg378410 - (view) | Author: Terry J. Reedy (terry.reedy) * | Date: 2020-10-10 14:47 | |
Since I opened the followup issue, yes. Thanks for noticing. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2020-10-10 14:47:34 | terry.reedy | set | status: open -> closed resolution: fixed messages: + msg378410 stage: patch review -> resolved |
| 2020-10-10 13:30:27 | iritkatriel | set | nosy:
+ iritkatriel messages: + msg378398 |
| 2019-09-10 05:00:03 | veky | set | nosy:
+ veky messages: + msg351571 |
| 2019-09-10 03:33:27 | miss-islington | set | messages: + msg351569 |
| 2019-09-10 03:29:04 | miss-islington | set | nosy:
+ miss-islington messages: + msg351568 |
| 2019-09-10 03:11:06 | miss-islington | set | pull_requests: + pull_request15468 |
| 2019-09-10 03:10:59 | miss-islington | set | pull_requests: + pull_request15467 |
| 2019-09-10 03:10:52 | terry.reedy | set | messages: + msg351566 |
| 2019-09-10 02:22:23 | terry.reedy | set | keywords:
+ patch stage: patch review pull_requests: + pull_request15466 |
| 2019-09-10 02:08:00 | terry.reedy | set | nosy:
+ cheryl.sabella messages: + msg351563 |
| 2019-09-09 21:15:47 | rhettinger | set | versions: + Python 3.7 |
| 2019-09-09 21:13:04 | rhettinger | create | |