- Nothing changed yet.
- move all code under the
modernize
namespace. - use flit to create PyPI distributions.
- add
modernize
console_script
- use
fissix
instead of deprecatedlib2to3
#203 modernize itself will no-longer run under Python 2, or Python <3.6, but will always be able to process Python 2 code.
- Fix for
dict.viewitems()
,dict.iteritems()
etc in chained calls #181 - Fix for SLASHEQUAL
/=
in fix_classic_divivion #197
- Travis CI: Add Python 3.7, 3.8 and more flake8 tests #199
six
documentation has moved to https://six.readthedocs.io/ #198- Fix typo in help string for --enforce option #191
- move project to https://github.com/PyCQA/modernize/ #220 #215
- switch from Travis CI to Github Actions #224
- use tox, pre-commit, pyupgrade and black #216
- Nothing changed yet.
- add
modernize
console_script
- move project to https://github.com/PyCQA/modernize/ #220 #215
- switch from Travis CI to Github Actions #224
- use tox, pre-commit, pyupgrade and black #216
Released 2020-07-20.
- use
fissix
instead of deprecatedlib2to3
#203 modernize itself will no-longer run under Python 2, or Python <3.6, but will always be able to process Python 2 code.
- Fix for
dict.viewitems()
,dict.iteritems()
etc in chained calls #181 - Fix for SLASHEQUAL
/=
in fix_classic_divivion #197
- Travis CI: Add Python 3.7, 3.8 and more flake8 tests #199
six
documentation has moved to https://six.readthedocs.io/ #198- Fix typo in help string for --enforce option #191
- Added the opt-in classic_division fixer.
- Updated the
dict_six
fixer to supportsix.viewitems()
and friends. - New fixer for
unichr
, changed tosix.unichr
. - Documentation corrections.
Released 2014-10-14.
- Documentation has been added.
- All fixers are now idempotent, which allows modernize to safely be applied more than once to the same source code.
- The option to include default fixers when
-f
options are used is now spelled-f default
, rather than-f all
. - Added a
--version
option to the modernize command. - Calls to
zip
,map
, andfilter
are now wrapped withlist()
in non-iterator contexts, to preserve Python 2 semantics. - Improved fixer for
xrange
usingsix.moves.range
. - Simplified use of
six.with_metaclass
for classes with more than one base class. - New fixer for imports of renamed standard library modules, using
six.moves
. - New fixer to add
from __future__ import absolute_import
to all files with imports, and change any implicit relative imports to explicit (see PEP 328). - New fixer for
input()
andraw_input()
, changed toeval(input())
andinput()
respectively. - New fixer for
file()
, changed toopen()
. There is also an opt-in fixer that changes both of these toio.open()
. - New fixer for
(int, long)
or(long, int)
, changed tosix.integer_types
. Other references tolong
are changed toint
. - New fixer for
basestring
, changed tosix.string_types
. - New fixer for
unicode
, changed tosix.text_type
. - The
fix_next
fixer uses thenext()
builtin rather thansix.advance_iterator
. - There is test coverage for all
libmodernize
fixers. - Simplified the implementation of many
libmodernize
fixers by extending similar fixers fromlib2to3
. - Fixed a bug where
fix_raise_six
was adding an incorrect import statement. - Support for targeting Python 2.5 or lower has been officially dropped.
(Previously some fixers did output constructs that were only added in
Python 2.6, such as the
except ... as
construct, but this was not documented.)
Released 2014-08-12.
- New fixer for
raise E, V, T
, changed tosix.reraise(E, V, T)
. - New fixer for metaclasses, using
six.with_metaclass
. - Avoid adding redundant parentheses to
print(x)
. - modernize can now be installed and run on Python 3.
- Fixed a bug where
__future__
imports were added multiple times. - Fixed a bug where fixer for
zip()
was recognisingmap()
. - The default is now to leave Unicode literals unchanged.
(In previous versions this required the
--compat-unicode
option, which has now been removed.) A new--six-unicode
option has been added to obtain the previous behaviour of addingsix.u
wrappers around Unicode literals.