Uh oh!
There was an error while loading. Please reload this page.
feat: Deprecate custom NotFoundError in favor of built-in FileNotFoundError - #487
Conversation
lukasbindreiter
commented
Jun 24, 2025
The only small downside with fully using fromobstore.storeimportMemoryStoreMemoryStore().get("non-existent") # FileNotFoundError# no files involved anywhereI guess that's why the exception in obstore was just named |
kylebarron
commented
Jun 24, 2025
All stores will raise the same exceptions, that's for sure. Having different stores raise different exceptions would be so confusing IMO |
lukasbindreiter
commented
Jun 25, 2025
yeah for sure, totally agree with that. Just wanted to mention that |
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_storeand I want that to be self contained and not require other users ofpyo3-object_storeto 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.BaseErroris not universally the base of everything we raise.Closes#197, closes#199