posit-dev / posit-dev/positron

Console: Shell commands cannot accept user input in Python consoles

Open
#696 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: console bug lang: python
Dominant language
TypeScript
Stars
4.3k
Forks
183
Avg merge
1d 11h
Merged PRs (30d)
206

Description

I encountered this when trying to do pip uninstall ipdb which requires me to enter Y, but I'm unable to:

>>> pip uninstall ipdb
Found existing installation: ipdb 0.13.13
Uninstalling ipdb-0.13.13:
  Would remove:
    /Users/seem/.pyenv/versions/3.10.11/envs/codal/bin/ipdb3
    /Users/seem/.pyenv/versions/3.10.11/envs/codal/lib/python3.10/site-packages/ipdb-0.13.13.dist-info/*
    /Users/seem/.pyenv/versions/3.10.11/envs/codal/lib/python3.10/site-packages/ipdb/*
Proceed (Y/n)?

A simpler example is:

>>> !read

which has the same issue.

Both of these work in IPython.

Might be related to https://github.com/rstudio/positron/issues/284?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce this in a Python console with pip uninstall ipdb or !read, then compare the behavior with IPython. Trace the Python console's shell-command input path; the fix is complete when interactive stdin reaches commands and prompts such as Proceed (Y/n)? and !read accept user input.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell
Domain
cli, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.