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

python dynamic analysis: support async and generator function execution #968

Merged
merged 3 commits into from
Nov 16, 2023

Conversation

maxfisher-g
Copy link
Contributor

@maxfisher-g maxfisher-g commented Nov 14, 2023

This PR improves the automated execution capability of dynamic analysis, to support execution of async functions/methods and generator objects.

Async functions are awaited in a single-threaded manner and the result returned, while generator functions are iterated through and the results returned in a list.

Async generator functions are also supported, by combining the above approaches.

Copy link
Contributor

@calebbrown calebbrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest running this in the e2e environment for PyPI for a short while to ensure there aren't any edge cases we haven't considered that may do unexpected things (although I do appreciate that it may be hard to wade through the logs).

@maxfisher-g maxfisher-g merged commit 0adf417 into main Nov 16, 2023
11 checks passed
@maxfisher-g maxfisher-g deleted the python_async_code_execution branch November 16, 2023 05:11
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.

2 participants