[python-debian/master] module switch "sha" -> "hashlib": 2.6 deprecation warning
Stefano Zacchiroli
zack at upsilon.cc
Tue Apr 7 08:33:49 UTC 2009
As a consequence, update pyversions to require a minimum of Python
2.5, which shipped hashlib for the first time.
(Closes: #518427)
---
debian/changelog | 3 +++
debian/pyversions | 2 +-
debian_bundle/debian_support.py | 4 ++--
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 5e5f21b..4910ff9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ python-debian (0.1.13) unstable; urgency=low
* change naming convention to match PEP 8, with backward compatibility
(and deprecation warnings) for all old names. Thanks to Ben Finney for
the patch. (Closes: #489722)
+ * Switch from "sha" module to "hashlib": fix a deprecation warning of
+ Python 2.6. As a consequence, update pyversions to require a minimum
+ of Python 2.5, which is available also in stable now. (Closes: #518427)
-- Stefano Zacchiroli <zack at debian.org> Tue, 07 Apr 2009 10:21:04 +0200
diff --git a/debian/pyversions b/debian/pyversions
index 8b253bc..b3dc41e 100644
--- a/debian/pyversions
+++ b/debian/pyversions
@@ -1 +1 @@
-2.4-
+2.5-
diff --git a/debian_bundle/debian_support.py b/debian_bundle/debian_support.py
index 0f2e0c9..1e1a668 100644
--- a/debian_bundle/debian_support.py
+++ b/debian_bundle/debian_support.py
@@ -19,7 +19,7 @@
import os
import re
-import sha
+import hashlib
import types
from deprecation import function_deprecated_by
@@ -185,7 +185,7 @@ del listReleases
del list_releases
def read_lines_sha1(lines):
- m = sha.new()
+ m = hashlib.sha1()
for l in lines:
m.update(l)
return m.hexdigest()
--
1.5.6.5
More information about the pkg-python-debian-commits
mailing list