Skip to content

Fix test_origin_info to be compatible with PY3.8, because ast module is different in PY3.8 - #27201

Merged
liym27 merged 1 commit into
PaddlePaddle:developfrom
liym27:fix_test_origin_info_PY38
Sep 9, 2020
Merged

liym27 merged 1 commit into
PaddlePaddle:developfrom
liym27:fix_test_origin_info_PY38

Conversation

@liym27

@liym27 liym27 commented Sep 9, 2020 •

Copy link
Copy Markdown
Contributor

PR types

Bug fixes

PR changes

Others

Describe

Fix test_origin_info to be compatible with PY3.8, because ast module is different in PY3.8


There are differences in ast_node.lineno between PY3.8+ and PY3.8-.
If the first gast.FunctionDef has decorator, the lineno of gast.FunctionDef is differs.

  1. PY3.8-
    its lineno equals to the lineno of the first decorator node, which is not right.
  2. PY3.8 and PY3.8+
    its lineno is the actual lineno, which is right.

@paddle-bot-old

paddle-bot-old Bot commented Sep 9, 2020

Copy link
Copy Markdown

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot-old

paddle-bot-old Bot commented Sep 9, 2020 •

Copy link
Copy Markdown

✅ This PR's description meets the template requirements!
Please wait for other CI results.

…is different in PY3.8 test=develop

Change-Id: Ib574a43789e6cbb053ca70d1f0a371f6149ea692
@liym27
liym27 force-pushed the fix_test_origin_info_PY38 branch from 1c782c4 to 5a11be6 Compare September 9, 2020 07:04

@gfwm2013 gfwm2013 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@zhhsplendid zhhsplendid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@liym27
liym27 merged commit a1b640b into PaddlePaddle:develop Sep 9, 2020
@SigureMo SigureMo mentioned this pull request Dec 5, 2023
12 of 21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants