From 35597279b09a28a290e4d2f4adaaada3ac58e4ca Mon Sep 17 00:00:00 2001 From: jlstevens Date: Wed, 25 Feb 2015 03:20:51 +0000 Subject: [PATCH] Import sha256 from hashlib for Python 3 compatibility --- holoviews/ipython/magics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/holoviews/ipython/magics.py b/holoviews/ipython/magics.py index a7a0d82f4b..73a4e9d819 100644 --- a/holoviews/ipython/magics.py +++ b/holoviews/ipython/magics.py @@ -1,7 +1,7 @@ import string import time import os -import sha +from hashlib import sha256 try: from IPython.core.magic import Magics, magics_class, cell_magic, line_magic, line_cell_magic from IPython.core.pylabtools import print_figure @@ -327,7 +327,7 @@ def _save_filename(cls, fmt): @classmethod def _digest(cls, data): if cls._generate_SHA: - hashfn = sha.new() + hashfn = sha256() hashfn.update(data) cls._SHA = hashfn.hexdigest() return True