classification
Title: Add migration step for DictMixin -> collections.MutableMapping
Type: enhancement Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Write UserDict fixer for 2to3
View: 2876
Assigned To: collinwinter Nosy List: christian.heimes, collinwinter, ncoghlan, rhettinger
Priority: normal Keywords:

Created on 2008-02-05 01:32 by christian.heimes, last changed 2008-08-21 22:24 by benjamin.peterson. This issue is now closed.

Messages (4)
msg62058 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-02-05 01:32
See r60577
msg62063 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008-02-05 08:12
The difference is the underlying methods.  DictMixin depended on 
getitem, setitem, delitem, and keys.  MutableMapping doesn't need keys 
but wants __iter__ and __len__.  Also, DictMixin did not insist on all 
of those being present, while MutableMapping won't let you skip any 
(with delitem being the one most likely omitted).
msg62221 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2008-02-09 13:18
Perhaps the best we can do is a warning from the DictMixin constructor
in 2.6 when the -3 flag is specified?
msg62234 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008-02-09 20:25
We should hold off on this one for a bit until I can get feedback on 
whether UserDict, UserString, and UserList should all be in the same 
place (in the own modules or rolled into collections).
History
Date User Action Args
2008-08-21 22:24:06benjamin.petersonsetstatus: open -> closed
resolution: duplicate
superseder: Write UserDict fixer for 2to3
2008-02-09 20:25:47rhettingersetmessages: + msg62234
2008-02-09 13:18:19ncoghlansetnosy: + ncoghlan
messages: + msg62221
2008-02-05 08:12:01rhettingersetnosy: + rhettinger
messages: + msg62063
2008-02-05 01:32:30christian.heimescreate