Use new REPL for the "code" module
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- PR マージ指標
- PR 指標を取得中
説明
Feature or enhancement
Proposal:
When installing Django in a Python 3.13 virtual environment and using Django's shell command, the old REPL is used.
It would be great if the code module supported the new REPL. From @ambv's reply in https://github.com/python/cpython/issues/119433#issuecomment-2130060062 it looks like this will be considered in Python 3.14.
I would also like to know what projects should do in the meantime. For example, I found a way to modify Django's shell command in one's own project to use the new REPL, by using this within a try-except block:
from _pyrepl.simple_interact import run_multiline_interactive_console
run_multiline_interactive_console()
Is this an acceptable workaround before Python 3.14 is released? Or should this function not be relied on, seeing as it's in an undocumented module?
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
https://github.com/python/cpython/pull/119433#pullrequestreview-2074755660
Linked PRs
- gh-148261
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず Python コードモジュールと、参照されている _pyrepl.simple_interact workaround を確認し、次にリンクされている CPython の議論と PR gh-148261 を読んでください。完了条件は、コードモジュールが新しい REPL をどのように使用すべきかを判断し、Python 3.14 より前に workaround が適切かどうかを明確にすることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- cli
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100