rpms/TurboGears/devel turbogears-deprecation.patch, NONE, 1.1 TurboGears.spec, 1.52, 1.53
Toshio くらとみ
toshio at fedoraproject.org
Wed Jan 13 23:11:46 UTC 2010
- Previous message: rpms/kbackup/F-11 kbackup-0.6.3-desktop.diff, NONE, 1.1 kbackup-0.6.3-fr.po.diff, NONE, 1.1 kbackup-0.6.3-index.docbook-fr.diff, NONE, 1.1 .cvsignore, 1.6, 1.7 sources, 1.6, 1.7
- Next message: rpms/pam_pkcs11/devel pam_pkcs11.spec,1.33,1.34
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: toshio
Update of /cvs/pkgs/rpms/TurboGears/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6367
Modified Files:
TurboGears.spec
Added Files:
turbogears-deprecation.patch
Log Message:
* Wed Jan 13 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 1.0.9-3
- Fix deprecation warnings
turbogears-deprecation.patch:
identity/__init__.py | 15 +++++++++++----
visit/api.py | 7 +++++--
2 files changed, 16 insertions(+), 6 deletions(-)
--- NEW FILE turbogears-deprecation.patch ---
Index: TurboGears-1.0.9/turbogears/identity/__init__.py
===================================================================
--- TurboGears-1.0.9.orig/turbogears/identity/__init__.py
+++ TurboGears-1.0.9/turbogears/identity/__init__.py
@@ -6,8 +6,15 @@
"""
-import md5
-import sha
+try:
+ from hashlib import md5
+except ImportError:
+ from md5 import new as md5
+try:
+ from hashlib import sha1
+except ImportError:
+ from sha import new as sha1
+
import threading
import cherrypy
@@ -148,9 +155,9 @@ def _encrypt_password(algorithm, passwor
else:
password_8bit = password
if algorithm == 'md5':
- hashed_password = md5.new(password_8bit).hexdigest()
+ hashed_password = md5(password_8bit).hexdigest()
elif algorithm == 'sha1':
- hashed_password = sha.new(password_8bit).hexdigest()
+ hashed_password = sha1(password_8bit).hexdigest()
elif algorithm == 'custom':
custom_encryption_path = turbogears.config.get(
'identity.custom_encryption', None)
Index: TurboGears-1.0.9/turbogears/visit/api.py
===================================================================
--- TurboGears-1.0.9.orig/turbogears/visit/api.py
+++ TurboGears-1.0.9/turbogears/visit/api.py
@@ -1,5 +1,8 @@
import logging
-import sha
+try:
+ from hashlib import sha1
+except ImportError:
+ from sha import new as sha1
import threading
import time
@@ -255,7 +258,7 @@ class VisitFilter(BaseFilter):
# it's basically more noise.
key_string = '%s%s%s%s' % (random(), datetime.now(),
cherrypy.request.remote_host, cherrypy.request.remote_port)
- return sha.new(key_string).hexdigest()
+ return sha1(key_string).hexdigest()
_generate_key = staticmethod(_generate_key)
def clear_cookie(self):
Index: TurboGears.spec
===================================================================
RCS file: /cvs/pkgs/rpms/TurboGears/devel/TurboGears.spec,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -p -r1.52 -r1.53
--- TurboGears.spec 17 Dec 2009 23:05:38 -0000 1.52
+++ TurboGears.spec 13 Jan 2010 23:11:45 -0000 1.53
@@ -3,7 +3,7 @@
Name: TurboGears
Version: 1.0.9
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Back-to-front web development in Python
Group: Development/Languages
@@ -17,6 +17,7 @@ Patch1: %{name}-1.0.8-setup.patc
Patch3: feedkid.diff
# Reported upstream
Patch4: turbogears-sqlcreate.patch
+Patch5: turbogears-deprecation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -76,6 +77,7 @@ TurboGears is easy to use for a wide ran
%patch1 -b .setup
%patch3 -p0 -b .feedkid
%patch4 -p1 -b .sqlcreate
+%patch5 -p1 -b .depr
%build
%{__python} setup.py build
@@ -98,6 +100,9 @@ rm -rf %{buildroot}
%{python_sitelib}/turbogears/
%changelog
+* Wed Jan 13 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 1.0.9-3
+- Fix deprecation warnings
+
* Thu Dec 17 2009 Toshio Kuratomi <toshio at fedoraproject.org> - 1.0.9-2
- Update sql create patch for traceback when used in development mode RHBZ#548594
- Previous message: rpms/kbackup/F-11 kbackup-0.6.3-desktop.diff, NONE, 1.1 kbackup-0.6.3-fr.po.diff, NONE, 1.1 kbackup-0.6.3-index.docbook-fr.diff, NONE, 1.1 .cvsignore, 1.6, 1.7 sources, 1.6, 1.7
- Next message: rpms/pam_pkcs11/devel pam_pkcs11.spec,1.33,1.34
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list