8000 bpo-33211: Change line number of decorated nodes back to def by emmatyping · Pull Request #6460 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo 8000 -33211: Change line number of decorated nodes back to def #6460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unused var
  • Loading branch information
emmatyping committed Apr 12, 2018
commit 649506c5c535a53ccb658d0b38eaafd264c09730
3 changes: 2 additions & 1 deletion Python/ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,6 @@ static stmt_ty
ast_for_decorated(struct compiling *c, const node *n)
{
/* decorated: decorators (classdef | funcdef | async_funcdef) */
stmt_ty thing = NULL;
asdl_seq *decorator_seq = NULL;

REQ(n, decorated);
Expand All @@ -1691,6 +1690,8 @@ ast_for_decorated(struct compiling *c, const node *n)
return ast_for_classdef(c, CHILD(n, 1), decorator_seq);
} else if (TYPE(CHILD(n, 1)) == async_funcdef) {
return ast_for_async_funcdef(c, CHILD(n, 1), decorator_seq);
} else {
return NULL; // should never ever happen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe then assert 0?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Py_UNREACHABLE()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still not fixed.

}
}

Expand Down
10 changes: 5 additions & 5 deletions Python/importlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,8 @@ const unsigned char _Py_M__importlib[] = {
114,114,0,0,0,218,8,112,114,111,112,101,114,116,121,114,
112,0,0,0,218,6,115,101,116,116,101,114,114,119,0,0,
0,114,113,0,0,0,114,10,0,0,0,114,10,0,0,0,
114,10,0,0,0,114,11,0,0,0,114,102,0,0,0,76,
1,0,0,115,18,0,0,0,12,37,4,1,14,11,8,10,
114,10,0,0,0,114,11,0,0,0,114,102,0,0,0,172,
1,0,0,115,18,0,0,0,12,197,4,1,14,11,8,10,
8,13,12,9,14,4,12,8,12,4,114,102,0,0,0,41,
2,114,103,0,0,0,114,105,0,0,0,99,2,0,0,0,
2,0,0,0,6,0,0,0,8,0,0,0,67,0,0,0,
Expand Down Expand Up @@ -1196,8 +1196,8 @@ const unsigned char _Py_M__importlib[] = {
0,0,114,74,0,0,0,114,147,0,0,0,114,148,0,0,
0,114,105,0,0,0,114,84,0,0,0,114,137,0,0,0,
114,10,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
11,0,0,0,114,141,0,0,0,189,2,0,0,115,18,0,
0,0,12,10,12,9,14,9,14,12,12,8,12,6,16,6,
11,0,0,0,114,141,0,0,0,253,2,0,0,115,18,0,
0,0,12,202,12,9,14,9,14,12,12,8,12,6,16,6,
16,6,16,4,114,141,0,0,0,99,0,0,0,0,0,0,
0,0,0,0,0,0,4,0,0,0,64,0,0,0,115,140,
0,0,0,101,0,90,1,100,0,90,2,100,1,90,3,101,
Expand Down Expand Up @@ -1340,7 +1340,7 @@ const unsigned char _Py_M__importlib[] = {
0,114,137,0,0,0,114,77,0,0,0,114,147,0,0,0,
114,148,0,0,0,114,105,0,0,0,114,10,0,0,0,114,
10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,151,
0,0,0,6,3,0,0,115,18,0,0,0,12,10,12,9,
0,0,0,74,3,0,0,115,18,0,0,0,12,198,12,9,
14,7,14,9,12,4,12,9,12,10,16,6,16,6,114,151,
0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,64,0,0,0,115,32,0,0,0,101,0,90,
Expand Down
16 changes: 8 additions & 8 deletions Python/importlib_external.h
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ const unsigned char _Py_M__importlib_external[] = {
116,104,111,100,114,173,0,0,0,114,179,0,0,0,114,182,
0,0,0,114,183,0,0,0,114,2,0,0,0,114,2,0,
0,0,114,2,0,0,0,114,4,0,0,0,114,170,0,0,
0,130,2,0,0,115,14,0,0,0,12,5,4,3,4,2,
0,180,2,0,0,115,14,0,0,0,12,211,4,3,4,2,
4,3,12,7,12,15,14,16,114,170,0,0,0,99,0,0,
0,0,0,0,0,0,0,0,0,0,2,0,0,0,64,0,
0,0,115,48,0,0,0,101,0,90,1,100,0,90,2,100,
Expand Down Expand Up @@ -1474,8 +1474,8 @@ const unsigned char _Py_M__importlib_external[] = {
0,0,114,223,0,0,0,114,228,0,0,0,90,13,95,95,
99,108,97,115,115,99,101,108,108,95,95,114,2,0,0,0,
114,2,0,0,0,41,1,114,213,0,0,0,114,4,0,0,
0,114,212,0,0,0,111,3,0,0,115,22,0,0,0,12,
5,8,6,8,4,8,4,16,12,12,4,8,8,12,5,8,
0,114,212,0,0,0,153,3,0,0,115,22,0,0,0,12,
219,8,6,8,4,8,4,16,12,12,4,8,8,12,5,8,
4,8,6,8,6,114,212,0,0,0,99,0,0,0,0,0,
0,0,0,0,0,0,0,3,0,0,0,64,0,0,0,115,
46,0,0,0,101,0,90,1,100,0,90,2,100,1,90,3,
Expand Down Expand Up @@ -1729,7 +1729,7 @@ const unsigned char _Py_M__importlib_external[] = {
0,0,0,114,161,0,0,0,114,188,0,0,0,114,202,0,
0,0,114,118,0,0,0,114,159,0,0,0,114,2,0,0,
0,114,2,0,0,0,114,2,0,0,0,114,4,0,0,0,
114,235,0,0,0,253,3,0,0,115,18,0,0,0,12,8,
114,235,0,0,0,44,4,0,0,115,18,0,0,0,12,217,
8,4,8,4,8,3,8,8,8,6,8,6,8,4,8,5,
114,235,0,0,0,99,0,0,0,0,0,0,0,0,0,0,
0,0,2,0,0,0,64,0,0,0,115,96,0,0,0,101,
Expand Down Expand Up @@ -1973,8 +1973,8 @@ const unsigned char _Py_M__importlib_external[] = {
0,114,4,1,0,0,114,161,0,0,0,114,202,0,0,0,
114,188,0,0,0,114,187,0,0,0,114,192,0,0,0,114,
194,0,0,0,114,2,0,0,0,114,2,0,0,0,114,2,
0,0,0,114,4,0,0,0,114,3,1,0,0,110,4,0,
0,115,16,0,0,0,8,1,8,4,12,8,8,3,8,3,
0,0,0,114,4,0,0,0,114,3,1,0,0,114,4,0,
0,115,16,0,0,0,8,253,8,4,12,8,8,3,8,3,
8,3,8,3,8,3,114,3,1,0,0,99,0,0,0,0,
0,0,0,0,0,0,0,0,4,0,0,0,64,0,0,0,
115,106,0,0,0,101,0,90,1,100,0,90,2,100,1,90,
Expand Down Expand Up @@ -2166,7 +2166,7 @@ const unsigned char _Py_M__importlib_external[] = {
114,14,1,0,0,114,15,1,0,0,114,18,1,0,0,114,
182,0,0,0,114,183,0,0,0,114,2,0,0,0,114,2,
0,0,0,114,2,0,0,0,114,4,0,0,0,114,5,1,
0,0,152,4,0,0,115,14,0,0,0,12,5,12,10,12,
0,0,16,5,0,0,115,14,0,0,0,12,141,12,10,12,
13,12,22,12,15,14,32,14,24,114,5,1,0,0,99,0,
0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,64,
0,0,0,115,90,0,0,0,101,0,90,1,100,0,90,2,
Expand Down Expand Up @@ -2430,7 +2430,7 @@ const unsigned char _Py_M__importlib_external[] = {
182,0,0,0,114,26,1,0,0,114,184,0,0,0,114,32,
1,0,0,114,0,1,0,0,114,2,0,0,0,114,2,0,
0,0,114,2,0,0,0,114,4,0,0,0,114,19,1,0,
0,30,5,0,0,115,18,0,0,0,12,9,8,14,8,4,
0,155,5,0,0,115,18,0,0,0,12,140,8,14,8,4,
4,2,8,12,8,5,10,48,8,32,12,17,114,19,1,0,
0,99,4,0,0,0,0,0,0,0,6,0,0,0,8,0,
0,0,67,0,0,0,115,146,0,0,0,124,0,160,0,100,
Expand Down
0