This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: IDLE: replace use of EditorWindow.context_use_ps1
Type: enhancement Stage: resolved
Components: IDLE Versions: Python 3.8, Python 3.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: cheryl.sabella, miss-islington, terry.reedy
Priority: normal Keywords: patch, patch

Created on 2018-12-29 05:02 by terry.reedy, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 11307 merged cheryl.sabella, 2018-12-29 05:15
PR 13747 merged miss-islington, 2019-06-02 18:58
Messages (5)
msg332700 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-12-29 05:02
Attribute .context_use_ps1 is False in EditorWindow and Outwin, True in PyShell.  It is use to switch code paths in multiple classes.  It is equal to isinstance(self/editwin, PyShell) (which requires an import).  It has the same truth value as attribute .prompt_last_line, which is '' except in PyShell.  This more informative attribute was added in #31858 to consolidate all PS1 handling in PyShell.

A PR for #34055 proposed to remove the setting of .context_use_ps1 and the uses with .prompt_last_line.  I will change the title after I submit this.  I am not yet sure if this is the change I want to make.
msg344298 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-06-02 16:46
PR 5968 was previously linked here due to my title editing mistake, soon reversed, on the PR.
msg344300 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-06-02 18:31
I don't especially like 'prompt_last_line', but cannot think of anything better.  Removing the duplication now will make any future change easier.
msg344301 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-06-02 18:56
New changeset 6bdc4dee01788599808c7858e2fe9fdd72cf6792 by Terry Jan Reedy (Cheryl Sabella) in branch 'master':
bpo-35610: IDLE - Replace .context_use_ps1 with .prompt_last_line (GH-11307)
msg344303 - (view) Author: miss-islington (miss-islington) Date: 2019-06-02 19:35
New changeset b4e0bfd4778e142f037f50c19c4bb5bd123b4641 by Miss Islington (bot) in branch '3.7':
bpo-35610: IDLE - Replace .context_use_ps1 with .prompt_last_line (GH-11307)
Date User Action Args
2022-04-11 14:59:09adminsetgithub: 79791
2019-06-02 19:36:38terry.reedysetkeywords: patch, patch
status: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-06-02 19:35:55miss-islingtonsetnosy: + miss-islington
messages: + msg344303
2019-06-02 18:58:50miss-islingtonsetpull_requests: + pull_request13629
2019-06-02 18:56:50terry.reedysetmessages: + msg344301
2019-06-02 18:31:56terry.reedysetkeywords: patch, patch

messages: + msg344300
2019-06-02 16:46:01terry.reedysetkeywords: patch, patch

messages: + msg344298
2019-06-02 16:42:51terry.reedysetpull_requests: - pull_request10656
2019-06-02 16:10:43terry.reedysetpull_requests: - pull_request10657
2018-12-29 05:15:22cheryl.sabellasetpull_requests: + pull_request10658
2018-12-29 05:12:13cheryl.sabellasetkeywords: + patch
pull_requests: + pull_request10657
2018-12-29 05:12:09cheryl.sabellasetkeywords: + patch
pull_requests: + pull_request10656
2018-12-29 05:02:31terry.reedycreate