Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9990 closed defect (fixed)

DeprecationWarning : the md5 module is deprecated - Causes tab-completion to fail in trac-admin — at Version 2

Reported by: glenn@… Owned by: Colin Guthrie
Priority: normal Component: ClientsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

Pressing tab in trac-admin causes this warning generated by clientsplugin:

Trac [/var/projects/frontend]> /usr/local/lib/python2.6/dist-packages/clients-0.4-py2.6.egg/clients/events.py:1: DeprecationWarning: the md5 module is deprecated; use hashlib instead

Completion error: AttributeError: 'WorklogAdminPanel' object has no attribute 'get_admin_commands'

I guess it's time to go to hashlib instead :) There info about some patch supposedly done on trac core on a prolem like this a few years back. The first time I've seen it pop up though (other trac/worklog combo's seem to be silent about it).

See t:#7458

Thanks for whatever effort you put in this, I've seen it's been a long time that any updates on this plugins came in, I sure like it. I've been looking for that start/stop logic forever.

Change History (2)

comment:1 Changed 12 years ago by glenn@…

Resolution: fixed
Status: newclosed

Actually, I messed up the module, the fix for WorkLogPlugin problem is this:

events.py

try:
    import hashlib
    md = hashlib.md5()
except ImportError:
    # for Python << 2.5
    import md5
    md = md5.new()

and for clients plugin which is my mistake here , in webadminui.py add to class WorklogAdminPanel.

    def get_admin_commands(self):
        return None

comment:2 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)
Note: See TracTickets for help on using tickets.