gjhiggins/rdflib — Issue #74: hashlib warning importing sqlite
Author: gjhiggins
Created: 2011-10-19 01:12:13+00:00
State: open

Originally filed by coryd...@gmail.com on 2009-07-14T18:31:43

What steps will reproduce the problem?

Run this code:

from rdflib import plugin
from rdflib.store import Store
plugin.get('SQLite', Store)

What is the expected output? What do you see instead?
Expected *no* output.

Instead I see
/usr/local/lib/python2.6/dist-packages/rdflib-2.4.2_cdd1-py2.6-linux-x86_64.egg/rdflib/store/SQLite.py:11:
DeprecationWarning: the sha module is deprecated; use the hashlib module
instead
import sha,re,os

If pre-python2.5-compatibility is desired, it's very easy to write a
wrapper for it keep compat and eliminate the warning. (Twisted currently
has one in twisted.python.hashlib.)