Remove singly-used alias obviated by IdentifiedNode by ajnelson-nist · Pull Request #1695 · RDFLib/rdflib (original) (raw)

I think the best options here are:

  1. Remove ContextNode and DatasetQuad and change Dataset.__iter__ as follow:

This captures the current reality of what is advertised in Graph (though URIRef is also another issue, we should probably narrow the types accepted by Graph.add to match this) 2. Remove ContextNode and DatasetQuad and change Graph.__init__ as follow:
diff --git a/rdflib/graph.py b/rdflib/graph.py
index 6d1ed084..55005574 100644
--- a/rdflib/graph.py
+++ b/rdflib/graph.py
@@ -325,7 +325,7 @@ class Graph(Node):
def init(
self,
store: Union[Store, str] = "default",

I somewhat favor option 2, as I think this is the more correct thing to do. We don't want to advertise to people that they should be passing values in as graph identifiers that are not inline with RDF 1.1 - and if they still want to they can use type ignores.