python-poetry / python-poetry/poetry-plugin-shell
Avoid using pexpect in poetry shell
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 141
- Forks
- 10
- Avg merge
- 59m
- Merged PRs (30d)
- 3
Description
poetry shell has a surprising behavior of spawning a pexpect wrapper which proxies I/O streams between the user and the application. This makes poetry shell unsuitable as a general purpose shell configuration tool: aside from the performance implications, pexpect does not deal correctly with programs that directly access the tty to interact with the terminal (and was never intended to be a full blown terminal application proxy).
It would be much better if poetry shell could simply spawn the shell via os.exec() after configuring the environment, to avoid having to proxy anything. This would be more consistent with user expectations and would prevent applications from breaking when running inside poetry shell.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the poetry shell entry point and trace how the pexpect wrapper configures the environment and proxies I/O. Replace that process handoff with the requested os.exec() approach, then verify that terminal applications work without an intermediate pexpect proxy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100