Fix an issue where the _thirdparty package is not distributed correctly #90
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
This is the root cause of the library where the azure.functions._thirdparty sub-folder failed to reload properly.
The dangling _thirdparty folder is not being treated as a proper Python module.
Thus, when poping out from
sys.modules
, it is not being recognized as a part of azure.functions. Thus, the topology graph is not built out correctly when removing caches from sys.modules.Related PR
Azure/azure-functions-python-worker#854
See how azure_functions_worker distribute the _thirdparty package properly
It has __init__.py file defined in it: https://github.com/Azure/azure-functions-python-worker/tree/dev/azure_functions_worker/_thirdparty
It is being included in setup.py: https://github.com/Azure/azure-functions-python-worker/blob/dev/setup.py#L389
How this is found
Using this following code for reloading module.
Failed with
Attempt to remove module cache for azure.functions._thirdparty but failed with 'azure.functions'. Using the original module cache.
More to investigate
I'm not quite sure why this is triggered when the module is hot-reloaded (a.k.a. Linux Consumption). This should also fail in D