This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon, vstinner
Date 2015-03-28.14:41:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The closing of this issue inspired me to think of a better way to do this, and I think providing something in importlib.util that accepted a NodeTransformer as an argument to a function that compiled source files to bytecode files would fill this issue thanks to PEP 488. It would mean that nothing is done dynamically and everything is done offline, but that also means startup costs are gone in regards to bytecode generation and it gets people to actually think about optimizations of Python instead of it just being an afterthought.

importlib.util.compile(path: Union[str, pathlib.Path], transformer: ast.NodeTransformer = None, *, optimization: Union[str, int] = None) -> pathlib.Path
Date User Action Args
2015-03-28 14:41:42brett.cannonsetrecipients: + brett.cannon, vstinner
2015-03-28 14:41:42brett.cannonsetmessageid: <>
2015-03-28 14:41:42brett.cannonlinkissue17515 messages
2015-03-28 14:41:41brett.cannoncreate