feat: Deprecate custom NotFoundError in favor of built-in FileNotFoundError #487
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.
Custom exceptions with multiple inheritance are not currently possible in pyo3 (at least to define on the Rust side). See PyO3/pyo3#4979
You could have a custom exception with multiple inheritance if you defined it on the Python side and then imported it into Rust... but then that would leak into
pyo3-object_store
and I want that to be self contained and not require other users ofpyo3-object_store
to have a dependency on some Python package where the exception is defined.So I think the best way forward for now is to choose one or the other. Since we're already using FileNotFoundError, let's just use that one.
The primary downside is that
obstore.exceptions.BaseError
is not universally the base of everything we raise.Closes #197, closes #199