diff options
-rw-r--r-- | rdflib/term.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rdflib/term.py b/rdflib/term.py index 16a7b951..bc1b607d 100644 --- a/rdflib/term.py +++ b/rdflib/term.py @@ -172,6 +172,7 @@ class URIRef(Identifier): Supported for backwards compatibility; new code should probably just use __hash__ """ + warnings.warn("method md5_term_hash is deprecated, and will be removed in the future. If you use this please let rdflib-dev know!", category=DeprecationWarning, stacklevel=2) d = md5(self.encode()) d.update(b("U")) return d.hexdigest() @@ -333,6 +334,7 @@ class BNode(Identifier): Supported for backwards compatibility; new code should probably just use __hash__ """ + warnings.warn("method md5_term_hash is deprecated, and will be removed in the future. If you use this please let rdflib-dev know!", category=DeprecationWarning, stacklevel=2) d = md5(self.encode()) d.update(b("B")) return d.hexdigest() @@ -900,6 +902,7 @@ class Literal(Identifier): Supported for backwards compatibility; new code should probably just use __hash__ """ + warnings.warn("method md5_term_hash is deprecated, and will be removed in the future. If you use this please let rdflib-dev know!", category=DeprecationWarning, stacklevel=2) d = md5(self.encode()) d.update(b("L")) return d.hexdigest() @@ -1030,6 +1033,7 @@ class Variable(Identifier): Supported for backwards compatibility; new code should probably just use __hash__ """ + warnings.warn("method md5_term_hash is deprecated, and will be removed in the future. If you use this please let rdflib-dev know!", category=DeprecationWarning, stacklevel=2) d = md5(self.encode()) d.update(b("V")) return d.hexdigest() @@ -1038,7 +1042,7 @@ class Variable(Identifier): class Statement(Node, tuple): def __new__(cls, (subject, predicate, object), context): - warnings.warn("Class Statement is deprecated.", category=DeprecationWarning, stacklevel=2) + 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): |