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.
This commit is contained in:
Mark Shannon 2020-12-17 13:55:28 +00:00 committed by GitHub
parent 40125ab325
commit bf353f3c2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 317 additions and 225 deletions

View file

@ -128,11 +128,11 @@ const unsigned char _Py_M__zipimport[] = {
12,124,1,161,1,92,2,125,5,125,6,124,5,124,1,107,
2,114,132,116,4,100,5,124,1,100,3,141,2,130,1,124,
5,125,1,124,3,160,13,124,6,161,1,1,0,89,0,110,
28,48,0,124,4,106,14,100,6,64,0,100,7,107,3,114,
28,119,0,124,4,106,14,100,6,64,0,100,7,107,3,114,
180,116,4,100,5,124,1,100,3,141,2,130,1,113,66,122,
12,116,15,124,1,25,0,125,7,87,0,110,34,4,0,116,
16,121,226,1,0,1,0,1,0,116,17,124,1,131,1,125,
7,124,7,116,15,124,1,60,0,89,0,110,2,48,0,124,
7,124,7,116,15,124,1,60,0,89,0,110,2,119,0,124,
7,124,0,95,18,124,1,124,0,95,19,116,8,106,20,124,
3,100,0,100,0,100,8,133,3,25,0,142,0,124,0,95,
21,124,0,106,21,144,1,114,32,124,0,4,0,106,21,116,
@ -319,7 +319,7 @@ const unsigned char _Py_M__zipimport[] = {
0,106,4,116,2,23,0,131,1,100,1,133,2,25,0,125,
2,122,14,124,0,106,6,124,2,25,0,125,3,87,0,110,
26,4,0,116,7,121,98,1,0,1,0,1,0,116,8,100,
2,100,3,124,2,131,3,130,1,48,0,116,9,124,0,106,
2,100,3,124,2,131,3,130,1,119,0,116,9,124,0,106,
4,124,3,131,2,83,0,41,4,122,154,103,101,116,95,100,
97,116,97,40,112,97,116,104,110,97,109,101,41,32,45,62,
32,115,116,114,105,110,103,32,119,105,116,104,32,102,105,108,
@ -365,7 +365,7 @@ const unsigned char _Py_M__zipimport[] = {
160,4,124,3,100,4,161,2,125,4,110,10,124,3,155,0,
100,5,157,2,125,4,122,14,124,0,106,5,124,4,25,0,
125,5,87,0,110,20,4,0,116,6,121,108,1,0,1,0,
1,0,89,0,100,1,83,0,48,0,116,7,124,0,106,8,
1,0,89,0,100,1,83,0,119,0,116,7,124,0,106,8,
124,5,131,2,160,9,161,0,83,0,41,6,122,253,103,101,
116,95,115,111,117,114,99,101,40,102,117,108,108,110,97,109,
101,41,32,45,62,32,115,111,117,114,99,101,32,115,116,114,
@ -434,7 +434,7 @@ const unsigned char _Py_M__zipimport[] = {
16,1,0,1,0,1,0,116,4,106,5,124,1,61,0,130,
0,122,14,116,4,106,5,124,1,25,0,125,6,87,0,110,
30,4,0,116,20,121,232,1,0,1,0,1,0,116,21,100,
4,124,1,155,2,100,5,157,3,131,1,130,1,48,0,116,
4,124,1,155,2,100,5,157,3,131,1,130,1,119,0,116,
22,160,23,100,6,124,1,124,5,161,3,1,0,124,6,83,
0,41,7,97,55,1,0,0,108,111,97,100,95,109,111,100,
117,108,101,40,102,117,108,108,110,97,109,101,41,32,45,62,
@ -496,7 +496,7 @@ const unsigned char _Py_M__zipimport[] = {
3,0,0,0,8,0,0,0,67,0,0,0,115,64,0,0,
0,122,20,124,0,160,0,124,1,161,1,115,18,87,0,100,
1,83,0,87,0,110,20,4,0,116,1,121,40,1,0,1,
0,1,0,89,0,100,1,83,0,48,0,100,2,100,3,108,
0,1,0,89,0,100,1,83,0,119,0,100,2,100,3,108,
2,109,3,125,2,1,0,124,2,124,0,124,1,131,2,83,
0,41,4,122,204,82,101,116,117,114,110,32,116,104,101,32,
82,101,115,111,117,114,99,101,82,101,97,100,101,114,32,102,
@ -578,23 +578,23 @@ const unsigned char _Py_M__zipimport[] = {
0,0,0,115,232,4,0,0,122,14,116,0,160,1,124,0,
161,1,125,1,87,0,110,32,4,0,116,2,121,46,1,0,
1,0,1,0,116,3,100,1,124,0,155,2,157,2,124,0,
100,2,141,2,130,1,48,0,124,1,144,4,143,142,1,0,
100,2,141,2,130,1,119,0,124,1,144,4,143,142,1,0,
122,36,124,1,160,4,116,5,11,0,100,3,161,2,1,0,
124,1,160,6,161,0,125,2,124,1,160,7,116,5,161,1,
125,3,87,0,110,32,4,0,116,2,121,124,1,0,1,0,
1,0,116,3,100,4,124,0,155,2,157,2,124,0,100,2,
141,2,130,1,48,0,116,8,124,3,131,1,116,5,107,3,
141,2,130,1,119,0,116,8,124,3,131,1,116,5,107,3,
114,156,116,3,100,4,124,0,155,2,157,2,124,0,100,2,
141,2,130,1,124,3,100,0,100,5,133,2,25,0,116,9,
107,3,144,1,114,154,122,24,124,1,160,4,100,6,100,3,
161,2,1,0,124,1,160,6,161,0,125,4,87,0,110,32,
4,0,116,2,121,230,1,0,1,0,1,0,116,3,100,4,
124,0,155,2,157,2,124,0,100,2,141,2,130,1,48,0,
124,0,155,2,157,2,124,0,100,2,141,2,130,1,119,0,
116,10,124,4,116,11,24,0,116,5,24,0,100,6,131,2,
125,5,122,22,124,1,160,4,124,5,161,1,1,0,124,1,
160,7,161,0,125,6,87,0,110,34,4,0,116,2,144,1,
121,50,1,0,1,0,1,0,116,3,100,4,124,0,155,2,
157,2,124,0,100,2,141,2,130,1,48,0,124,6,160,12,
157,2,124,0,100,2,141,2,130,1,119,0,124,6,160,12,
116,9,161,1,125,7,124,7,100,6,107,0,144,1,114,90,
116,3,100,7,124,0,155,2,157,2,124,0,100,2,141,2,
130,1,124,6,124,7,124,7,116,5,23,0,133,2,25,0,
@ -612,7 +612,7 @@ const unsigned char _Py_M__zipimport[] = {
100,2,141,2,130,1,105,0,125,11,100,6,125,12,122,14,
124,1,160,4,124,2,161,1,1,0,87,0,110,34,4,0,
116,2,144,2,121,86,1,0,1,0,1,0,116,3,100,4,
124,0,155,2,157,2,124,0,100,2,141,2,130,1,48,0,
124,0,155,2,157,2,124,0,100,2,141,2,130,1,119,0,
9,0,124,1,160,7,100,16,161,1,125,3,116,8,124,3,
131,1,100,5,107,0,144,2,114,122,116,14,100,17,131,1,
130,1,124,3,100,0,100,5,133,2,25,0,100,18,107,3,
@ -634,7 +634,7 @@ const unsigned char _Py_M__zipimport[] = {
100,2,141,2,130,1,124,22,124,10,55,0,125,22,122,14,
124,1,160,7,124,19,161,1,125,23,87,0,110,34,4,0,
116,2,144,3,121,182,1,0,1,0,1,0,116,3,100,4,
124,0,155,2,157,2,124,0,100,2,141,2,130,1,48,0,
124,0,155,2,157,2,124,0,100,2,141,2,130,1,119,0,
116,8,124,23,131,1,124,19,107,3,144,3,114,216,116,3,
100,4,124,0,155,2,157,2,124,0,100,2,141,2,130,1,
122,50,116,8,124,1,160,7,124,8,124,19,24,0,161,1,
@ -642,17 +642,17 @@ const unsigned char _Py_M__zipimport[] = {
100,4,124,0,155,2,157,2,124,0,100,2,141,2,130,1,
87,0,110,34,4,0,116,2,144,4,121,44,1,0,1,0,
1,0,116,3,100,4,124,0,155,2,157,2,124,0,100,2,
141,2,130,1,48,0,124,13,100,29,64,0,144,4,114,66,
141,2,130,1,119,0,124,13,100,29,64,0,144,4,114,66,
124,23,160,16,161,0,125,23,110,52,122,14,124,23,160,16,
100,30,161,1,125,23,87,0,110,36,4,0,116,17,144,4,
121,116,1,0,1,0,1,0,124,23,160,16,100,31,161,1,
160,18,116,19,161,1,125,23,89,0,110,2,48,0,124,23,
160,18,116,19,161,1,125,23,89,0,110,2,119,0,124,23,
160,20,100,32,116,21,161,2,125,23,116,22,160,23,124,0,
124,23,161,2,125,24,124,24,124,14,124,18,124,4,124,22,
124,15,124,16,124,17,102,8,125,25,124,25,124,11,124,23,
60,0,124,12,100,33,55,0,125,12,144,2,113,90,87,0,
100,0,4,0,4,0,131,3,1,0,110,18,49,0,144,4,
115,204,48,0,1,0,1,0,1,0,89,0,1,0,116,24,
115,204,119,1,1,0,1,0,1,0,89,0,1,0,116,24,
160,25,100,34,124,12,124,0,161,3,1,0,124,11,83,0,
41,35,78,122,21,99,97,110,39,116,32,111,112,101,110,32,
90,105,112,32,102,105,108,101,58,32,114,12,0,0,0,114,
@ -758,8 +758,8 @@ const unsigned char _Py_M__zipimport[] = {
100,3,97,0,122,58,122,16,100,4,100,5,108,4,109,5,
125,0,1,0,87,0,110,32,4,0,116,6,121,76,1,0,
1,0,1,0,116,1,160,2,100,1,161,1,1,0,116,3,
100,2,131,1,130,1,48,0,87,0,100,6,97,0,110,6,
100,6,97,0,48,0,116,1,160,2,100,7,161,1,1,0,
100,2,131,1,130,1,119,0,87,0,100,6,97,0,110,6,
100,6,97,0,119,0,116,1,160,2,100,7,161,1,1,0,
124,0,83,0,41,8,78,122,27,122,105,112,105,109,112,111,
114,116,58,32,122,108,105,98,32,85,78,65,86,65,73,76,
65,66,76,69,250,41,99,97,110,39,116,32,100,101,99,111,
@ -784,7 +784,7 @@ const unsigned char _Py_M__zipimport[] = {
2,124,0,161,1,144,1,143,6,125,10,122,14,124,10,160,
3,124,6,161,1,1,0,87,0,110,32,4,0,116,4,121,
96,1,0,1,0,1,0,116,0,100,3,124,0,155,2,157,
2,124,0,100,4,141,2,130,1,48,0,124,10,160,5,100,
2,124,0,100,4,141,2,130,1,119,0,124,10,160,5,100,
5,161,1,125,11,116,6,124,11,131,1,100,5,107,3,114,
128,116,7,100,6,131,1,130,1,124,11,100,0,100,7,133,
2,25,0,100,8,107,3,114,162,116,0,100,9,124,0,155,
@ -794,15 +794,15 @@ const unsigned char _Py_M__zipimport[] = {
0,124,13,23,0,125,14,124,6,124,14,55,0,125,6,122,
14,124,10,160,3,124,6,161,1,1,0,87,0,110,34,4,
0,116,4,144,1,121,6,1,0,1,0,1,0,116,0,100,
3,124,0,155,2,157,2,124,0,100,4,141,2,130,1,48,
3,124,0,155,2,157,2,124,0,100,4,141,2,130,1,119,
0,124,10,160,5,124,4,161,1,125,15,116,6,124,15,131,
1,124,4,107,3,144,1,114,40,116,4,100,12,131,1,130,
1,87,0,100,0,4,0,4,0,131,3,1,0,110,18,49,
0,144,1,115,62,48,0,1,0,1,0,1,0,89,0,1,
0,144,1,115,62,119,1,1,0,1,0,1,0,89,0,1,
0,124,3,100,1,107,2,144,1,114,86,124,15,83,0,122,
10,116,9,131,0,125,16,87,0,110,24,4,0,116,10,144,
1,121,120,1,0,1,0,1,0,116,0,100,13,131,1,130,
1,48,0,124,16,124,15,100,14,131,2,83,0,41,15,78,
1,119,0,124,16,124,15,100,14,131,2,83,0,41,15,78,
114,0,0,0,0,122,18,110,101,103,97,116,105,118,101,32,
100,97,116,97,32,115,105,122,101,114,94,0,0,0,114,12,
0,0,0,114,106,0,0,0,114,100,0,0,0,114,95,0,
@ -839,7 +839,7 @@ const unsigned char _Py_M__zipimport[] = {
0,124,3,124,2,100,1,156,2,125,5,122,18,116,0,160,
1,124,4,124,3,124,5,161,3,125,6,87,0,110,20,4,
0,116,2,121,48,1,0,1,0,1,0,89,0,100,0,83,
0,48,0,124,6,100,2,64,0,100,3,107,3,125,7,124,
0,119,0,124,6,100,2,64,0,100,3,107,3,125,7,124,
7,114,182,124,6,100,4,64,0,100,3,107,3,125,8,116,
3,106,4,100,5,107,3,144,1,114,10,124,8,115,106,116,
3,106,4,100,6,107,2,144,1,114,10,116,5,124,0,124,
@ -847,7 +847,7 @@ const unsigned char _Py_M__zipimport[] = {
3,160,6,116,0,106,7,124,9,161,2,125,10,122,20,116,
0,160,8,124,4,124,10,124,3,124,5,161,4,1,0,87,
0,110,104,4,0,116,2,121,180,1,0,1,0,1,0,89,
0,100,0,83,0,48,0,116,9,124,0,124,2,131,2,92,
0,100,0,83,0,119,0,116,9,124,0,124,2,131,2,92,
2,125,11,125,12,124,11,144,1,114,10,116,10,116,11,124,
4,100,7,100,8,133,2,25,0,131,1,124,11,131,2,114,
246,116,11,124,4,100,8,100,9,133,2,25,0,131,1,124,
@ -936,7 +936,7 @@ const unsigned char _Py_M__zipimport[] = {
100,4,25,0,125,4,124,2,100,5,25,0,125,5,116,1,
124,4,124,3,131,2,124,5,102,2,87,0,83,0,4,0,
116,2,116,3,116,4,102,3,121,108,1,0,1,0,1,0,
89,0,100,6,83,0,48,0,41,7,78,114,14,0,0,0,
89,0,100,6,83,0,119,0,41,7,78,114,14,0,0,0,
169,2,218,1,99,218,1,111,114,165,0,0,0,233,6,0,
0,0,233,3,0,0,0,41,2,114,0,0,0,0,114,0,
0,0,0,41,5,114,28,0,0,0,114,171,0,0,0,114,
@ -953,7 +953,7 @@ const unsigned char _Py_M__zipimport[] = {
2,25,0,100,2,118,0,115,20,74,0,130,1,124,1,100,
0,100,1,133,2,25,0,125,1,122,14,124,0,106,0,124,
1,25,0,125,2,87,0,110,20,4,0,116,1,121,66,1,
0,1,0,1,0,89,0,100,0,83,0,48,0,116,2,124,
0,1,0,1,0,89,0,100,0,83,0,119,0,116,2,124,
0,106,3,124,2,131,2,83,0,41,3,78,114,14,0,0,
0,114,172,0,0,0,41,4,114,28,0,0,0,114,26,0,
0,0,114,56,0,0,0,114,29,0,0,0,41,3,114,32,
@ -968,7 +968,7 @@ const unsigned char _Py_M__zipimport[] = {
3,100,1,124,0,106,4,116,5,124,6,100,2,100,3,141,
5,1,0,122,14,124,0,106,6,124,6,25,0,125,7,87,
0,110,18,4,0,116,7,121,86,1,0,1,0,1,0,89,
0,113,14,48,0,124,7,100,4,25,0,125,8,116,8,124,
0,113,14,119,0,124,7,100,4,25,0,125,8,116,8,124,
0,106,4,124,7,131,2,125,9,124,4,114,130,116,9,124,
0,124,8,124,6,124,1,124,9,131,5,125,10,110,10,116,
10,124,8,124,9,131,2,125,10,124,10,100,0,117,0,114,