Use new REPL for the "code" module
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza revisando el módulo de código de Python y el workaround _pyrepl.simple_interact mencionado, y después lee la discusión de CPython enlazada y el PR gh-148261. Se considera terminado determinar cómo debe usar el módulo de código la nueva REPL y aclarar si el workaround es adecuado antes de Python 3.14.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- cli
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100