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 cary
Recipients cary
Date 2019-03-29.02:11:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553825507.66.0.407362572806.issue36466@roundup.psfhosted.org>
In-reply-to
Content
Similar to how `-OO` currently strips docstrings from compiled bytecode, it would be nice if there were a way to strip annotations as well to further compact the bytecode.

Attached is my initial attempt. From some simple manual testing, Python with this patch applied will generate the same bytecode (verified with `marshal` and `dis`) for two files with the same logic, but with annotations manually removed from one of them.

This will probably need some new flag/optimization level rather than relying on `-OO` (as it would be a breaking change).

Open to initial reviews of the patch and idea in general, and suggestions on how to best thread the option through to the module.
History
Date User Action Args
2019-03-29 02:11:47carysetrecipients: + cary
2019-03-29 02:11:47carysetmessageid: <1553825507.66.0.407362572806.issue36466@roundup.psfhosted.org>
2019-03-29 02:11:47carylinkissue36466 messages
2019-03-29 02:11:47carycreate