Skip to content

Commit

Permalink
Merge pull request RDFLib#1496 from veyndan/veyndan/rm-deprecated-Sta…
Browse files Browse the repository at this point in the history
…tement

Remove deprecated Statement class
  • Loading branch information
nicholascar committed Dec 11, 2021
2 parents 0cbc93e + a5b6aec commit 4f3b499
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
2 changes: 0 additions & 2 deletions rdflib/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ def __get_node_pickler(self):
from rdflib.term import Literal
from rdflib.graph import Graph, QuotedGraph
from rdflib.term import Variable
from rdflib.term import Statement

self.__node_pickler = np = NodePickler()
np.register(self, "S")
Expand All @@ -168,7 +167,6 @@ def __get_node_pickler(self):
np.register(Graph, "G")
np.register(QuotedGraph, "Q")
np.register(Variable, "V")
np.register(Statement, "s")
return self.__node_pickler

node_pickler = property(__get_node_pickler)
Expand Down
19 changes: 0 additions & 19 deletions rdflib/term.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"BNode",
"Literal",
"Variable",
"Statement",
]

import logging
Expand Down Expand Up @@ -1739,24 +1738,6 @@ def __reduce__(self):
return (Variable, (str(self),))


class Statement(Node, tuple):
def __new__(cls, triple, context):
subject, predicate, object = triple
warnings.warn(
"Class Statement is deprecated, and will be removed in "
+ "the future. If you use this please let rdflib-dev know!",
category=DeprecationWarning,
stacklevel=2,
)
return tuple.__new__(cls, ((subject, predicate, object), context))

def __reduce__(self):
return (Statement, (self[0], self[1]))

def toPython(self):
return (self[0], self[1])


# Nodes are ordered like this
# See http://www.w3.org/TR/sparql11-query/#modOrderBy
# we leave "space" for more subclasses of Node elsewhere
Expand Down

0 comments on commit 4f3b499

Please sign in to comment.