Commit ee27901f authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #25280: Import trace messages emitted in verbose (-v) mode are no

longer formatted twice.
parents bb0b7429 682b63e0
...@@ -437,15 +437,15 @@ def _validate_bytecode_header(data, source_stats=None, name=None, path=None): ...@@ -437,15 +437,15 @@ def _validate_bytecode_header(data, source_stats=None, name=None, path=None):
raw_size = data[8:12] raw_size = data[8:12]
if magic != MAGIC_NUMBER: if magic != MAGIC_NUMBER:
message = 'bad magic number in {!r}: {!r}'.format(name, magic) message = 'bad magic number in {!r}: {!r}'.format(name, magic)
_verbose_message(message) _verbose_message('{}', message)
raise ImportError(message, **exc_details) raise ImportError(message, **exc_details)
elif len(raw_timestamp) != 4: elif len(raw_timestamp) != 4:
message = 'reached EOF while reading timestamp in {!r}'.format(name) message = 'reached EOF while reading timestamp in {!r}'.format(name)
_verbose_message(message) _verbose_message('{}', message)
raise EOFError(message) raise EOFError(message)
elif len(raw_size) != 4: elif len(raw_size) != 4:
message = 'reached EOF while reading size of source in {!r}'.format(name) message = 'reached EOF while reading size of source in {!r}'.format(name)
_verbose_message(message) _verbose_message('{}', message)
raise EOFError(message) raise EOFError(message)
if source_stats is not None: if source_stats is not None:
try: try:
...@@ -455,7 +455,7 @@ def _validate_bytecode_header(data, source_stats=None, name=None, path=None): ...@@ -455,7 +455,7 @@ def _validate_bytecode_header(data, source_stats=None, name=None, path=None):
else: else:
if _r_long(raw_timestamp) != source_mtime: if _r_long(raw_timestamp) != source_mtime:
message = 'bytecode is stale for {!r}'.format(name) message = 'bytecode is stale for {!r}'.format(name)
_verbose_message(message) _verbose_message('{}', message)
raise ImportError(message, **exc_details) raise ImportError(message, **exc_details)
try: try:
source_size = source_stats['size'] & 0xFFFFFFFF source_size = source_stats['size'] & 0xFFFFFFFF
......
...@@ -11,6 +11,9 @@ Release date: TBA ...@@ -11,6 +11,9 @@ Release date: TBA
Core and Builtins Core and Builtins
----------------- -----------------
- Issue #25280: Import trace messages emitted in verbose (-v) mode are no
longer formatted twice.
- Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the - Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the
getrandom() function instead of the getentropy() function. The getentropy() getrandom() function instead of the getentropy() function. The getentropy()
function is blocking to generate very good quality entropy, os.urandom() function is blocking to generate very good quality entropy, os.urandom()
......
...@@ -635,7 +635,7 @@ const unsigned char _Py_M__importlib_external[] = { ...@@ -635,7 +635,7 @@ const unsigned char _Py_M__importlib_external[] = {
95,102,105,110,100,95,109,111,100,117,108,101,95,115,104,105, 95,102,105,110,100,95,109,111,100,117,108,101,95,115,104,105,
109,143,1,0,0,115,10,0,0,0,0,10,21,1,24,1, 109,143,1,0,0,115,10,0,0,0,0,10,21,1,24,1,
6,1,29,1,114,130,0,0,0,99,4,0,0,0,0,0, 6,1,29,1,114,130,0,0,0,99,4,0,0,0,0,0,
0,0,11,0,0,0,19,0,0,0,67,0,0,0,115,228, 0,0,11,0,0,0,19,0,0,0,67,0,0,0,115,240,
1,0,0,105,0,0,125,4,0,124,2,0,100,1,0,107, 1,0,0,105,0,0,125,4,0,124,2,0,100,1,0,107,
9,0,114,31,0,124,2,0,124,4,0,100,2,0,60,110, 9,0,114,31,0,124,2,0,124,4,0,100,2,0,60,110,
6,0,100,3,0,125,2,0,124,3,0,100,1,0,107,9, 6,0,100,3,0,125,2,0,124,3,0,100,1,0,107,9,
...@@ -643,58 +643,59 @@ const unsigned char _Py_M__importlib_external[] = { ...@@ -643,58 +643,59 @@ const unsigned char _Py_M__importlib_external[] = {
0,100,1,0,100,5,0,133,2,0,25,125,5,0,124,0, 0,100,1,0,100,5,0,133,2,0,25,125,5,0,124,0,
0,100,5,0,100,6,0,133,2,0,25,125,6,0,124,0, 0,100,5,0,100,6,0,133,2,0,25,125,6,0,124,0,
0,100,6,0,100,7,0,133,2,0,25,125,7,0,124,5, 0,100,6,0,100,7,0,133,2,0,25,125,7,0,124,5,
0,116,0,0,107,3,0,114,165,0,100,8,0,106,1,0, 0,116,0,0,107,3,0,114,168,0,100,8,0,106,1,0,
124,2,0,124,5,0,131,2,0,125,8,0,116,2,0,124, 124,2,0,124,5,0,131,2,0,125,8,0,116,2,0,100,
8,0,131,1,0,1,116,3,0,124,8,0,124,4,0,141, 9,0,124,8,0,131,2,0,1,116,3,0,124,8,0,124,
1,0,130,1,0,110,113,0,116,4,0,124,6,0,131,1, 4,0,141,1,0,130,1,0,110,119,0,116,4,0,124,6,
0,100,5,0,107,3,0,114,223,0,100,9,0,106,1,0, 0,131,1,0,100,5,0,107,3,0,114,229,0,100,10,0,
124,2,0,131,1,0,125,8,0,116,2,0,124,8,0,131, 106,1,0,124,2,0,131,1,0,125,8,0,116,2,0,100,
1,0,1,116,5,0,124,8,0,131,1,0,130,1,0,110, 9,0,124,8,0,131,2,0,1,116,5,0,124,8,0,131,
55,0,116,4,0,124,7,0,131,1,0,100,5,0,107,3, 1,0,130,1,0,110,58,0,116,4,0,124,7,0,131,1,
0,114,22,1,100,10,0,106,1,0,124,2,0,131,1,0, 0,100,5,0,107,3,0,114,31,1,100,11,0,106,1,0,
125,8,0,116,2,0,124,8,0,131,1,0,1,116,5,0, 124,2,0,131,1,0,125,8,0,116,2,0,100,9,0,124,
124,8,0,131,1,0,130,1,0,124,1,0,100,1,0,107, 8,0,131,2,0,1,116,5,0,124,8,0,131,1,0,130,
9,0,114,214,1,121,20,0,116,6,0,124,1,0,100,11, 1,0,124,1,0,100,1,0,107,9,0,114,226,1,121,20,
0,25,131,1,0,125,9,0,87,110,18,0,4,116,7,0, 0,116,6,0,124,1,0,100,12,0,25,131,1,0,125,9,
107,10,0,114,74,1,1,1,1,89,110,59,0,88,116,8, 0,87,110,18,0,4,116,7,0,107,10,0,114,83,1,1,
0,124,6,0,131,1,0,124,9,0,107,3,0,114,133,1, 1,1,89,110,62,0,88,116,8,0,124,6,0,131,1,0,
100,12,0,106,1,0,124,2,0,131,1,0,125,8,0,116, 124,9,0,107,3,0,114,145,1,100,13,0,106,1,0,124,
2,0,124,8,0,131,1,0,1,116,3,0,124,8,0,124, 2,0,131,1,0,125,8,0,116,2,0,100,9,0,124,8,
4,0,141,1,0,130,1,0,121,18,0,124,1,0,100,13, 0,131,2,0,1,116,3,0,124,8,0,124,4,0,141,1,
0,25,100,14,0,64,125,10,0,87,110,18,0,4,116,7, 0,130,1,0,121,18,0,124,1,0,100,14,0,25,100,15,
0,107,10,0,114,171,1,1,1,1,89,110,43,0,88,116, 0,64,125,10,0,87,110,18,0,4,116,7,0,107,10,0,
8,0,124,7,0,131,1,0,124,10,0,107,3,0,114,214, 114,183,1,1,1,1,89,110,43,0,88,116,8,0,124,7,
1,116,3,0,100,12,0,106,1,0,124,2,0,131,1,0, 0,131,1,0,124,10,0,107,3,0,114,226,1,116,3,0,
124,4,0,141,1,0,130,1,0,124,0,0,100,7,0,100, 100,13,0,106,1,0,124,2,0,131,1,0,124,4,0,141,
1,0,133,2,0,25,83,41,15,97,122,1,0,0,86,97, 1,0,130,1,0,124,0,0,100,7,0,100,1,0,133,2,
108,105,100,97,116,101,32,116,104,101,32,104,101,97,100,101, 0,25,83,41,16,97,122,1,0,0,86,97,108,105,100,97,
114,32,111,102,32,116,104,101,32,112,97,115,115,101,100,45, 116,101,32,116,104,101,32,104,101,97,100,101,114,32,111,102,
105,110,32,98,121,116,101,99,111,100,101,32,97,103,97,105, 32,116,104,101,32,112,97,115,115,101,100,45,105,110,32,98,
110,115,116,32,115,111,117,114,99,101,95,115,116,97,116,115, 121,116,101,99,111,100,101,32,97,103,97,105,110,115,116,32,
32,40,105,102,10,32,32,32,32,103,105,118,101,110,41,32, 115,111,117,114,99,101,95,115,116,97,116,115,32,40,105,102,
97,110,100,32,114,101,116,117,114,110,105,110,103,32,116,104, 10,32,32,32,32,103,105,118,101,110,41,32,97,110,100,32,
101,32,98,121,116,101,99,111,100,101,32,116,104,97,116,32, 114,101,116,117,114,110,105,110,103,32,116,104,101,32,98,121,
99,97,110,32,98,101,32,99,111,109,112,105,108,101,100,32, 116,101,99,111,100,101,32,116,104,97,116,32,99,97,110,32,
98,121,32,99,111,109,112,105,108,101,40,41,46,10,10,32, 98,101,32,99,111,109,112,105,108,101,100,32,98,121,32,99,
32,32,32,65,108,108,32,111,116,104,101,114,32,97,114,103, 111,109,112,105,108,101,40,41,46,10,10,32,32,32,32,65,
117,109,101,110,116,115,32,97,114,101,32,117,115,101,100,32, 108,108,32,111,116,104,101,114,32,97,114,103,117,109,101,110,
116,111,32,101,110,104,97,110,99,101,32,101,114,114,111,114, 116,115,32,97,114,101,32,117,115,101,100,32,116,111,32,101,
32,114,101,112,111,114,116,105,110,103,46,10,10,32,32,32, 110,104,97,110,99,101,32,101,114,114,111,114,32,114,101,112,
32,73,109,112,111,114,116,69,114,114,111,114,32,105,115,32, 111,114,116,105,110,103,46,10,10,32,32,32,32,73,109,112,
114,97,105,115,101,100,32,119,104,101,110,32,116,104,101,32, 111,114,116,69,114,114,111,114,32,105,115,32,114,97,105,115,
109,97,103,105,99,32,110,117,109,98,101,114,32,105,115,32, 101,100,32,119,104,101,110,32,116,104,101,32,109,97,103,105,
105,110,99,111,114,114,101,99,116,32,111,114,32,116,104,101, 99,32,110,117,109,98,101,114,32,105,115,32,105,110,99,111,
32,98,121,116,101,99,111,100,101,32,105,115,10,32,32,32, 114,114,101,99,116,32,111,114,32,116,104,101,32,98,121,116,
32,102,111,117,110,100,32,116,111,32,98,101,32,115,116,97, 101,99,111,100,101,32,105,115,10,32,32,32,32,102,111,117,
108,101,46,32,69,79,70,69,114,114,111,114,32,105,115,32, 110,100,32,116,111,32,98,101,32,115,116,97,108,101,46,32,
114,97,105,115,101,100,32,119,104,101,110,32,116,104,101,32, 69,79,70,69,114,114,111,114,32,105,115,32,114,97,105,115,
100,97,116,97,32,105,115,32,102,111,117,110,100,32,116,111, 101,100,32,119,104,101,110,32,116,104,101,32,100,97,116,97,
32,98,101,10,32,32,32,32,116,114,117,110,99,97,116,101, 32,105,115,32,102,111,117,110,100,32,116,111,32,98,101,10,
100,46,10,10,32,32,32,32,78,114,106,0,0,0,122,10, 32,32,32,32,116,114,117,110,99,97,116,101,100,46,10,10,
60,98,121,116,101,99,111,100,101,62,114,35,0,0,0,114, 32,32,32,32,78,114,106,0,0,0,122,10,60,98,121,116,
12,0,0,0,233,8,0,0,0,233,12,0,0,0,122,30, 101,99,111,100,101,62,114,35,0,0,0,114,12,0,0,0,
98,97,100,32,109,97,103,105,99,32,110,117,109,98,101,114, 233,8,0,0,0,233,12,0,0,0,122,30,98,97,100,32,
32,105,110,32,123,33,114,125,58,32,123,33,114,125,122,43, 109,97,103,105,99,32,110,117,109,98,101,114,32,105,110,32,
123,33,114,125,58,32,123,33,114,125,122,2,123,125,122,43,
114,101,97,99,104,101,100,32,69,79,70,32,119,104,105,108, 114,101,97,99,104,101,100,32,69,79,70,32,119,104,105,108,
101,32,114,101,97,100,105,110,103,32,116,105,109,101,115,116, 101,32,114,101,97,100,105,110,103,32,116,105,109,101,115,116,
97,109,112,32,105,110,32,123,33,114,125,122,48,114,101,97, 97,109,112,32,105,110,32,123,33,114,125,122,48,114,101,97,
...@@ -719,9 +720,9 @@ const unsigned char _Py_M__importlib_external[] = { ...@@ -719,9 +720,9 @@ const unsigned char _Py_M__importlib_external[] = {
95,118,97,108,105,100,97,116,101,95,98,121,116,101,99,111, 95,118,97,108,105,100,97,116,101,95,98,121,116,101,99,111,
100,101,95,104,101,97,100,101,114,160,1,0,0,115,76,0, 100,101,95,104,101,97,100,101,114,160,1,0,0,115,76,0,
0,0,0,11,6,1,12,1,13,3,6,1,12,1,10,1, 0,0,0,11,6,1,12,1,13,3,6,1,12,1,10,1,
16,1,16,1,16,1,12,1,18,1,10,1,18,1,18,1, 16,1,16,1,16,1,12,1,18,1,13,1,18,1,18,1,
15,1,10,1,15,1,18,1,15,1,10,1,12,1,12,1, 15,1,13,1,15,1,18,1,15,1,13,1,12,1,12,1,
3,1,20,1,13,1,5,2,18,1,15,1,10,1,15,1, 3,1,20,1,13,1,5,2,18,1,15,1,13,1,15,1,
3,1,18,1,13,1,5,2,18,1,15,1,9,1,114,141, 3,1,18,1,13,1,5,2,18,1,15,1,9,1,114,141,
0,0,0,99,4,0,0,0,0,0,0,0,5,0,0,0, 0,0,0,99,4,0,0,0,0,0,0,0,5,0,0,0,
6,0,0,0,67,0,0,0,115,112,0,0,0,116,0,0, 6,0,0,0,67,0,0,0,115,112,0,0,0,116,0,0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment