Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swap to bytecode patching? #826

Open
thehesiod opened this issue Aug 31, 2020 · 7 comments
Open

swap to bytecode patching? #826

thehesiod opened this issue Aug 31, 2020 · 7 comments

Comments

@thehesiod
Copy link
Collaborator

Instead of us generating tons of copy/pasted code for sections where we're only adding an await perhaps we should think about swapping to bytecode patching. There are helpers like bytecode and codetransformer that could help

the worry I would have is for debugging. As long as it would match up line for line I think it would be ok, definitely would be a little weird ;)

@thehesiod
Copy link
Collaborator Author

@terrycain thoughts?

@thehesiod
Copy link
Collaborator Author

@jettify ?

@graingert
Copy link
Contributor

@thehesiod I strongly recommend going the other way around with https://pypi.org/project/unasync/ and having botocore be generated from aiobotocore

@thehesiod
Copy link
Collaborator Author

we can't generate botocore from aiobotocore, botocore is the truth, aiobotocore is a third party enhancement

@terricain
Copy link
Collaborator

Got any references/examples of it? sounds cool/scary/error-prone 😄

@thehesiod
Copy link
Collaborator Author

@terrycain exactly, lol I was looking at this: https://rushter.com/blog/python-bytecode-patch/ that referenced those modules, I need to spend some time to play around with it

@thehesiod
Copy link
Collaborator Author

thehesiod commented Sep 8, 2020

I think it combined with the patch checker would be ok, but ya debugging would suk, unless we generate python code from the bytecode and add them as reference files, actually that would be cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants