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

Python3.7 退场的一些工作汇总 #59874

Closed
8 tasks done
gouzil opened this issue Dec 10, 2023 · 2 comments
Closed
8 tasks done

Python3.7 退场的一些工作汇总 #59874

gouzil opened this issue Dec 10, 2023 · 2 comments
Assignees
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc status/close 已关闭

Comments

@gouzil
Copy link
Member

gouzil commented Dec 10, 2023

paddle仓库:

前序工作:

代码退场:

CodeStyle

docs仓库:

欢迎大家补充

@gouzil gouzil added status/new-issue 新建 type/others 其他问题 labels Dec 10, 2023
@paddle-bot paddle-bot bot added the PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc label Dec 10, 2023
@luotao1 luotao1 moved this to In Progress in Call for Contributions Dec 11, 2023
@Ligoml Ligoml removed status/new-issue 新建 type/others 其他问题 labels Dec 11, 2023
@luotao1 luotao1 self-assigned this Dec 12, 2023
@zrr1999
Copy link
Member

zrr1999 commented Dec 21, 2023

https://github.com/pre-commit/pre-commit-hooks 里添加 debug-statements hook 可以拦截不支持的语法

@gouzil
Copy link
Member Author

gouzil commented Dec 22, 2023

https://github.com/pre-commit/pre-commit-hooks 里添加 debug-statements hook 可以拦截不支持的语法

记录一下我们的讨论结果:
debug-statements主要的功能是拦截pdb, breakpoint()这类 Debugger 函数方法

关于拦截不支持的语法,通过查看源码发现是通过 python 原生的 ast 实现的

  • 如果想要使用这个特性需要满足2个条件:
    1. 安装 pre-commit 的 python 版本为所支持的最低版本(也就是现在的 python3.8 )
    1. 需要控制 ci 中的 python 版本(目前外部开发没有权限)

相关链接:

对拦截不支持的语法简单实现:#60279

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc status/close 已关闭
Projects
Development

No branches or pull requests

6 participants