GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — A new Python REPL · Issue #111201 · python/cpython

A new Python REPL #111201

New issue
Copy link
New issue
Copy link
Closed
Closed
A new Python REPL#111201
Copy link
Assignees
pablogsallysnikolaou
Labels
topic-replRelated to the interactive shellRelated to the interactive shell

Description

@pablogsal
pablogsal
opened on Oct 23, 2023
Issue body actions

This issue will track all the different steps to bootstrap a new Python REPL with many new features. The target of this issue is that we can reach a point where new contributions can be made easily to the REPL once is written in pure Python. This issue only coveres the initial ground work to reach this status.

Tasks to be done:

  • Redirect the parser and the main module to a new Python module.
  • Fallback to the previous tokenizer-based REPL if the terminal is not a tty (and for backwards compat reasons)
  • Bootstrap a new REPL module (based on a trimmed version pypy's pyrepl module).
  • Ensure that the basic features work:
    • History
    • Completions
    • Ctrl-r and Ctrl-s

Linked PRs

  • gh-111201: A new Python REPL #111567
  • Add Lysandros Nikolaou to the News entry of gh-111201 #118616
  • gh-111201: Fix event queue tests for pyrepl #118635
  • gh-111201: Use a more common constant in completion tests in test_pyrepl #118638
  • gh-111201: Add tests for unix console class in pyrepl #118653
  • gh-111201: Allow bracketed paste to work #118700
  • gh-111201: Add more tests to test_pyrepl to cover key translation #118705
  • gh-111201: Allow pasted code to contain multiple statements in the REPL #118712
  • gh-111201: Remove readline dependency from the PyREPL #119262
  • gh-111201: Add append to screen method to avoid recalculation #119274
  • gh-111201: Speed up paste mode in the REPL #119341
  • gh-111201: auto-indentation in _pyrepl #119348
  • [3.13] gh-111201: Remove readline dependency from the PyREPL (GH-119262) #119403
  • [3.13] gh-111201: Add append to screen method to avoid recalculation (GH-119274) #119405
  • [3.13] gh-111201: auto-indentation in _pyrepl (GH-119348) #119427
  • gh-111201: Use calc_complete_screen after bracketed paste in PyREPL #119432
  • [3.13] gh-111201: Use calc_complete_screen after bracketed paste in PyREPL (GH-119432) #119439
  • gh-111201: Support pyrepl on Windows #119559
  • gh-111201: Improve pyrepl auto indentation #119606
  • [3.13] gh-111201: Improve pyrepl auto indentation (GH-119606) #119833
  • gh-111201: [pyrepl] Ensure optional platform-specific imports are optional #119834
  • gh-111201: Skip pyrepl Windows tests earlier #119848
  • [3.13] gh-111201: Support pyrepl on Windows (GH-119559) #119850
  • [3.13] gh-111201: Skip pyrepl Windows tests earlier (#119848) #119924
  • gh-111201: fix auto-indent in pyrepl for muliple pound comments #123196
  • [3.13] gh-111201: fix auto-indent in pyrepl for muliple pound comments (GH-123196) #123764
Reacted by Kirill Podoprigora, Charlie Zhao, An Long, sobolevn, Vasily Ryabov, Tomas R., Jacob Nilsson, Trey Hunner, Hugo van Kemenade, Erlend E. Aasland and 7 more
Reacted by Kirill Podoprigora, Itamar Oren, Trey Hunner, Andrew Kay, Hugo van Kemenade, Erlend E. Aasland, Jannis Leidel, chgnrdv, Malachi Syfrett, Raymond Akornor and 1 more
Reacted by Jannis Leidel, Edgar Ramírez Mondragón, ilanbenb, Dawid Kraiński, Malachi Syfrett and Raymond Akornor
Reacted by stonebig, Rafael Weingartner-Ortner, Dawid Kraiński, Malachi Syfrett and Raymond Akornor

Activity

Next
  1. pablogsal commented on Oct 23, 2023

    @pablogsal
    pablogsal
    on Oct 23, 2023
    MemberAuthor
    More actions

    If you want to help with this endeavour, please mention it here so we can coordinate everyone!

  2. pablogsal
    assigned
    pablogsal
    and
    lysnikolaou
    on Oct 23, 2023
  3. pablogsal commented on Oct 23, 2023

    @pablogsal
    pablogsal
    on Oct 23, 2023
    MemberAuthor
    More actions

    I have a initial version that we can start building upon, I will create a PR shortly.

    Reacted by Lysandros Nikolaou
  4. tomasr8 commented on Oct 23, 2023

    @tomasr8
    tomasr8
    on Oct 23, 2023
    Member
    More actions

    I learned about this from the "core.py" podcast and it sounds like a great idea! I'd be happy help with this effort :)

  5. pablogsal
    added a commit that references this issue on Oct 31, 2023

    pythongh-111201: A new Python REPL

    17c271e
  6. vstinner commented on Nov 1, 2023

    @vstinner
    vstinner
    on Nov 1, 2023
    Member
    More actions

    Fallback to the previous tokenizer-based REPL if the terminal is not a tty (and for backwards compat reasons)

    Do you mean not using _pyrepl? Can _pyrepl be used without readline nor tty?

  7. pablogsal commented on Nov 1, 2023

    @pablogsal
    pablogsal
    on Nov 1, 2023
    MemberAuthor
    More actions

    Can _pyrepl be used without readline nor tty?

    It needs at least a tty yes. Readline can be lifted but I am not sure yet

  8. pablogsal
    added a commit that references this issue on Apr 27, 2024

    pythongh-111201: A new Python REPL

    2bf1505
  9. novaTopFlex commented on Apr 28, 2024

    @novaTopFlex
    novaTopFlex
    on Apr 28, 2024
    More actions

    I would like to see a new REPL (read, evaluate, print, loop) for the Python interpreter if the interpreter goes by a different name. Two other major Python interpreters also exist, and they already use other names ("bpython" and "ipython"). I would recommend forking the current REPL and renaming the interpreter with the new REPL to "zpython" instead. Also, I would like to see a built-in "clear()" function in the REPL as I already encounter with the "exit()" function and other REPL-specific functions.

  10. ambv
    added a commit that references this issue on May 5, 2024

    gh-111201: A new Python REPL (GH-111567)

    f27f8c7
  11. pablogsal
    added 2 commits that reference this issue on May 5, 2024

    Add Lysandros Nikolaou to the News entry of pythongh-111201

    727ae51

    Add Lysandros Nikolaou to the News entry of pythongh-111201

    f290432
  12. theLastOfCats commented on May 5, 2024

    @theLastOfCats
    theLastOfCats
    on May 5, 2024
    More actions

    Big feature without PEP?

  13. pablogsal
    added a commit that references this issue on May 5, 2024

    Add Lysandros Nikolaou to the News entry of gh-111201 (#118616)

    2eb9991
  14. 112 remaining items

  15. estyxx
    added 6 commits that reference this issue on Jul 17, 2024

    pythongh-111201: Speed up paste mode in the REPL (python#119341)

    3079f8d

    pythongh-111201: Use calc_complete_screen after bracketed paste in Py…

    7eb543f

    pythongh-111201: Support pyrepl on Windows (python#119559)

    e637683

    pythongh-111201: Improve pyrepl auto indentation (python#119606)

    46f6acb

    pythongh-111201: [pyrepl] Ensure optional platform-specific imports a…

    a53cd5c

    pythongh-111201: Skip pyrepl Windows tests earlier (python#119848)

    bb58e4a
  16. wiggin15
    added 2 commits that reference this issue on Aug 19, 2024

    pythongh-111201 fix auto-indent in pyrepl for muliple pound comments

    9485aa5

    pythongh-111201: fix auto-indent in pyrepl for muliple pound comments

    dbec792
  17. pablogsal
    added a commit that references this issue on Sep 6, 2024

    gh-111201: fix auto-indent in pyrepl for muliple pound comments (#123196

    d683f49
  18. miss-islington
    added a commit that references this issue on Sep 6, 2024

    pythongh-111201: fix auto-indent in pyrepl for muliple pound comments (…

    6692d3e
  19. ambv
    added a commit that references this issue on Sep 6, 2024

    [3.13] gh-111201: fix auto-indent in pyrepl for muliple pound comments (

    b221c5b
  20. lysnikolaou commented on Sep 23, 2024

    @lysnikolaou
    lysnikolaou
    on Sep 23, 2024
    Member
    More actions

    I think we can close this and handle the rest of the bugs in individual issues. Feel free to re-open if you feel otherwise.

    Reacted by Victor Stinner
    Reacted by Alex Waygood
  21. lysnikolaou
    closed this as completedon Sep 23, 2024
  22. 0dminnimda commented on Oct 15, 2024

    @0dminnimda
    0dminnimda
    on Oct 15, 2024
    More actions

    Thanks to all the participants, this is amazing! I really enjoy its increased portability!

    Reacted by Alex Waygood
  23. HarbingerOfFire commented on May 24, 2025

    @HarbingerOfFire
    HarbingerOfFire
    on May 24, 2025
    More actions

    I absolutely love this change! I was using 3.12 and was thinking about making the change myself when I found this. Thank you all for your dedication!

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

Metadata

Metadata

Assignees

  • @lysnikolaou
    lysnikolaou
  • @pablogsal
    pablogsal

Labels

topic-replRelated to the interactive shellRelated to the interactive shell

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.