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: Saving Shell should not add \n #70541

Closed
terryjreedy opened this issue Feb 12, 2016 · 6 comments
Closed

IDLE: Saving Shell should not add \n #70541

terryjreedy opened this issue Feb 12, 2016 · 6 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@terryjreedy
Copy link
Member

BPO 26353
Nosy @terryjreedy, @ZackerySpytz, @miss-islington, @miss-islington
PRs
  • bpo-26353: IDLE adds an unneeded newline when saving a shell window #17103
  • [3.8] bpo-26353: IDLE adds an unneeded newline when saving a shell window (GH-17103) #17118
  • [3.7] bpo-26353: IDLE adds an unneeded newline when saving a shell window (GH-17103) #17119
  • 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-11-12.11:14:07.956>
    created_at = <Date 2016-02-12.22:08:12.778>
    labels = ['3.8', 'expert-IDLE', 'type-bug', '3.7', '3.9']
    title = 'IDLE: Saving Shell should not add \\n'
    updated_at = <Date 2019-11-14.07:35:51.566>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2019-11-14.07:35:51.566>
    actor = 'ZackerySpytz'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2019-11-12.11:14:07.956>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2016-02-12.22:08:12.778>
    creator = 'terry.reedy'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 26353
    keywords = ['patch']
    message_count = 6.0
    messages = ['260205', '356423', '356436', '356441', '356442', '356583']
    nosy_count = 3.0
    nosy_names = ['terry.reedy', 'ZackerySpytz', 'miss-islington', 'miss-islington']
    pr_nums = ['17103', '17118', '17119']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue26353'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @terryjreedy
    Copy link
    Member Author

    When one saves the IDLE Shell window, at least when the cursor is at the prompt, \n is added, so that

    >> |

    changes to

    >>
    |

    This seems wrong. It does not happen in editor windows. I should check Output Windows.

    @terryjreedy terryjreedy added the type-bug An unexpected behavior, bug, or error label Feb 12, 2016
    @terryjreedy terryjreedy self-assigned this Jun 19, 2017
    @terryjreedy
    Copy link
    Member Author

    Zachary determined that the issue is that writing calls iomenu.IOBinding.fixlastline, which unconditionally adds \n at the end if there is one. That is not needed for the Shell and wrong when it ends with a prompt, which is the normal case.

    @terryjreedy terryjreedy added 3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes labels Nov 12, 2019
    @terryjreedy
    Copy link
    Member Author

    New changeset c8b53dc by Terry Jan Reedy (Zackery Spytz) in branch 'master':
    bpo-26353: IDLE adds an unneeded newline when saving a shell window (GH-17103)
    c8b53dc

    @miss-islington
    Copy link
    Contributor

    New changeset 177b126 by Miss Islington (bot) in branch '3.7':
    bpo-26353: IDLE adds an unneeded newline when saving a shell window (GH-17103)
    177b126

    @miss-islington
    Copy link
    Contributor

    New changeset 8ce1a9c by Miss Islington (bot) in branch '3.8':
    bpo-26353: IDLE adds an unneeded newline when saving a shell window (GH-17103)
    8ce1a9c

    @ZackerySpytz
    Copy link
    Mannequin

    ZackerySpytz mannequin commented Nov 14, 2019

    Thank you, Terry, for modifying the PR and merging it.

    @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 (EOL) end of life 3.9 only security fixes topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants