Skip to content

Conversation

@paxtonfitzpatrick
Copy link
Member

Account for the possibility that a smuggled package might use the deprecated pkg_resources.get_distribution() method of getting its version string from its metadata, instead of importlib.metadata. If so, pkg_resources's cached working set won't include the new package and importing it after installing it will fail.

Added a couple lines to davos to reload pkg_resources and bust its cache if it's been imported during the current interpreter's lifetime to account for this.

@paxtonfitzpatrick paxtonfitzpatrick merged commit 5b8c55e into ContextLab:main Aug 7, 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.

1 participant