-
Notifications
You must be signed in to change notification settings - Fork 577
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersstoreRelated to a store.Related to a store.
Description
Currently we are always registering BerkelyDB regardless of whether it is available or not:
Lines 202 to 207 in cdaee27
register( | |
"BerkeleyDB", | |
Store, | |
"rdflib.plugins.stores.berkeleydb", | |
"BerkeleyDB", | |
) |
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
def get_store_names() -> Set[Optional[str]]: | |
names: Set[Optional[str]] = {*get_unique_plugin_names(plugin.Store)} | |
names.difference_update({ | |
"default", | |
"Memory", | |
"Auditable", | |
"Concurrent", | |
"SPARQLStore", | |
"SPARQLUpdateStore", | |
"SimpleMemory", | |
}) | |
names.add(None) | |
if not has_bsddb: | |
names.remove("BerkeleyDB") | |
logging.debug("names = %s", names) | |
return names |
I think it would be best to only register the plugin if the store is available.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersstoreRelated to a store.Related to a store.