Opened 7 years ago
Closed 7 years ago
#55474 closed defect (invalid)
Python any version - slow interactive startup and exit
Reported by: | Tatsh (Andrew Udvare) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | python35 |
Description
I have a strange issue where the Python interactive prompt (>>>
) takes seconds to display and after using ^D
to exit, it takes seconds to exit the process.
I am installing Python without any modifications (not compiled by me):
port install python35
I tried a clean environment and also unset PYTHONSTARTUP
to ensure it wasn't this file. The problem persists.
Please let me know what other information I should provide.
Change History (3)
comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 7 years ago by Tatsh (Andrew Udvare)
I figured out the issue by checking python
output while it waited and using ^C
. The exception traceback showed a call to readline.read_history_file()
. I emptied my history file and everything is fine now. A large history file is the cause. To avoid this issue with a huge history file, python -S
, and this may have to do with this in my ~/.inputrc
:
# Use the text that has already been typed as the prefix for searching through # commands (i.e. more intelligent Up/Down behavior) "\e[B": history-search-forward "\e[A": history-search-backward
Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site.py", line 410, in register_readline readline.read_history_file(history)
Sorry for bothering.
comment:3 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → invalid |
---|---|
Status: | new → closed |
Ok. Sounds like not a MacPorts-specific problem, in any case.
OS version? Python modules installed?
I'm unable to reproduce this on Sierra.