diff options
author | Mark Shannon <mark@hotpy.org> | 2020-12-17 13:55:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-17 13:55:28 (GMT) |
commit | bf353f3c2d937772a8cf30b15fd8eb7b82665ccb (patch) | |
tree | 9196732769c1cca2bd01a44e668fe4c5fb29f7d7 /Python/importlib.h | |
parent | 40125ab3252453bf205ed906e46bf9741c27bf9d (diff) | |
download | cpython-bf353f3c2d937772a8cf30b15fd8eb7b82665ccb.zip cpython-bf353f3c2d937772a8cf30b15fd8eb7b82665ccb.tar.gz cpython-bf353f3c2d937772a8cf30b15fd8eb7b82665ccb.tar.bz2 |
bpo-42246: Make sure that `f_lasti`, and thus `f_lineno`, is set correctly after raising or reraising an exception (GH-23803)
* Ensure that f_lasti is set correctly after an exception is raised to conform to PEP 626.
* Update importlib
* Add NEWS.
Diffstat (limited to 'Python/importlib.h')
-rw-r--r-- | Python/importlib.h | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/Python/importlib.h b/Python/importlib.h index 1caf2f4..87b8c63 100644 --- a/Python/importlib.h +++ b/Python/importlib.h @@ -57,7 +57,7 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 0,0,0,67,0,0,0,115,38,0,0,0,122,8,124,0, 106,0,87,0,83,0,4,0,116,1,121,36,1,0,1,0, 1,0,116,2,124,0,131,1,106,0,6,0,89,0,83,0, - 48,0,169,1,78,41,3,218,12,95,95,113,117,97,108,110, + 119,0,169,1,78,41,3,218,12,95,95,113,117,97,108,110, 97,109,101,95,95,218,14,65,116,116,114,105,98,117,116,101, 69,114,114,111,114,218,4,116,121,112,101,41,1,218,3,111, 98,106,169,0,114,5,0,0,0,250,29,60,102,114,111,122, @@ -159,10 +159,10 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 161,0,114,112,116,7,100,5,124,0,22,0,131,1,130,1, 124,0,106,8,160,9,100,6,161,1,114,138,124,0,4,0, 106,10,100,3,55,0,2,0,95,10,87,0,100,4,4,0, - 4,0,131,3,1,0,110,16,49,0,115,158,48,0,1,0, + 4,0,131,3,1,0,110,16,49,0,115,158,119,1,1,0, 1,0,1,0,89,0,1,0,124,0,106,8,160,9,161,0, 1,0,124,0,106,8,160,11,161,0,1,0,113,20,116,2, - 124,1,61,0,48,0,41,7,122,185,10,32,32,32,32,32, + 124,1,61,0,119,0,41,7,122,185,10,32,32,32,32,32, 32,32,32,65,99,113,117,105,114,101,32,116,104,101,32,109, 111,100,117,108,101,32,108,111,99,107,46,32,32,73,102,32, 97,32,112,111,116,101,110,116,105,97,108,32,100,101,97,100, @@ -197,7 +197,7 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 0,106,6,114,108,124,0,4,0,106,6,100,3,56,0,2, 0,95,6,124,0,106,7,160,8,161,0,1,0,87,0,100, 0,4,0,4,0,131,3,1,0,100,0,83,0,49,0,115, - 130,48,0,1,0,1,0,1,0,89,0,1,0,100,0,83, + 130,119,1,1,0,1,0,1,0,89,0,1,0,100,0,83, 0,41,4,78,250,31,99,97,110,110,111,116,32,114,101,108, 101,97,115,101,32,117,110,45,97,99,113,117,105,114,101,100, 32,108,111,99,107,114,25,0,0,0,114,42,0,0,0,41, @@ -323,12 +323,12 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 67,0,0,0,115,134,0,0,0,116,0,160,1,161,0,1, 0,122,114,122,14,116,2,124,0,25,0,131,0,125,1,87, 0,110,22,4,0,116,3,121,46,1,0,1,0,1,0,100, - 1,125,1,89,0,110,2,48,0,124,1,100,1,117,0,114, + 1,125,1,89,0,110,2,119,0,124,1,100,1,117,0,114, 110,116,4,100,1,117,0,114,74,116,5,124,0,131,1,125, 1,110,8,116,6,124,0,131,1,125,1,124,0,102,1,100, 2,100,3,132,1,125,2,116,7,160,8,124,1,124,2,161, 2,116,2,124,0,60,0,87,0,116,0,160,9,161,0,1, - 0,124,1,83,0,116,0,160,9,161,0,1,0,48,0,41, + 0,124,1,83,0,116,0,160,9,161,0,1,0,119,0,41, 4,122,139,71,101,116,32,111,114,32,99,114,101,97,116,101, 32,116,104,101,32,109,111,100,117,108,101,32,108,111,99,107, 32,102,111,114,32,97,32,103,105,118,101,110,32,109,111,100, @@ -343,7 +343,7 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 1,161,0,1,0,122,34,116,2,160,3,124,1,161,1,124, 0,117,0,114,30,116,2,124,1,61,0,87,0,116,0,160, 4,161,0,1,0,100,0,83,0,116,0,160,4,161,0,1, - 0,48,0,114,0,0,0,0,41,5,218,4,95,105,109,112, + 0,119,0,114,0,0,0,0,41,5,218,4,95,105,109,112, 218,12,97,99,113,117,105,114,101,95,108,111,99,107,218,13, 95,109,111,100,117,108,101,95,108,111,99,107,115,114,38,0, 0,0,218,12,114,101,108,101,97,115,101,95,108,111,99,107, @@ -365,7 +365,7 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 0,0,0,0,2,0,0,0,8,0,0,0,67,0,0,0, 115,54,0,0,0,116,0,124,0,131,1,125,1,122,12,124, 1,160,1,161,0,1,0,87,0,110,20,4,0,116,2,121, - 40,1,0,1,0,1,0,89,0,100,1,83,0,48,0,124, + 40,1,0,1,0,1,0,89,0,100,1,83,0,119,0,124, 1,160,3,161,0,1,0,100,1,83,0,41,2,122,189,65, 99,113,117,105,114,101,115,32,116,104,101,110,32,114,101,108, 101,97,115,101,115,32,116,104,101,32,109,111,100,117,108,101, @@ -527,16 +527,16 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 210,0,0,0,116,0,124,0,100,1,100,0,131,3,125,1, 116,1,124,1,100,2,131,2,114,54,122,12,124,1,160,2, 124,0,161,1,87,0,83,0,4,0,116,3,121,52,1,0, - 1,0,1,0,89,0,110,2,48,0,122,10,124,0,106,4, + 1,0,1,0,89,0,110,2,119,0,122,10,124,0,106,4, 125,2,87,0,110,18,4,0,116,5,121,82,1,0,1,0, - 1,0,89,0,110,18,48,0,124,2,100,0,117,1,114,100, + 1,0,89,0,110,18,119,0,124,2,100,0,117,1,114,100, 116,6,124,2,131,1,83,0,122,10,124,0,106,7,125,3, 87,0,110,22,4,0,116,5,121,132,1,0,1,0,1,0, - 100,3,125,3,89,0,110,2,48,0,122,10,124,0,106,8, + 100,3,125,3,89,0,110,2,119,0,122,10,124,0,106,8, 125,4,87,0,110,52,4,0,116,5,121,196,1,0,1,0, 1,0,124,1,100,0,117,0,114,180,100,4,160,9,124,3, 161,1,6,0,89,0,83,0,100,5,160,9,124,3,124,1, - 161,2,6,0,89,0,83,0,48,0,100,6,160,9,124,3, + 161,2,6,0,89,0,83,0,119,0,100,6,160,9,124,3, 124,4,161,2,83,0,41,7,78,218,10,95,95,108,111,97, 100,101,114,95,95,218,11,109,111,100,117,108,101,95,114,101, 112,114,250,1,63,250,13,60,109,111,100,117,108,101,32,123, @@ -708,7 +708,7 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 111,76,124,2,124,1,106,0,107,2,111,76,124,0,106,4, 124,1,106,4,107,2,111,76,124,0,106,5,124,1,106,5, 107,2,87,0,83,0,4,0,116,6,121,100,1,0,1,0, - 1,0,116,7,6,0,89,0,83,0,48,0,114,0,0,0, + 1,0,116,7,6,0,89,0,83,0,119,0,114,0,0,0, 0,41,8,114,123,0,0,0,114,20,0,0,0,114,116,0, 0,0,114,120,0,0,0,218,6,99,97,99,104,101,100,218, 12,104,97,115,95,108,111,99,97,116,105,111,110,114,2,0, @@ -785,7 +785,7 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 100,4,141,3,83,0,124,3,100,2,117,0,114,134,116,0, 124,1,100,5,131,2,114,130,122,14,124,1,160,4,124,0, 161,1,125,3,87,0,110,26,4,0,116,5,121,128,1,0, - 1,0,1,0,100,2,125,3,89,0,110,6,48,0,100,6, + 1,0,1,0,100,2,125,3,89,0,110,6,119,0,100,6, 125,3,116,6,124,0,124,1,124,2,124,3,100,7,141,4, 83,0,41,8,122,53,82,101,116,117,114,110,32,97,32,109, 111,100,117,108,101,32,115,112,101,99,32,98,97,115,101,100, @@ -807,20 +807,20 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 0,0,0,0,0,0,0,0,0,8,0,0,0,8,0,0, 0,67,0,0,0,115,40,1,0,0,122,10,124,0,106,0, 125,3,87,0,110,18,4,0,116,1,121,28,1,0,1,0, - 1,0,89,0,110,14,48,0,124,3,100,0,117,1,114,42, + 1,0,89,0,110,14,119,0,124,3,100,0,117,1,114,42, 124,3,83,0,124,0,106,2,125,4,124,1,100,0,117,0, 114,86,122,10,124,0,106,3,125,1,87,0,110,18,4,0, - 116,1,121,84,1,0,1,0,1,0,89,0,110,2,48,0, + 116,1,121,84,1,0,1,0,1,0,89,0,110,2,119,0, 122,10,124,0,106,4,125,5,87,0,110,22,4,0,116,1, 121,118,1,0,1,0,1,0,100,0,125,5,89,0,110,2, - 48,0,124,2,100,0,117,0,114,174,124,5,100,0,117,0, + 119,0,124,2,100,0,117,0,114,174,124,5,100,0,117,0, 114,170,122,10,124,1,106,5,125,2,87,0,110,26,4,0, 116,1,121,168,1,0,1,0,1,0,100,0,125,2,89,0, - 110,6,48,0,124,5,125,2,122,10,124,0,106,6,125,6, + 110,6,119,0,124,5,125,2,122,10,124,0,106,6,125,6, 87,0,110,22,4,0,116,1,121,206,1,0,1,0,1,0, - 100,0,125,6,89,0,110,2,48,0,122,14,116,7,124,0, + 100,0,125,6,89,0,110,2,119,0,122,14,116,7,124,0, 106,8,131,1,125,7,87,0,110,22,4,0,116,1,121,244, - 1,0,1,0,1,0,100,0,125,7,89,0,110,2,48,0, + 1,0,1,0,1,0,100,0,125,7,89,0,110,2,119,0, 116,9,124,4,124,1,124,2,100,1,141,3,125,3,124,5, 100,0,117,0,144,1,114,18,100,2,110,2,100,3,124,3, 95,10,124,6,124,3,95,11,124,7,124,3,95,12,124,3, @@ -846,7 +846,7 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 0,115,214,1,0,0,124,2,115,20,116,0,124,1,100,1, 100,0,131,3,100,0,117,0,114,52,122,12,124,0,106,1, 124,1,95,2,87,0,110,18,4,0,116,3,121,50,1,0, - 1,0,1,0,89,0,110,2,48,0,124,2,115,72,116,0, + 1,0,1,0,89,0,110,2,119,0,124,2,115,72,116,0, 124,1,100,2,100,0,131,3,100,0,117,0,114,174,124,0, 106,4,125,3,124,3,100,0,117,0,114,144,124,0,106,5, 100,0,117,1,114,144,116,6,100,0,117,0,114,108,116,7, @@ -854,25 +854,25 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 125,3,124,0,106,5,124,3,95,10,124,3,124,0,95,4, 100,0,124,1,95,11,122,10,124,3,124,1,95,12,87,0, 110,18,4,0,116,3,121,172,1,0,1,0,1,0,89,0, - 110,2,48,0,124,2,115,194,116,0,124,1,100,3,100,0, + 110,2,119,0,124,2,115,194,116,0,124,1,100,3,100,0, 131,3,100,0,117,0,114,226,122,12,124,0,106,13,124,1, 95,14,87,0,110,18,4,0,116,3,121,224,1,0,1,0, - 1,0,89,0,110,2,48,0,122,10,124,0,124,1,95,15, + 1,0,89,0,110,2,119,0,122,10,124,0,124,1,95,15, 87,0,110,18,4,0,116,3,121,254,1,0,1,0,1,0, - 89,0,110,2,48,0,124,2,144,1,115,24,116,0,124,1, + 89,0,110,2,119,0,124,2,144,1,115,24,116,0,124,1, 100,4,100,0,131,3,100,0,117,0,144,1,114,70,124,0, 106,5,100,0,117,1,144,1,114,70,122,12,124,0,106,5, 124,1,95,16,87,0,110,20,4,0,116,3,144,1,121,68, - 1,0,1,0,1,0,89,0,110,2,48,0,124,0,106,17, + 1,0,1,0,1,0,89,0,110,2,119,0,124,0,106,17, 144,1,114,210,124,2,144,1,115,102,116,0,124,1,100,5, 100,0,131,3,100,0,117,0,144,1,114,136,122,12,124,0, 106,18,124,1,95,11,87,0,110,20,4,0,116,3,144,1, - 121,134,1,0,1,0,1,0,89,0,110,2,48,0,124,2, + 121,134,1,0,1,0,1,0,89,0,110,2,119,0,124,2, 144,1,115,160,116,0,124,1,100,6,100,0,131,3,100,0, 117,0,144,1,114,210,124,0,106,19,100,0,117,1,144,1, 114,210,122,14,124,0,106,19,124,1,95,20,87,0,124,1, 83,0,4,0,116,3,144,1,121,208,1,0,1,0,1,0, - 89,0,124,1,83,0,48,0,124,1,83,0,41,7,78,114, + 89,0,124,1,83,0,119,0,124,1,83,0,41,7,78,114, 9,0,0,0,114,106,0,0,0,218,11,95,95,112,97,99, 107,97,103,101,95,95,114,148,0,0,0,114,115,0,0,0, 114,146,0,0,0,41,21,114,13,0,0,0,114,20,0,0, @@ -953,9 +953,9 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 1,1,0,87,0,116,2,106,3,160,17,124,0,106,0,161, 1,125,1,124,1,116,2,106,3,124,0,106,0,60,0,110, 28,116,2,106,3,160,17,124,0,106,0,161,1,125,1,124, - 1,116,2,106,3,124,0,106,0,60,0,48,0,87,0,100, + 1,116,2,106,3,124,0,106,0,60,0,119,0,87,0,100, 3,4,0,4,0,131,3,1,0,124,1,83,0,49,0,144, - 1,115,12,48,0,1,0,1,0,1,0,89,0,1,0,124, + 1,115,12,119,1,1,0,1,0,1,0,89,0,1,0,124, 1,83,0,41,9,122,70,69,120,101,99,117,116,101,32,116, 104,101,32,115,112,101,99,39,115,32,115,112,101,99,105,102, 105,101,100,32,109,111,100,117,108,101,32,105,110,32,97,110, @@ -992,15 +992,15 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 3,106,4,124,0,106,2,60,0,116,6,124,1,100,1,100, 0,131,3,100,0,117,0,114,140,122,12,124,0,106,0,124, 1,95,7,87,0,110,18,4,0,116,8,121,138,1,0,1, - 0,1,0,89,0,110,2,48,0,116,6,124,1,100,2,100, + 0,1,0,89,0,110,2,119,0,116,6,124,1,100,2,100, 0,131,3,100,0,117,0,114,216,122,40,124,1,106,9,124, 1,95,10,116,11,124,1,100,3,131,2,115,194,124,0,106, 2,160,12,100,4,161,1,100,5,25,0,124,1,95,10,87, 0,110,18,4,0,116,8,121,214,1,0,1,0,1,0,89, - 0,110,2,48,0,116,6,124,1,100,6,100,0,131,3,100, + 0,110,2,119,0,116,6,124,1,100,6,100,0,131,3,100, 0,117,0,144,1,114,14,122,12,124,0,124,1,95,13,87, 0,124,1,83,0,4,0,116,8,144,1,121,12,1,0,1, - 0,1,0,89,0,124,1,83,0,48,0,124,1,83,0,41, + 0,1,0,89,0,124,1,83,0,119,0,124,1,83,0,41, 7,78,114,106,0,0,0,114,152,0,0,0,114,148,0,0, 0,114,135,0,0,0,114,25,0,0,0,114,113,0,0,0, 41,14,114,116,0,0,0,114,164,0,0,0,114,20,0,0, @@ -1028,10 +1028,10 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 14,124,2,161,1,1,0,87,0,110,40,1,0,1,0,1, 0,122,14,116,9,106,10,124,0,106,11,61,0,87,0,130, 0,4,0,116,15,121,176,1,0,1,0,1,0,89,0,130, - 0,48,0,116,9,106,10,160,16,124,0,106,11,161,1,125, + 0,119,0,116,9,106,10,160,16,124,0,106,11,161,1,125, 2,124,2,116,9,106,10,124,0,106,11,60,0,116,17,100, 6,124,0,106,11,124,0,106,0,131,3,1,0,87,0,100, - 7,124,0,95,8,124,2,83,0,100,7,124,0,95,8,48, + 7,124,0,95,8,124,2,83,0,100,7,124,0,95,8,119, 0,41,8,78,114,157,0,0,0,114,162,0,0,0,84,114, 161,0,0,0,114,19,0,0,0,122,18,105,109,112,111,114, 116,32,123,33,114,125,32,35,32,123,33,114,125,70,41,18, @@ -1053,7 +1053,7 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 0,67,0,0,0,115,54,0,0,0,116,0,124,0,106,1, 131,1,143,24,1,0,116,2,124,0,131,1,87,0,2,0, 100,1,4,0,4,0,131,3,1,0,83,0,49,0,115,40, - 48,0,1,0,1,0,1,0,89,0,1,0,100,1,83,0, + 119,1,1,0,1,0,1,0,89,0,1,0,100,1,83,0, 41,2,122,191,82,101,116,117,114,110,32,97,32,110,101,119, 32,109,111,100,117,108,101,32,111,98,106,101,99,116,44,32, 108,111,97,100,101,100,32,98,121,32,116,104,101,32,115,112, @@ -1429,14 +1429,14 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 4,0,116,9,121,128,1,0,1,0,1,0,116,10,124,5, 124,0,124,1,131,3,125,7,124,7,100,1,117,0,114,124, 89,0,87,0,100,1,4,0,4,0,131,3,1,0,113,52, - 89,0,110,14,48,0,124,6,124,0,124,1,124,2,131,3, + 89,0,110,14,119,0,124,6,124,0,124,1,124,2,131,3, 125,7,87,0,100,1,4,0,4,0,131,3,1,0,110,16, - 49,0,115,162,48,0,1,0,1,0,1,0,89,0,1,0, + 49,0,115,162,119,1,1,0,1,0,1,0,89,0,1,0, 124,7,100,1,117,1,114,52,124,4,144,1,115,16,124,0, 116,0,106,6,118,0,144,1,114,16,116,0,106,6,124,0, 25,0,125,8,122,10,124,8,106,11,125,9,87,0,110,26, 4,0,116,9,121,244,1,0,1,0,1,0,124,7,6,0, - 89,0,2,0,1,0,83,0,48,0,124,9,100,1,117,0, + 89,0,2,0,1,0,83,0,119,0,124,9,100,1,117,0, 144,1,114,8,124,7,2,0,1,0,83,0,124,9,2,0, 1,0,83,0,124,7,2,0,1,0,83,0,100,1,83,0, 41,4,122,21,70,105,110,100,32,97,32,109,111,100,117,108, @@ -1500,7 +1500,7 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 1,106,2,124,3,25,0,125,4,122,10,124,4,106,4,125, 2,87,0,110,44,4,0,116,5,121,126,1,0,1,0,1, 0,116,6,100,3,23,0,160,7,124,0,124,3,161,2,125, - 5,116,8,124,5,124,0,100,4,141,2,100,0,130,2,48, + 5,116,8,124,5,124,0,100,4,141,2,100,0,130,2,119, 0,116,9,124,0,124,2,131,2,125,6,124,6,100,0,117, 0,114,164,116,8,116,6,160,7,124,0,161,1,124,0,100, 4,141,2,130,1,116,10,124,6,131,1,125,7,124,3,144, @@ -1509,7 +1509,7 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 4,124,8,124,7,131,3,1,0,87,0,124,7,83,0,4, 0,116,5,144,1,121,14,1,0,1,0,1,0,100,6,124, 3,155,2,100,7,124,8,155,2,157,4,125,5,116,12,160, - 13,124,5,116,14,161,2,1,0,89,0,124,7,83,0,48, + 13,124,5,116,14,161,2,1,0,89,0,124,7,83,0,119, 0,124,7,83,0,41,8,78,114,135,0,0,0,114,25,0, 0,0,122,23,59,32,123,33,114,125,32,105,115,32,110,111, 116,32,97,32,112,97,99,107,97,103,101,114,19,0,0,0, @@ -1540,7 +1540,7 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 2,116,4,117,0,114,56,116,5,124,0,124,1,131,2,87, 0,2,0,100,1,4,0,4,0,131,3,1,0,83,0,87, 0,100,1,4,0,4,0,131,3,1,0,110,16,49,0,115, - 76,48,0,1,0,1,0,1,0,89,0,1,0,124,2,100, + 76,119,1,1,0,1,0,1,0,89,0,1,0,124,2,100, 1,117,0,114,116,100,2,160,6,124,0,161,1,125,3,116, 7,124,3,124,0,100,3,141,2,130,1,116,8,124,0,131, 1,1,0,124,2,83,0,41,4,122,25,70,105,110,100,32, @@ -1602,8 +1602,8 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 4,4,0,116,10,121,214,1,0,125,7,1,0,122,42,124, 7,106,11,124,6,107,2,114,200,116,12,106,13,160,14,124, 6,116,15,161,2,100,10,117,1,114,200,87,0,89,0,100, - 10,125,7,126,7,113,4,130,0,100,10,125,7,126,7,48, - 0,124,0,83,0,48,0,41,11,122,238,70,105,103,117,114, + 10,125,7,126,7,113,4,130,0,100,10,125,7,126,7,119, + 1,124,0,83,0,119,0,41,11,122,238,70,105,103,117,114, 101,32,111,117,116,32,119,104,97,116,32,95,95,105,109,112, 111,114,116,95,95,32,115,104,111,117,108,100,32,114,101,116, 117,114,110,46,10,10,32,32,32,32,84,104,101,32,105,109, |