summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_repl.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-120221: Support KeyboardInterrupt in asyncio REPL (GH-123795) ↵Miss Islington (bot)2024-09-061-2/+3
| | | | | | | | | | | | | | (#123799) This switches the main pyrepl event loop to always be non-blocking so that it can listen to incoming interruptions from other threads. This also resolves invalid display of exceptions from other threads (gh-123178). This also fixes freezes with pasting and an active input hook. (cherry picked from commit 033510e11dff742d9626b9fd895925ac77f566f1) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-119310: Fix encoding when reading old history file (GH-121779) ↵Miss Islington (bot)2024-09-061-2/+3
| | | | | | | | (#123784) (cherry picked from commit e95984826eb3cdb3a3baedb2ccea35e11e9f8161) Co-authored-by: aorcajo <589252+aorcajo@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-121804: always show error location for SyntaxError's in basic repl ↵Miss Islington (bot)2024-09-031-0/+13
| | | | | | | | (GH-123202) (#123631) gh-121804: always show error location for SyntaxError's in basic repl (GH-123202) (cherry picked from commit 6822cb23c62032381971d8a47fd41d1e98710a8c) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* [3.13] gh-121790: Fix interactive console initialization (GH-121793) (GH-121822)Miss Islington (bot)2024-07-151-4/+63
| | | | | | (cherry picked from commit e5c7216f376a06d2c931daf999e2980e494e747e) Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-121711: Set `-m asyncio` return_code to 1 for ENOTTY (GH-121714) ↵Miss Islington (bot)2024-07-131-3/+3
| | | | | | | | (GH-121718) Set return_code to 1 for ENOTTY (cherry picked from commit a1834742936a3a2164c25c14ecf4ae6a95288ca3) Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com>
* [3.13] gh-118908: Limit exposed globals from internal imports and ↵Miss Islington (bot)2024-06-111-3/+2
| | | | definitions on new REPL startup (GH-119547) (#120362)
* [3.13] gh-118817: Fix `asyncio REPL` on Windows (GH-118819) (#118847)Miss Islington (bot)2024-05-091-1/+4
| | | | | (cherry picked from commit c3643a121401d111bebd3e26d6f362ade2ed2a83) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-116303: Skip test module dependent tests if test modules are unavailable ↵Erlend E. Aasland2024-04-031-0/+2
| | | | (#117341)
* gh-106922: Support multi-line error locations in traceback (attempt 2) (#112097)William Wen2023-12-011-1/+2
|
* gh-67224: Show source lines in tracebacks when using the -c option when ↵Pablo Galindo Salgado2023-10-261-1/+1
| | | | running Python (#111200)
* gh-110805: Allow the repl to show source code and complete tracebacks (#110775)Pablo Galindo Salgado2023-10-131-0/+62
|
* gh-108634: Py_TRACE_REFS uses a hash table (#108663)Victor Stinner2023-08-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python built with "configure --with-trace-refs" (tracing references) is now ABI compatible with Python release build and debug build. Moreover, it now also supports the Limited API. Change Py_TRACE_REFS build: * Remove _PyObject_EXTRA_INIT macro. * The PyObject structure no longer has two extra members (_ob_prev and _ob_next). * Use a hash table (_Py_hashtable_t) to trace references (all objects): PyInterpreterState.object_state.refchain. * Py_TRACE_REFS build is now ABI compatible with release build and debug build. * Limited C API extensions can now be built with Py_TRACE_REFS: xxlimited, xxlimited_35, _testclinic_limited. * No longer rename PyModule_Create2() and PyModule_FromDefAndSpec2() functions to PyModule_Create2TraceRefs() and PyModule_FromDefAndSpec2TraceRefs(). * _Py_PrintReferenceAddresses() is now called before finalize_interp_delete() which deletes the refchain hash table. * test_tracemalloc find_trace() now also filters by size to ignore the memory allocated by _PyRefchain_Trace(). Test changes for Py_TRACE_REFS: * Add test.support.Py_TRACE_REFS constant. * Add test_sys.test_getobjects() to test sys.getobjects() function. * test_exceptions skips test_recursion_normalizing_with_no_memory() and test_memory_error_in_PyErr_PrintEx() if Python is built with Py_TRACE_REFS. * test_repl skips test_no_memory(). * test_capi skisp test_set_nomemory().
* bpo-40280: Skip subprocess-based tests on wasm32-emscripten (GH-30615)Christian Heimes2022-01-251-1/+6
|
* bpo-46441: Add a boilerplate to test syntax errors in interactive mode ↵Batuhan Taskaya2022-01-201-0/+33
| | | | (GH-30720)
* bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779)Victor Stinner2020-06-101-1/+5
| | | | | | | | | | | | test_repl.test_close_stdin() now calls support.suppress_msvcrt_asserts() to fix the test on Windows. * Move suppress_msvcrt_asserts() from test.libregrtest.setup to test.support. Make its verbose parameter optional: verbose=False by default. * Add msvcrt.GetErrorMode(). * SuppressCrashReport now uses GetErrorMode() and SetErrorMode() of the msvcrt module, rather than using ctypes. * Remove also an unused variable (deadline) in wait_process().
* bpo-40826: Add _PyOS_InterruptOccurred(tstate) function (GH-20599)Victor Stinner2020-06-031-6/+16
| | | | | | | | | | | | my_fgets() now calls _PyOS_InterruptOccurred(tstate) to check for pending signals, rather calling PyOS_InterruptOccurred(). my_fgets() is called with the GIL released, whereas PyOS_InterruptOccurred() must be called with the GIL held. test_repl: use text=True and avoid SuppressCrashReport in test_multiline_string_parsing(). Fix my_fgets() on Windows: fgets(fp) does crash if fileno(fp) is closed.
* bpo-39209: Manage correctly multi-line tokens in interactive mode (GH-17860)Pablo Galindo2020-01-061-0/+36
|
* bpo-30696: Fix the REPL looping endlessly when no memory (GH-4160)xdegaye2017-11-121-0/+62