Changes between and of Version 2Version 7Ticket #5789
- Timestamp:
- 01/22/2013 04:37:47 PM (4 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5789
- Property keywords py3k added
- Property owner set to vperic
- Property priority changed from normal to lowest
- Property summary changed from Replace usage of UserDict with twisted.python.compat version to Remove usage of UserDict
-
Ticket #5789 – description
v2 v7 1 `UserDict` was moved to the [http://docs.python.org/py3k/library/collections.html#collections.UserDict collections] module in Python 3.x. We can add a twisted.python.compat version, like we did with `execfile` or it will throw errors in python 3.1 Remove usage of `UserDict` once Python 2.6 support is dropped completely (or `manhole.explorer` or `protocols.postfix` are ported to python 3). 2 2 3 3 {{{ 4 ./twisted/web/http_headers.py:96: # <http://docs.python.org/lib/module-UserDict.html>. 5 ./twisted/protocols/postfix.py:10:import UserDict 6 ./twisted/protocols/postfix.py:96: UserDict.UserDict): 7 ./twisted/python/util.py:15:from UserDict import UserDict 8 ./twisted/python/util.py:143:class OrderedDict(UserDict): 9 ./twisted/python/util.py:144: """A UserDict that preserves insert order whenever possible.""" 10 ./twisted/python/util.py:162: UserDict.__setitem__(self, key, value) 11 ./twisted/python/util.py:168: UserDict.__delitem__(self, key) 12 ./twisted/manhole/explorer.py:19:import UserDict 13 ./twisted/manhole/explorer.py:29:class Pool(UserDict.UserDict): 4 twisted/protocols/postfix.py:import UserDict 5 twisted/protocols/postfix.py: UserDict.UserDict): 6 twisted/manhole/explorer.py:import UserDict 7 twisted/manhole/explorer.py:class Pool(UserDict.UserDict): 14 8 }}} 15 16 And it looks like `DictMixin` is gone but you should be able to use `MutableMapping` with some adjustment.17 18 {{{19 ./twisted/web/http_headers.py:10:from UserDict import DictMixin20 }}}
