| | 52 | |
| | 53 | * You will see that `2to3` puts `list()` around calls to methods named `keys`, `values` or `items`. This is sometimes but not always |
| | 54 | necessary, so examine each on a case-by-case basis. In particular, if `values` is called on a queryset, you '''don't''' want to |
| | 55 | wrap with `list()`. |
| | 56 | |
| | 57 | * There are functions `iterkeys`, `itervalues` and `iteritems` defined in `django.utils.py3`. Import them if there is any reference |
| | 58 | to those methods, and replace using the pattern `x.iterkeys()` -> `iterkeys(x)` (where `x` might be an expression rather than just |
| | 59 | a name). |
| | 60 | |
| | 61 | * Replace `map` calls with the list comprehensions suggested by `2to3`. If you see `map(None, ...)` you will need to import and use |
| | 62 | `izip_longest` from `django.utils.py3`. |
| | 63 | |
| | 64 | * If you see `xrange` in the source, just do `from django.utils.py3 import xrange`. |
| | 65 | |
| | 66 | * If you use anything from `urllib`, `urllib2`, `urlparse`, you will need to import them |