Skip to content

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

2 participants