print _pyrepl.readline._wrapper.reader will raise error'UnixConsole' object has no attribute 'posxy'
Abierto
Nadie ha tomado este issue todavía.
pending
stdlib
topic-repl
type-bug
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Bug report
Bug description:
print('Before importing _pyrepl.readline:')
import sys
import os
print('PYTHON_HISTORY:', os.environ.get('PYTHON_HISTORY'))
print('\\nImporting _pyrepl.readline...')
import _pyrepl.readline
print('After importing:')
print('History length:', _pyrepl.readline.get_current_history_length())
print('Wrapper object:', _pyrepl.readline._wrapper)
print('Wrapper reader:', _pyrepl.readline._wrapper.reader)
./python.exe test.py
Before importing _pyrepl.readline:
PYTHON_HISTORY: None
\nImporting _pyrepl.readline...
After importing:
History length: 0
Wrapper object: _ReadlineWrapper(f_in=3, f_out=4, saved_history_length=-1, startup_hook=None)
Wrapper reader: Traceback (most recent call last):
File "/Users/yihong/test.py", line 12, in <module>
print('Wrapper reader:', _pyrepl.readline._wrapper.reader)
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/reprlib.py", line 21, in wrapper
result = user_function(self)
File "<string>", line 41, in __repr__
File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/reprlib.py", line 21, in wrapper
result = user_function(self)
File "<string>", line 9, in __repr__
AttributeError: 'UnixConsole' object has no attribute 'posxy'
this exists from 3.13 to 3.15
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs
- gh-139351
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
Reproduce el fallo de macOS con el script proporcionado, comenzando en el punto de entrada _pyrepl.readline y su representación _wrapper.reader. Inspeccione la ruta de representación de UnixConsole y verifique que imprimir el reader ya no genere un AttributeError por la ausencia de posxy.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- cli
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100