[Python-checkins] cpython (merge 3.5 -> default): Issue #25280: Import trace messages emitted in verbose (-v) mode are no
serhiy.storchaka
python-checkins at python.org
Thu Oct 1 04:57:04 EDT 2015
https://hg.python.org/cpython/rev/e377d568928b
changeset: 98460:e377d568928b
parent: 98457:e885f3f00256
parent: 98459:10c13441bf8d
user: Serhiy Storchaka <storchaka at gmail.com>
date: Thu Oct 01 11:55:52 2015 +0300
summary:
Issue #25280: Import trace messages emitted in verbose (-v) mode are no
longer formatted twice.
files:
Lib/importlib/_bootstrap_external.py | 8 ++++----
Misc/NEWS | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -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 --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list