Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#20475 closed Bug (invalid)

DeprecationWarning: django.utils.hashcompat is deprecated

Reported by: caumons Owned by: nobody
Component: Uncategorized Version: 1.5
Severity: Normal Keywords: warning
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When using Django 1.5 I could saw some deprecation warnings like this one:

/usr/local/lib/python2.7/dist-packages/django/utils/hashcompat.py:9: DeprecationWarning: django.utils.hashcompat is deprecated; use hashlib instead DeprecationWarning)

When I updated to 1.5.1 I expected that this'd have been fixed, but it isn't.

I'm not using this library directly in my code, so I guess there is/are some old deprecated imports in Django that should be changed.

P.S. I'm using the following 3rd party apps: 'captcha', 'gravatar', 'transmeta', 'south', 'wysihtml5'

Change History (4)

comment:1 by Simon Charette, 12 years ago

Resolution: invalid
Status: newclosed

Looking at the latest CI build of the 1.5.x branch it looks like this warning is not raised.

I guess one of your 3rd party apps is using the deprecated django.utils.hashcompat module.

To track down which one is the culprit you should try running your testsuite or your development server (or a command that triggers this warning) while setting python warning control to the error level and study the traceback: e.g. python -Werror ./manage.py runserver. This should point you to module referencing django.utils.hashcompat.

You can then notify the author or the app of this issue and even write a patch to get rid of this pesky warning.

comment:2 by sharkwang@…, 11 years ago

File "C:\Users\...\AppData\Roaming\Python\Python27\site-packages\django_py

odbc\creation.py", line 3, in <module>

from django.utils.hashcompat import md5_constructor

File "C:\Users\...\AppData\Roaming\Python\Python27\site-packages\django\ut

ils\hashcompat.py", line 9, in <module>

DeprecationWarning)

DeprecationWarning: django.utils.hashcompat is deprecated; use hashlib instead

comment:3 by Marc Tamlyn, 11 years ago

The warning is being raised by code in django-pyodbc. This is the package which needs updating.

comment:4 by Aymeric Augustin, 11 years ago

Hence this isn't a bug in Django.

Note: See TracTickets for help on using tickets.
Back to Top