New GitHub issue #119310 from aisk:<br>

<hr>

<pre>
# Bug report

### Bug description:

Whenever using python (3.9.6) with ships with Apple, or using Homebrew to install the latest version of Python (3.12.3), their readline are baked with libedit. There is a file `~/.python_history` stores the history for the repl, and the content are like:

```
_HiStOrY_V2_
import\040os
```

When using the latest version of Python with built from the main branch with the new repl, when click the up arrow key, the result will be:

```
❯ ./python.exe
Python 3.14.0a0 experimental free-threading build (heads/main:73f4a58d36, May 21 2024, 21:12:51) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import\040os
```

### CPython versions tested on:

3.13

### Operating systems tested on:

macOS
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/119310">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>