Your message dated Tue, 10 Jul 2012 14:47:43 +0000
with message-id <[email protected]>
and subject line Bug#581721: fixed in python-django-registration 0.8-1
has caused the Debian Bug report #581721,
regarding python-django-registration: sha deprecation warning emitted
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
581721: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581721
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python-django-registration
Version: 0.7-2
Severity: normal
Tags: patch

Using django-registration models or running its tests
with python 2.6+ emits deprecation warning like the following:

> /usr/lib/pymodules/python2.6/registration/models.py:4:
> DeprecationWarning: the sha module is deprecated; use the hashlib module
> instead
>   import sha



-- System Information:
Debian Release: squeeze/sid
  APT prefers karmic-updates
  APT policy: (990, 'karmic-updates'), (990, 'karmic-security'), (990, 
'karmic'), (650, 'lucid')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-21-generic (SMP w/4 CPU cores)
Locale: LANG=uk_UA.UTF-8, LC_CTYPE=uk_UA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-django-registration depends on:
ii  python                    2.6.4-0ubuntu1 An interactive high-level object-o
ii  python-django             1.1.1-1ubuntu1 High-level Python web development 
ii  python-support            1.0.3ubuntu1   automated rebuilding support for P

python-django-registration recommends no packages.

python-django-registration suggests no packages.

-- no debconf information
--- Begin Message ---
Use django.util.hashcompat to avoid
deprecation warnings for SHA on Python 2.6+

Signed-off-by: Ihor Kaharlichenko <[email protected]>

---
 registration/models.py |    6 +++---
 registration/tests.py  |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/registration/models.py b/registration/models.py
index d13a07a..b5bf28b 100644
--- a/registration/models.py
+++ b/registration/models.py
@@ -1,11 +1,11 @@
 import datetime
 import random
 import re
-import sha
 
 from django.conf import settings
 from django.db import models
 from django.template.loader import render_to_string
+from django.utils.hashcompat import sha_constructor
 from django.utils.translation import ugettext_lazy as _
 from django.contrib.auth.models import User
 from django.contrib.sites.models import Site
@@ -137,8 +137,8 @@ class RegistrationManager(models.Manager):
         username and a random salt.
         
         """
-        salt = sha.new(str(random.random())).hexdigest()[:5]
-        activation_key = sha.new(salt+user.username).hexdigest()
+        salt = sha_constructor(str(random.random())).hexdigest()[:5]
+        activation_key = sha_constructor(salt+user.username).hexdigest()
         return self.create(user=user,
                            activation_key=activation_key)
         
diff --git a/registration/tests.py b/registration/tests.py
index 96a24fa..098a286 100644
--- a/registration/tests.py
+++ b/registration/tests.py
@@ -20,7 +20,6 @@ getting django-registration running in the default setup, to 
wit:
 """
 
 import datetime
-import sha
 
 from django.conf import settings
 from django.contrib.auth.models import User
@@ -28,6 +27,7 @@ from django.core import mail
 from django.core import management
 from django.core.urlresolvers import reverse
 from django.test import TestCase
+from django.utils.hashcompat import sha_constructor
 
 from registration import forms
 from registration.models import RegistrationProfile
@@ -103,7 +103,7 @@ class RegistrationModelTests(RegistrationTestCase):
         self.failIf(RegistrationProfile.objects.activate_user('foo'))
         
         # Activating from a key that doesn't exist returns False.
