python / python/cpython

Weird behaviour with tmux send-keys

未关闭
#135,154 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

stdlib topic-repl type-bug
主要语言
Python
星标
77.2k
派生
35.9k
PR 合并指标
PR 指标待抓取

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

在 Linux 上使用 tmux send-keys 复现 Python 3.13 提示符中的行为,然后将其与 Python 3.12 进行比较,并确定是 tmux 还是 Python 导致了该问题。使用最小且可重复的操作序列确认该问题,并记录哪项更改或测试可以证明提示符不再暂停。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
cli
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。