Skip to content

Refactor conditional loading of ThreadPoolExecutor #125

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

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

alex-pewpew
Copy link
Contributor

Description of changes:

  • Move ThreadPoolExecutor imports from lazy to "not as lazy". It offloads unnecessary work from actual invocations, especially the first one. Existing tests are already covering affected code paths and components
  • ThreadPoolExecutor is still imported as a private dependency of a LambdaRuntimeClient, not exposing the symbols imported conditionally
  • Fix tests - the latest runtimes have changed unittest.mock.patch behavior, when sys.stdout patching does not work as expected in certain combinations with other @patch'es in our testcases

Target (OCI, Managed Runtime, both): Both

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@alex-pewpew alex-pewpew merged commit c7fec7e into aws:main Oct 30, 2023
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.

3 participants