get rid of deprecation warning from the md5 use

epel9
Seth Vidal 16 years ago
parent 5589527d30
commit 7f95ae71f2

@ -0,0 +1,38 @@
--- a/urlgrabber/keepalive.py~ 2009-03-13 10:45:27.000000000 -0400
+++ b/urlgrabber/keepalive.py 2009-03-13 10:45:27.000000000 -0400
@@ -475,7 +475,7 @@
keepalive_handler.close_all()
def continuity(url):
- import md5
+ import hashlib
format = '%25s: %s'
# first fetch the file with the normal http handler
@@ -484,7 +484,7 @@
fo = urllib2.urlopen(url)
foo = fo.read()
fo.close()
- m = md5.new(foo)
+ m = hashlib.md5(foo)
print format % ('normal urllib', m.hexdigest())
# now install the keepalive handler and try again
@@ -494,7 +494,7 @@
fo = urllib2.urlopen(url)
foo = fo.read()
fo.close()
- m = md5.new(foo)
+ m = hashlib.md5(foo)
print format % ('keepalive read', m.hexdigest())
fo = urllib2.urlopen(url)
@@ -504,7 +504,7 @@
if f: foo = foo + f
else: break
fo.close()
- m = md5.new(foo)
+ m = hashlib.md5(foo)
print format % ('keepalive readline', m.hexdigest())
def comp(N, url):

@ -3,7 +3,7 @@
Summary: A high-level cross-protocol url-grabber Summary: A high-level cross-protocol url-grabber
Name: python-urlgrabber Name: python-urlgrabber
Version: 3.0.0 Version: 3.0.0
Release: 13%{?dist} Release: 14%{?dist}
Source0: urlgrabber-%{version}.tar.gz Source0: urlgrabber-%{version}.tar.gz
Patch0: urlgrabber-keepalive.patch Patch0: urlgrabber-keepalive.patch
Patch1: urlgrabber-string-type.patch Patch1: urlgrabber-string-type.patch
@ -14,6 +14,7 @@ Patch5: urlgrabber-grab-no-range.patch
Patch6: urlgrabber-no-ssl-ok.patch Patch6: urlgrabber-no-ssl-ok.patch
Patch7: urlgrabber-extra-progress.patch Patch7: urlgrabber-extra-progress.patch
Patch8: urlgrabber-file-checkfunc.patch Patch8: urlgrabber-file-checkfunc.patch
Patch9: md5-hashlib.patch
License: LGPLv2+ License: LGPLv2+
Group: Development/Libraries Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@ -38,6 +39,8 @@ authentication, proxies and more.
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1 %patch8 -p1
%patch9 -p1
%build %build
python setup.py build python setup.py build
@ -56,6 +59,9 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/urlgrabber %{_bindir}/urlgrabber
%changelog %changelog
* Fri Mar 13 2009 Seth Vidal <skvidal at fedoraproject.org>
- kill deprecation warning from importing md5 if anyone uses keepalive
* Mon Mar 9 2009 Seth Vidal <skvidal at fedoraproject.org> * Mon Mar 9 2009 Seth Vidal <skvidal at fedoraproject.org>
- apply patch for urlgrabber to properly check file:// urls with the checkfunc - apply patch for urlgrabber to properly check file:// urls with the checkfunc

Loading…
Cancel
Save