Closed lionel- closed 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Can you reproduce this with Apple-provided Python/LLDB? If so, I suggest reporting it to Apple as well: https://feedbackassistant.apple.com/
Thoughts here, @Homebrew/core?
Personally, I'm not opposed to doing this at some point, but only if multiple users ask for this (which doesn't look to be the case currently). This bug should be reported to Apple too.
I have reported it to Apple before posting here and the person in the SO post reported it as well.
Do you have the FB#?
This is FB12092290
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew doctor
output" saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
Use Python and LLDB inside a shell running within Emacs. Emacs runs such subprocesses inside non-echoing ttys. Since the text is inserted in the "document" before being sent to the process, we don't need the tty to echo the input.
What happened (include all command output)?
The tty settings are unexpectedly changed by python/lldb on startup, which causes the tty to start echoing input:
See also https://stackoverflow.com/questions/19246065/python-in-emacs-shell-mode-turns-on-stty-echo-and-breaks-c-d
What did you expect to happen?
The
stty
settings should not change. There are workarounds in Emacs to deal with echoing ttys but they are not comprehensive across all modules and somewhat ill defined.This happens because libedit is used in applications like Python and LLDB as a readline replacement. Currently, as is standard, homebrew links to the system library instead of the homebrew version. However the version in macOS hasn't been updated since 2012/09/11 (see https://opensource.apple.com/source/libedit/) and it is missing an important bugfix: https://github.com/NetBSD/src/commit/0aa38cbab4730df863c600ab07029005cf83af4b.
Without this fix, the tty settings are lost each time a subprocess initialises the readline emulation through libedit.
Would it be possible to make an exception for libedit and use the updated homebrew version instead of the old system version throughout homebrew formulas? Here is a diff that fixes the issue for python3:
Happy to send a PR if the fix above makes sense.
Step-by-step reproduction instructions (by running
brew
commands)