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
Don't register berkelydb as a store if it is not available on the system #1816
Comments
Gonna try working on this, would adding some kind of availability check in the |
Also, I'm assuming the method should check if all plugins are available. Should I do that or just have a specific check for berkelydb? |
Hi @Jtmcflea I think first and most critical is to just not register plugins we know won't work, sadly there is no generic check we can do for all plugins, we know berkeleydb won't work unless we can import So I would suggest just do it for berkeleydb. |
Ok, I've moved the berkeleydb register to the top of the list and added Any more tests or formatting things I might need to do? Sorry to ask, but I'm new at open source contribution in general. |
Currently we are always registering BerkelyDB regardless of whether it is available or not:
rdflib/rdflib/plugin.py
Lines 202 to 207 in cdaee27
This causes problems if we want to operate on all stores, for example to test some functionality, as a special exception is needed for BerkeleyDB:
rdflib/test/test_graph/test_graph.py
Lines 68 to 84 in 13ec1df
I think it would be best to only register the plugin if the store is available.
The text was updated successfully, but these errors were encountered: