Skip to content

sys.ps1 and sys.ps2 should be reverted after code.interact #130660

Closed

Description

@gaogaotiantian

Bug report

Bug description:

Our documentation clearly states that sys.ps1 and sys.ps2 are only defined when the interpreter is in interactive mode. code.interact brings the interpreter to interactive mode, but after the function the interpreter is not in that mode anymore. Therefore, we should not keep sys.ps1 and sys.ps2 because that could mislead programs to think the interpreter is still in interactive mode.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Activity

  1. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Feb 28, 2025
  2. added 2 commits that reference this issue on Feb 28, 2025
  3. encukou commented on Mar 19, 2025

    @encukou
    Member

    Triage: Is there anything more to do for this issue?

  4. gaogaotiantian commented on Mar 19, 2025

    @gaogaotiantian
    MemberAuthor

    It's finished. Thanks for find this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions