Commit Graph
3 Commits
Author SHA1 Message Date
MsfPabloandPablo Garcia ecfc5cd578 Fix panic in code.replace() with non-interned strings (#8471)
code.replace() called as_interned_str().unwrap() on its string
arguments, which panics when the caller passes a string that has not
been interned. modulefinder's replace_paths_in_code() builds a fresh
co_filename, so any use of ModuleFinder(replace_paths=...) aborted the
interpreter.

Intern the incoming strings instead, and raise TypeError rather than
panicking when a non-string appears in co_names/co_varnames/
co_cellvars/co_freevars.

Unskips test_modulefinder.test_replace_paths.

Co-authored-by: Pablo Garcia <pablito@MacBook-Neo-de-Pablo.local>
2026-08-09 15:06:48 +09:00
Lee DogeonandClaude Opus 4.6 431766912b Mark failing tests for modulefinder
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:52:26 +09:00
CPython Developers 6255752cfb Update modulefinder from v3.14.3 2026-03-12 20:52:24 +09:00