diff options
author | Gunnar Aastrand Grimnes <gromgull@gmail.com> | 2012-11-17 21:45:02 +0100 |
---|---|---|
committer | Gunnar Aastrand Grimnes <gromgull@gmail.com> | 2012-11-17 21:45:02 +0100 |
commit | da696ffe4b384eecc1b5e3e083806f30a27943d1 (patch) | |
tree | 5f9056003ef2e70bf42d0fd723f7725b6076727e /rdflib/term.py | |
parent | 9fb30e528d6d0220342819fd3934928f3e6226fd (diff) | |
download | rdflib-da696ffe4b384eecc1b5e3e083806f30a27943d1.tar.gz |
deprecated node.md5_term_hash
Diffstat (limited to 'rdflib/term.py')
-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): |