Repository navigation
PyREPL: Update Regex in all places - #26212
Conversation
|
🔒 Automated review in progress — Heejae Chang (@heejaechang) is auto-reviewing this PR. |
|
Result: Verification detailsVerification: Isolated verification observed failures that were not classified as caused by this PR: Probe patched reader and render bindings, Probe patched Python 3.13 reader binding. Summary: The targeted shell-integration suite passed all 12 tests on Python 3.13.16, including the existing regex and prompt tests. The new Python 3.15-specific test returned before executing its assertions. Two direct probes confirmed that Python 3.13 lacks the `_pyrepl.render` module and reader binding required to verify the new behavior. Verification is therefore partial. Test runs: 2 passed, 2 failed
❌
|
Heejae Chang (heejaechang)
left a comment
There was a problem hiding this comment.
Approved via Review Center.
f4c86e4
into
main
Before
After
Currently, pythonrc overrides the ANSI escape sequence for handling OSC codes. However, this does not get automatically updated in all references that import it.
Compatibility and escape sequence handling:
pythonrc.pynow ensures that the patchedANSI_ESCAPE_SEQUENCEregex is set before importing_pyrepl.simple_interact, making sure all_pyreplmodules use the updated regex. This prevents issues with prompt rendering and escape sequence stripping in Python 3.13+.test_replacement_regex_is_imported_by_pyrepl_modules, verifies that the patched regex is correctly imported and used by both_pyrepl.readerand_pyrepl.rendermodules for Python 3.15 and above.