-        
self.failIf(RegistrationProfile.objects.activate_user(sha.new('foo').hexdigest()))
+        
self.failIf(RegistrationProfile.objects.activate_user(sha_constructor('foo').hexdigest()))
 
     def test_account_expiration_condition(self):
         """
@@ -314,5 +314,5 @@ class RegistrationViewTests(RegistrationTestCase):
 
         # Nonexistent key sets the account to False.
         response = self.client.get(reverse('registration_activate',
-                                           kwargs={ 'activation_key': 
sha.new('foo').hexdigest() }))
+                                           kwargs={ 'activation_key': 
sha_constructor('foo').hexdigest() }))
         self.failIf(response.context['account'])
-- 
tg: (0c68f39..) fix/sha_warning (depends on: master)

--- End Message ---

--- End Message ---
--- Begin Message ---
Source: python-django-registration
Source-Version: 0.8-1

We believe that the bug you reported is fixed in the latest version of
python-django-registration, which is due to be installed in the Debian FTP 
archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Raphaël Hertzog <[email protected]> (supplier of updated 
python-django-registration package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 10 Jul 2012 16:04:20 +0200
Source: python-django-registration
Binary: python-django-registration
Architecture: source all
Version: 0.8-1
Distribution: unstable
Urgency: low
Maintainer: Debian Python Modules Team 
<[email protected]>
Changed-By: Raphaël Hertzog <[email protected]>
Description: 
 python-django-registration - User-registration application for Django
Closes: 581721
Changes: 
 python-django-registration (0.8-1) unstable; urgency=low
 .
   * New upstream release.
     - Now fully compatible with Django 1.4 which is in Debian Wheezy.
     - No longer use the deprecated "sha" module. Closes: #581721
   * Update Standards-Version to 3.9.3.
   * Replace python-docutil build-dependency by one on python-sphinx to be able
     to generate the HTML documentation with the new upstream makefile.
   * Update the dh_auto_build override to include the "make html" call
     that generates the documentation and create
     debian/python-django-registration.docs to install the generated
     documentation.
   * Create a dh_auto_clean override to remove the (upstream provided and)
     generated documentation in docs/_build/html.
   * Use dh_sphinxdoc to get rid of embedded javascript files that sphinx-build
     generates. Add accordingly ${sphinxdoc:Depends} to Depends.
   * Update the doc-base registration to use the new path for the HTML
     documentation.
Checksums-Sha1: 
 9d835a257a19405d65288a15310a393f9ce97f02 2382 
python-django-registration_0.8-1.dsc
 dad889947ad88f355855ab5f4dd833470141ae6b 284427 
python-django-registration_0.8.orig.tar.gz
 be389888ef4c3cfefe7dc6c6c9a05461771f670c 4843 
python-django-registration_0.8-1.debian.tar.gz
 07e3250e38525a6c00d87dec2fe87dd976e02031 111220 
python-django-registration_0.8-1_all.deb
Checksums-Sha256: 
 01315a7fbe76e2ac8d0f16eb357bb46cd612983c4ec6b63eca731e466c04390a 2382 
python-django-registration_0.8-1.dsc
 a9062db28a2f06cb710a07444141d9ec1c499b08502f244f27a002f3e7230f0b 284427 
python-django-registration_0.8.orig.tar.gz
 ee3a7bee646334e7c2ef1f1827127d0fa60847499479a018c09c9c998feef2e8 4843 
python-django-registration_0.8-1.debian.tar.gz
 533feadff1136e9ba7c0411ed4493548671cba7dc7051d0327f20544ac1fbb4a 111220 
python-django-registration_0.8-1_all.deb
Files: 
 b9f7e94e18e7a4ad6d83d24aa11210b6 2382 python optional 
python-django-registration_0.8-1.dsc
 d3e785858e0040a6c3201acd43409b2e 284427 python optional 
python-django-registration_0.8.orig.tar.gz
 07cf386c36b13b43bc21fa8e74408c73 4843 python optional 
python-django-registration_0.8-1.debian.tar.gz
 51030f286894128761beca7a11fc2a16 111220 python optional 
python-django-registration_0.8-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Signed by Raphael Hertzog

iQIcBAEBCAAGBQJP/DrKAAoJEOYZBF3yrHKaRTsP/0UvSn//N6zKxAglha+ygrrE
+c0RRfiLvAi64+s9scE3+tEf9TrswNzwaUs2nc5EjsYKXU97507j4hMkz5keKXJW
+7dUCSiN0hc5w0qSGhdnEwNgobL/EVQtAuXd9PEmeP6Tund4r1MD8bkiVW33wVGC
Ul66/0XGEx39Qlhg2EklneEN7nsj6CuI7M8OaLhizCyxZzUP6LdZ3/kAO07kbQu6
viiDfppcGQDUfXO9igYrfKRSNOHgNrKKHkhbgzF0egeMXm4JnxSUGMQQGE3ahS7e
vxhi25eXZi7tw5cCzSzYfY0iJRYn1HQE51c22n8iwCejhOI/0czJ693L7hDlnF8I
cUJeB47y0PuWOd1fo9Qq60oguX0zv+gI5ak+zmU5aUip0NvQ0SLqbxXtllMd57Ql
WLqRT4EW542QZA9uKqISANEA860mfDjXGPZ1qP3/2ed7PzPFOdi1ns8gCXf30lsE
3hni69mUHcCz2xzCAfMrEXGvgVrz+BieCZeL7BYWusyv0vmguNYH4UXG85AJq1we
cppC0QDzVe1XtxUryOnLbXvvq2505LWEMYU1Bxu+b5H9G7xvbOfw6wwwgl6Fbdga
do5r95FkJldUm2+48HKr0E0TRGxN0+rqbqfnFgC/+hjVFWuN4lbTd1lkoxLy3FUz
5S0cIwi8YRB4fBlxFch/
=nqtE
-----END PGP SIGNATURE-----



--- End Message ---
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to