Skip to content

[WIP] bpo-26145: Implement PEP 511, code transformer#2355

Closed
vstinner wants to merge 1 commit into
python:masterfrom
vstinner:code_transformer
Closed

[WIP] bpo-26145: Implement PEP 511, code transformer#2355
vstinner wants to merge 1 commit into
python:masterfrom
vstinner:code_transformer

Conversation

@vstinner

Copy link
Copy Markdown
Member
  • Add -o command line option: value stored into a new
    sys.implementation.optim_tag attribute
  • -o noopt now disables the peephole optimizer
  • Add get_code_transformers() and set_code_transformers() functions
    to the sys module
  • Add PyCF_TRANSFORMED_AST compiler flag
  • Add test_code_transformer unit tests
  • Change how importlib generated the .pyc filename: it now also uses
    the sys.implementation.optim_tag
  • Add _PySys_CodeTransformer structure

* Add -o command line option: value stored into a new
  sys.implementation.optim_tag attribute
* -o noopt now disables the peephole optimizer
* Add get_code_transformers() and set_code_transformers() functions
  to the sys module
* Add PyCF_TRANSFORMED_AST compiler flag
* Add test_code_transformer unit tests
* Change how importlib generated the .pyc filename: it now also uses
  the sys.implementation.optim_tag
* Add _PySys_CodeTransformer structure
@mention-bot

Copy link
Copy Markdown

@Haypo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @freddrake, @benjaminp and @serhiy-storchaka to be potential reviewers.

@vstinner

Copy link
Copy Markdown
Member Author

The change introduces a reference leak:

haypo@selma$ ./python -m test -R 3:3 test_sys
test_sys leaked [3, 3, 3] references, sum=9
test_sys leaked [3, 4, 3] memory blocks, sum=10

@vstinner

Copy link
Copy Markdown
Member Author

I rejected my own PEP 511, so I abandon this PR.
https://mail.python.org/pipermail/python-dev/2017-October/149903.html

@vstinner vstinner closed this Oct 17, 2017
@vstinner vstinner deleted the code_transformer branch October 17, 2017 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants