pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/43231: xentools33: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
>Number: 43231
>Category: pkg
>Synopsis: xentools33: DeprecationWarning: the sha module is deprecated;
>use the hashlib module instead
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Apr 30 12:45:00 +0000 2010
>Originator: Christophe Romain
>Release: 5.99.27
>Organization:
ProcessONE
>Environment:
NetBSD master.lan 5.99.27 NetBSD 5.99.27 (XEN3PAE_DOM0) #0: Mon Apr 26 08:13:15
UTC 2010
builds%b8.netbsd.org@localhost:/home/builds/ab/HEAD/i386/201004260000Z-obj/home/builds/ab/HEAD/src/sys/arch/i386/compile/XEN3PAE_DOM0
i386
xentools33-3.3.2nb2
xenkernel33-3.3.2
python26-2.6.4nb4
>Description:
/usr/pkg/lib/python2.6/site-packages/xen/util/acmpolicy.py imports sha module.
Python said this module is deprecated and displays a warning message.
>How-To-Repeat:
sh# xm list
/usr/pkg/lib/python2.6/site-packages/xen/util/acmpolicy.py:20:
DeprecationWarning: the sha module is deprecated; use the hashlib module instead
>Fix:
--- ./acmpolicy.py 2010-04-30 14:25:46.000000000 +0200
+++ ./acmpolicy-fixed.py 2010-04-30 14:28:10.000000000 +0200
@@ -17,7 +17,7 @@
#============================================================================
import os
-import sha
+import hashlib
import stat
import array
import struct
@@ -1103,7 +1103,7 @@
def hash(self):
""" Calculate a SAH1 hash of the XML policy """
- return sha.sha(self.toxml())
+ return hashlib.sha(self.toxml())
def save(self):
### Save the XML policy into a file ###
Home |
Main Index |
Thread Index |
Old Index