python / python/cpython

Weird behaviour with tmux send-keys

Aperta
#135,154 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

stdlib topic-repl type-bug
Lingua principale
Python
Stelle
77.2k
Fork
35.9k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

Bug report

Bug description:

Hi,

I'm experiencing some weird behaviour only in python 3.13, up to 3.12, this bug never appeared. I'm gonna try to explain it in the best possible way..

I use tmux send-keys to send a couple lines to my python prompt, to run a script from within the python interpreter, clear vars, change the working directory, etc. Now, in python 3.13, after a couple times of sending text to the python prompt this way, some weird behaviour happens.

I'm gonna make a simple example, let's say i send the text (again, using tmux send-keys function) to my python (3.13) prompt:

a = 3\u000D

Which would be a var definition + Enter, if i open a pytho nprompt and do that, it works perfect, now, after a while of sending text this way, when i do it again, the line doesn't get executed, in the prompt "appears" the first char in the line that i sent (in this example, "a"), and it the prompt gets like "paused". If i press any key on it, the line goes through. and it works normally.

This only happens to me in 3.13, i'm not sure if it's a tmux or python issue, my guess is python.

Any idea what could this be, or has anyone experienced something similar?

Thanks in advance !

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il comportamento nel prompt di Python 3.13 su Linux usando tmux send-keys, quindi confrontalo con Python 3.12 e determina se la responsabilità è di tmux o di Python. Conferma il problema con una sequenza minima e ripetibile e documenta quale modifica o test dimostrerebbe che il prompt non va più in pausa.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
cli
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.