-
Notifications
You must be signed in to change notification settings - Fork 547
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
Allow NamespaceManager
"unbind" by passing None for a namespace
#1932
Comments
There are API-breaking changes in the pipeline (actually in current master, tbh) and Glad to read that rdflib-sqlalchemy already supports I think that only leaves Thomas Tanon's oxrdflib ¹ basically: those in FWIW: current state-of-play w.r.t. viable RDFLib persistence-backed stores - performance stats (time in seconds) on a graph of ~500k triples: ...
loading from an in-memory Graph, opening a previously-saved store, length |
Referring to the new
It doesn't. I was talking about a different store, but only w.r.t. accepting
You mean openworm/rdflib-zodb? You're welcome to. I'm unlikely to put much effort in merging back because I don't intend to go back to using the official rdflib-zodb. |
Issue #1880 pertains
Aha, my mistake, I grepped for
Thank you. |
Got somewhat off-track in this issue: Regarding "principle of least surprise", I don't think |
Currently, there's not a clean way to remove namespace bindings from a
NamespaceManager
. I'm proposing to allowNamespaceManager.bind(prefix, None, replace=True)
to signal to Stores that they should clear the binding for the given prefix.Currently, there isn't a sensible use for binding to None -- it creates a binding to the value
URIRef("None")
which probably isn't what's intended.One alternative to this is defining a new method on
NamespaceManager
, say "unbind" or "remove", that does this. The advantage to that is that existingStore
implementations wouldn't have to handle theNone
namespace case. The disadvantage is that it requires a new method to support the behavior although some (like mine) already support this.A disadvantage of allowing
unbind
by passingNone
is that it's somethingStore
impls would need some kind of marker attribute (e.g.,bind_none_is_unbind
) to indicate they support it to avoid sending them unexpected input. One advantage is that it's fairly simple to implement without changing the formal API (as opposed to what I'd call the "service provider interface" or "plugin interface" forStore
implementations).related: #543
The text was updated successfully, but these errors were encountered: