|
1 |
| -Unreleased |
2 |
| -========== |
| 1 | +Version 0.4 |
| 2 | +=========== |
3 | 3 |
|
4 | 4 | Changes since 0.3:
|
5 | 5 |
|
| 6 | +* `Documentation`_ has been added. |
| 7 | +* All fixers are now idempotent, which allows modernize to safely be applied |
| 8 | + more than once to the same source code. |
| 9 | +* The option to include default fixers when ``-f`` options are used is now |
| 10 | + spelled ``-f default``, rather than ``-f all``. |
| 11 | +* Added a ``--version`` option to the modernize command. |
| 12 | +* Calls to ``zip``, ``map``, and ``filter`` are now wrapped with ``list()`` |
| 13 | + in non-iterator contexts, to preserve Python 2 semantics. |
| 14 | +* Improved fixer for ``xrange`` using ``six.moves.range``. |
| 15 | +* Simplified use of ``six.with_metaclass`` for classes with more than |
| 16 | + one base class. |
| 17 | +* New fixer for imports of renamed standard library modules, using |
| 18 | + ``six.moves``. |
| 19 | +* New fixer to add ``from __future__ import absolute_import`` to all |
| 20 | + files with imports, and change any implicit relative imports to explicit |
| 21 | + (see PEP 328). |
| 22 | +* New fixer for ``input()`` and ``raw_input()``, changed to ``eval(input())`` |
| 23 | + and ``input()`` respectively. |
| 24 | +* New fixer for ``file()``, changed to ``open()``. There is also an |
| 25 | + opt-in fixer that changes both of these to ``io.open()``. |
| 26 | +* New fixer for ``(int, long)`` or ``(long, int)``, changed to |
| 27 | + ``six.integer_types``. Other references to ``long`` are changed to ``int``. |
| 28 | +* New fixer for ``basestring``, changed to ``six.string_types``. |
| 29 | +* New fixer for ``unicode``, changed to ``six.text_type``. |
| 30 | +* The ``fix_next`` fixer uses the ``next()`` builtin rather than |
| 31 | + ``six.advance_iterator``. |
| 32 | +* There is test coverage for all ``libmodernize`` fixers. |
| 33 | +* Simplified the implementation of many ``libmodernize`` fixers by extending |
| 34 | + similar fixers from ``lib2to3``. |
| 35 | +* Fixed a bug where ``fix_raise_six`` was adding an incorrect import |
| 36 | + statement. |
6 | 37 | * Support for targetting Python 2.5 or lower has been officially dropped.
|
7 | 38 | (Previously some fixers did output constructs that were only added in
|
8 | 39 | Python 2.6, such as the ``except ... as`` construct, but this was not
|
9 | 40 | documented.)
|
10 |
| -* The ``fix_next`` fixer uses the ``next()`` builtin rather than |
11 |
| - ``six.advance_iterator``. |
| 41 | + |
| 42 | +.. _Documentation: http://python-modernize.readthedocs.org/en/latest/ |
12 | 43 |
|
13 | 44 |
|
14 | 45 | Version 0.3
|
|
0 commit comments