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

Improve handling of optional packages #27

Merged
merged 4 commits into from
Oct 21, 2024
Merged

Conversation

nhairs
Copy link
Owner

@nhairs nhairs commented Oct 21, 2024

Improves handling of optional packages by:

  • No importing them just to check if available
  • Raises a more specific type of error (and message)

Test Plan

  • Run unit tests

@nhairs nhairs merged commit a1daea2 into main Oct 21, 2024
28 checks passed
@nhairs nhairs deleted the nhairs-optional-extras branch October 21, 2024 10:42
@nhairs nhairs linked an issue Oct 21, 2024 that may be closed by this pull request
bharel pushed a commit to bharel/python-json-logger that referenced this pull request Oct 22, 2024
Improves handling of optional packages by:

- No importing them just to check if available
- Raises a more specific type of error (and message)

### Test Plan

- Run unit tests
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.

Move to importlib.util.find_spec for checking if packages are installed
1 participant