cpython
cpython copied to clipboard
gh-119033: Deduplicate history entries in new REPL
The main check is in the last line of the change:
... and ret != self.history[-1] ...
But we also need to deduplicate when copying from transient_history
, i.e. the temporary changes that may have been made to the history entries while navigating between them. Once any new line is entered, this transient history is committed to the main, "permanent" history.
Transient history is never deduplicated in place, only at the time it is written to permanent history.
- Issue: gh-119033