Increase get_package_properties timeout #13109
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Some packages may take a very long time to import, which can spuriously trip the timeout in
ModuleInspect
. To make this less likely, increase the timeout from 5s to 30s.Test Plan
I could use some help with how to write an appropriate test, as it doesn't seem to obviously match any existing tests (somewhat pep561.test though it's unclear how that handles the test package). I think the general idea is to write a test that simply tries to inspect a test package whose
__init__.py
looks like:This works to reproduce the failure by attempting to run
stubgen
on the above.An example of this failure occurring "in the wild" can be seen here.