Skip to content

BUG: Preserve deduperreload source line numbers 馃馃崋 - #15363

Draft
aryansk wants to merge 1 commit into
ipython:mainfrom
aryansk:codex/issue-15359
Draft

BUG: Preserve deduperreload source line numbers 馃馃崋#15363
aryansk wants to merge 1 commit into
ipython:mainfrom
aryansk:codex/issue-15359

Conversation

@aryansk

@aryansk aryansk commented Aug 9, 2026

Copy link
Copy Markdown

Fixes #15359

Keep reloaded function AST nodes intact when compiling replacements instead of round-tripping them through ast.unparse. Method definitions are wrapped directly in an AST ClassDef, and decorated functions use a copied AST without decorators so source line locations remain available in tracebacks. Add regression coverage for the reloaded function's source line number. 馃馃崋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deduperreload gives invalid tracebacks in reloaded functions

1 participant