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

Avoid import of pkg_resource with Starlette integration #1836

Merged
merged 2 commits into from Jan 19, 2023

Conversation

mgu
Copy link
Contributor

@mgu mgu commented Jan 14, 2023

By changing the order in the condition, we can avoid the call to _get_installed_modules at import time (which imports pkg_resources) when the mechanism_type is set to "starlette".

I have validated the change using PYTHONPROFILEIMPORTTIME=1.

Tell me if such a change requires a link to an issue or some testing.

By changing the order in the condition, we can avoid the call to
`_get_installed_modules` (which imports `pkg_resources`) when the
`mechanism_type` is set to `"starlette"`.
@antonpirker antonpirker enabled auto-merge (squash) January 19, 2023 10:54
@antonpirker antonpirker merged commit f6af7a0 into getsentry:master Jan 19, 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.

None yet

2 participants