Fix traceback, syntax errors, and exception handling (#7015)

* Update codeop from v3.14.3

* Fix traceback, syntax errors, and exception handling

- Improve unclosed bracket detection with "'(' was never closed" message
- Fix IndentationError location to point to end of line
- Implement frame.clear() with proper checks for executing/suspended frames
- Fix exception context chaining for propagated exceptions
- Add traceback.__dir__() and prevent tb_next deletion
- Fix subscript operation source range restoration in compiler
- Change "duplicate parameter" to "duplicate argument" error message
- Refactor duplicate code in asyncgenerator.rs and frame.rs

---------

Co-authored-by: CPython Developers <>

Assisted-by: Codex:gpt-6
This commit is contained in:
Jeong, YunWonandCPython Developers authored and GitHub committed 2026-02-07 13:41:45 +09:00
1 parent 58831550c4
commit 3df178298a
29 files changed
+545 -245

No files matched your search

-2
View File
@@ -548,8 +548,6 @@ class CmdLineTest(unittest.TestCase):
self.assertIn(b'Exception in __main__ module', err)
self.assertIn(b'Traceback', err)
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_pep_409_verbiage(self):
# Make sure PEP 409 syntax properly suppresses
# the context of an exception