◐ Shell
clean mode source ↗

gh-135801: Add the module parameter to compile() etc by serhiy-storchaka · Pull Request #139652 · python/cpython

Many functions related to compiling or parsing Python code, such as
compile(), ast.parse(), symtable.symtable(),
and importlib.InspectLoader.source_to_code() now allow to pass
the module name used when filtering syntax warnings.

@serhiy-storchaka

vstinner

@serhiy-storchaka

serhiy-storchaka

JelleZijlstra

JelleZijlstra

JelleZijlstra

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request

Nov 13, 2025

CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request

Nov 14, 2025

CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request

Nov 14, 2025

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request

Dec 6, 2025
…139652)

Many functions related to compiling or parsing Python code, such as
compile(), ast.parse(), symtable.symtable(),
and importlib.abc.InspectLoader.source_to_code() now allow to pass
the module name used when filtering syntax warnings.