As of python 2.6, the sets module is deprecated. This is currently used in
MySQLdb/__init__.py and MySQLdb/converters.py - on both the 1.2 branch and
the trunk.
Fixing the ImmutableSet usage is fairly easy. Currently:
from sets import ImmutableSet
class DBAPISet(ImmutableSet):
...
I think the new built in frozenset (added in python 2.4) should be used
instead. Suggested short term fix to preserve compatibility for older
versions of python:
try :
ImmutableSet = frozenset
except NameError:
from sets import ImmutableSet
class DBAPISet(ImmutableSet):
...
Longer term fix would be something like:
try:
frozenset = frozenset
except NameError:
from sets import ImmutableSet as frozenset
class DBAPISet(frozenset):
...
However, I am not sure off hand what to use to replace sets.BaseSet with.
Andy Dustman
MySQLdb
None
Public
|
Date: 2009-06-25 17:21 Will a 1.2.3 release (or other) be made incorporating this change? |
|
Date: 2008-11-17 19:28 Works on Python 2.6. Any idea when this will make it into a non-beta |
|
Date: 2008-10-18 00:16 This one now ought to be fixed as well. |
|
Date: 2008-10-17 09:10 The MySQLdb/__init__.py update works for me on Python 2.6 (using MySQLdb |
|
Date: 2008-10-17 00:45 Fixed in 1.2 branch. Only tested for Python 2.5. |
| Field | Old Value | Date | By |
|---|---|---|---|
| resolution_id | None | 2008-10-17 00:45 | adustman |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use