Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE: replace use of EditorWindow.context_use_ps1 #79791

Closed
terryjreedy opened this issue Dec 29, 2018 · 5 comments
Closed

IDLE: replace use of EditorWindow.context_use_ps1 #79791

terryjreedy opened this issue Dec 29, 2018 · 5 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 only security fixes topic-IDLE type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 35610
Nosy @terryjreedy, @csabella, @miss-islington
PRs
  • bpo-35610: IDLE - Replace .context_use_ps1 with .prompt_last_line #11307
  • [3.7] bpo-35610: IDLE - Replace .context_use_ps1 with .prompt_last_line (GH-11307) #13747
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = <Date 2019-06-02.19:36:38.681>
    created_at = <Date 2018-12-29.05:02:31.596>
    labels = ['3.8', 'expert-IDLE', 'type-feature', '3.7']
    title = 'IDLE: replace use of EditorWindow.context_use_ps1'
    updated_at = <Date 2019-06-02.19:36:38.680>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2019-06-02.19:36:38.680>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2019-06-02.19:36:38.681>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2018-12-29.05:02:31.596>
    creator = 'terry.reedy'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35610
    keywords = ['patch', 'patch']
    message_count = 5.0
    messages = ['332700', '344298', '344300', '344301', '344303']
    nosy_count = 3.0
    nosy_names = ['terry.reedy', 'cheryl.sabella', 'miss-islington']
    pr_nums = ['11307', '13747']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue35610'
    versions = ['Python 3.7', 'Python 3.8']

    @terryjreedy
    Copy link
    Member Author

    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 bpo-31858 to consolidate all PS1 handling in PyShell.

    A PR for bpo-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.

    @terryjreedy terryjreedy added 3.7 (EOL) end of life 3.8 only security fixes labels Dec 29, 2018
    @terryjreedy terryjreedy self-assigned this Dec 29, 2018
    @terryjreedy terryjreedy added topic-IDLE type-feature A feature request or enhancement labels Dec 29, 2018
    @terryjreedy
    Copy link
    Member Author

    PR 5968 was previously linked here due to my title editing mistake, soon reversed, on the PR.

    @terryjreedy
    Copy link
    Member Author

    I don't especially like 'prompt_last_line', but cannot think of anything better. Removing the duplication now will make any future change easier.

    @terryjreedy
    Copy link
    Member Author

    New changeset 6bdc4de by Terry Jan Reedy (Cheryl Sabella) in branch 'master':
    bpo-35610: IDLE - Replace .context_use_ps1 with .prompt_last_line (GH-11307)
    6bdc4de

    @miss-islington
    Copy link
    Contributor

    New changeset b4e0bfd by Miss Islington (bot) in branch '3.7':
    bpo-35610: IDLE - Replace .context_use_ps1 with .prompt_last_line (GH-11307)
    b4e0bfd

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes topic-IDLE type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants