python / python/cpython

Weird behaviour with tmux send-keys

Đang mở
#135,154 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

stdlib topic-repl type-bug
Ngôn ngữ chính
Python
Star
77.2k
Fork
35.9k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện hành vi trong prompt Python 3.13 trên Linux bằng tmux send-keys, sau đó so sánh với Python 3.12 và xác định tmux hay Python là nguyên nhân. Xác nhận vấn đề bằng một chuỗi tối thiểu có thể lặp lại và ghi lại thay đổi hoặc bài kiểm thử nào sẽ chứng minh rằng prompt không còn tạm dừng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.