changeset: 98460:e377d568928b parent: 98457:e885f3f00256 parent: 98459:10c13441bf8d user: Serhiy Storchaka date: Thu Oct 01 11:55:52 2015 +0300 files: Lib/importlib/_bootstrap_external.py Misc/NEWS Python/importlib_external.h description: Issue #25280: Import trace messages emitted in verbose (-v) mode are no longer formatted twice. diff -r e885f3f00256 -r e377d568928b Lib/importlib/_bootstrap_external.py --- a/Lib/importlib/_bootstrap_external.py Thu Oct 01 10:01:31 2015 +0200 +++ b/Lib/importlib/_bootstrap_external.py Thu Oct 01 11:55:52 2015 +0300 @@ -429,15 +429,15 @@ raw_size = data[8:12] if magic != MAGIC_NUMBER: message = 'bad magic number in {!r}: {!r}'.format(name, magic) - _bootstrap._verbose_message(message) + _bootstrap._verbose_message('{}', message) raise ImportError(message, **exc_details) elif len(raw_timestamp) != 4: message = 'reached EOF while reading timestamp in {!r}'.format(name) - _bootstrap._verbose_message(message) + _bootstrap._verbose_message('{}', message) raise EOFError(message) elif len(raw_size) != 4: message = 'reached EOF while reading size of source in {!r}'.format(name) - _bootstrap._verbose_message(message) + _bootstrap._verbose_message('{}', message) raise EOFError(message) if source_stats is not None: try: @@ -447,7 +447,7 @@ else: if _r_long(raw_timestamp) != source_mtime: message = 'bytecode is stale for {!r}'.format(name) - _bootstrap._verbose_message(message) + _bootstrap._verbose_message('{}', message) raise ImportError(message, **exc_details) try: source_size = source_stats['size'] & 0xFFFFFFFF diff -r e885f3f00256 -r e377d568928b Misc/NEWS --- a/Misc/NEWS Thu Oct 01 10:01:31 2015 +0200 +++ b/Misc/NEWS Thu Oct 01 11:55:52 2015 +0300 @@ -10,6 +10,9 @@ Core and Builtins ----------------- +- Issue #25280: Import trace messages emitted in verbose (-v) mode are no + longer formatted twice. + - Issue #25227: Optimize ASCII and latin1 encoders with the ``surrogateescape`` error handler: the encoders are now up to 3 times as fast. Initial patch written by Serhiy Storchaka.