Skip to content
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

Remove py36 code in .py files #48426

Merged
merged 4 commits into from
Nov 29, 2022
Merged

Conversation

gsq7474741
Copy link
Contributor

@gsq7474741 gsq7474741 commented Nov 27, 2022

PR types

Others

PR changes

Others

Describe

清理框架代码中Python 3.5/3.6 相关逻辑分支
related works:

@paddle-bot
Copy link

paddle-bot bot commented Nov 27, 2022

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@SigureMo SigureMo self-assigned this Nov 27, 2022
@SigureMo SigureMo self-requested a review November 27, 2022 16:40
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

此外应该还有一些通过 sys.version 来进行判断的,可以一起清理下~~~(不过要注意下 sys.version 返回的字符串大小判断逻辑和 tuple 不太一样)

python/paddle/utils/gast/ast3.py Outdated Show resolved Hide resolved
tools/dockerfile/build_scripts/ssl-check.py Outdated Show resolved Hide resolved
@gsq7474741 gsq7474741 requested a review from SigureMo November 28, 2022 09:35
SigureMo
SigureMo previously approved these changes Nov 28, 2022
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

2022-11-28 18:20:24 ************************************************************************************
2022-11-28 18:20:24 Your PR code style check failed.
2022-11-28 18:20:24 Please install pre-commit locally and set up git hook scripts:
2022-11-28 18:20:24 
2022-11-28 18:20:24     pip install pre-commit==2.17.0
2022-11-28 18:20:24     pre-commit install
2022-11-28 18:20:24 
2022-11-28 18:20:24 Then, run pre-commit to check codestyle issues in your PR:
2022-11-28 18:20:24 
2022-11-28 18:20:24     pre-commit run --files python/paddle/distributed/spawn.py python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_mnist.py python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_no_sync.py python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_se_resnext.py python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_sparse_embedding.py python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_sparse_embedding_over_height.py python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_unused_variables.py python/paddle/fluid/tests/unittests/test_paddle_save_load.py python/paddle/fluid/tests/unittests/test_static_save_load.py python/paddle/hapi/progressbar.py python/paddle/incubate/multiprocessing/reductions.py python/paddle/vision/datasets/folder.py tools/dockerfile/build_scripts/ssl-check.py
2022-11-28 18:20:24 
2022-11-28 18:20:24 For more information, please refer to our codestyle check guide:
2022-11-28 18:20:24 https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/git_guides/codestyle_check_guide_cn.html
2022-11-28 18:20:24 ************************************************************************************

可以按照提示解决下 codestyle 问题,主要是 Black、Flake8 F401 问题(pylint 不用管),都可自动修复,运行命令后直接 commit 应该就可以解决了

其余 LGTM~

可以考虑之后一个 PR 解决 sys.version 相关的一些分支

@gsq7474741
Copy link
Contributor Author

2022-11-28 18:20:24 ************************************************************************************
2022-11-28 18:20:24 Your PR code style check failed.
2022-11-28 18:20:24 Please install pre-commit locally and set up git hook scripts:
2022-11-28 18:20:24 
2022-11-28 18:20:24     pip install pre-commit==2.17.0
2022-11-28 18:20:24     pre-commit install
2022-11-28 18:20:24 
2022-11-28 18:20:24 Then, run pre-commit to check codestyle issues in your PR:
2022-11-28 18:20:24 
2022-11-28 18:20:24     pre-commit run --files python/paddle/distributed/spawn.py python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_mnist.py python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_no_sync.py python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_se_resnext.py python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_sparse_embedding.py python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_sparse_embedding_over_height.py python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_unused_variables.py python/paddle/fluid/tests/unittests/test_paddle_save_load.py python/paddle/fluid/tests/unittests/test_static_save_load.py python/paddle/hapi/progressbar.py python/paddle/incubate/multiprocessing/reductions.py python/paddle/vision/datasets/folder.py tools/dockerfile/build_scripts/ssl-check.py
2022-11-28 18:20:24 
2022-11-28 18:20:24 For more information, please refer to our codestyle check guide:
2022-11-28 18:20:24 https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/git_guides/codestyle_check_guide_cn.html
2022-11-28 18:20:24 ************************************************************************************

可以按照提示解决下 codestyle 问题,主要是 Black、Flake8 F401 问题(pylint 不用管),都可自动修复,运行命令后直接 commit 应该就可以解决了

其余 LGTM~

可以考虑之后一个 PR 解决 sys.version 相关的一些分支

好滴 现在pre-commit在pylint阶段会报错,不知道你这边是不是这样

@SigureMo
Copy link
Member

SigureMo commented Nov 28, 2022

好滴 现在pre-commit在pylint阶段会报错,不知道你这边是不是这样

pylint 暂时不用管,目前有很多存量,问题详情见 #47821

CI 里显示貌似还有两个多余的 import 没有删除?

@gsq7474741
Copy link
Contributor Author

好滴 现在pre-commit在pylint阶段会报错,不知道你这边是不是这样

pylint 暂时不用管,目前有很多存量,问题详情见 #47821

CI 里显示貌似还有两个多余的 import 没有删除?

done

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

LGTM~

@luotao1 luotao1 changed the title [WIP]Remove py36 code in .py files Remove py36 code in .py files Nov 29, 2022
@luotao1 luotao1 merged commit 105bb92 into PaddlePaddle:develop Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants