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 <1427553702.35.0.829183240598.issue17515@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2015-03-28 14:41:42brett.cannonsetrecipients: + brett.cannon, vstinner
2015-03-28 14:41:42brett.cannonsetmessageid: <1427553702.35.0.829183240598.issue17515@psf.upfronthosting.co.za>
2015-03-28 14:41:42brett.cannonlinkissue17515 messages
2015-03-28 14:41:41brett.cannoncreate