Modify

Opened 12 years ago

Closed 12 years ago

#9773 closed enhancement (fixed)

Deprecation warning

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: DownloadsPlugin
Severity: normal Keywords:
Cc: pkline Trac Release: 0.11

Description

I'd like to get rid of this warning that I see when using Python 2.6:

/usr/local/python26_trac12/lib/python2.6/site-packages/TracDownloads-0.3_r11238-py2.6.egg/tracdownloads/tags.py:5: DeprecationWarning: the sets module is deprecated

Maybe the thing to do here is something like:

from trac.util.compat import set

Attachments (0)

Change History (4)

comment:1 Changed 12 years ago by Ryan J Ollos

Cc: pkline added; anonymous removed

On the 0.12 branch, I removed the following lines of code because I couldn't see the sets module being used anywhere in the module:

# Deprecated as for Python 2.6.
try:
    import sets
except:
    pass

I installed TagsPlugin and DownloadsPlugin in a tracdev environment and added a couple of uploads. Everything seems to work fine. I'd be happy to fix this on the 0.12 branch if you feel this is the correct change.

comment:2 Changed 12 years ago by Ryan J Ollos

Owner: changed from Radek Bartoň to Ryan J Ollos
Status: newassigned

This seems like a pretty trivial change and it is working well. I hope you don't mind if I push it to the repository.

comment:3 Changed 12 years ago by Ryan J Ollos

(In [11674]) Refs #9773: Removed unused imported of sets module, which was resulting in a deprecation warning with Python 2.6.

comment:4 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.