We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我们在开发过程中难免会有一些版本兼容代码,但这些代码应当在旧版本退场时进行清理,这里记录一些我个人阅读代码、开发过程中所了解到的一些版本兼容代码,欢迎大家补充
Paddle/paddle/fluid/pybind/eval_frame.h
Line 26 in 9985598
ast.unparse
astor
ast
Literal
check_approval.py
Paddle/test/dygraph_to_static/check_approval.py
Lines 55 to 82 in 7d0dee3
removesuffix
removeprefix
.strip()
{**$A, **$B}
union_free_vars
A | B | C
co_lnotab
co_linetable
Paddle/python/paddle/jit/sot/opcode_translator/executor/pycode_generator.py
Line 248 in a3ed849
Line 273 in a3ed849
eval_frame
PRECALL
PEP 584 – Add Union Operators To dict ↩
The text was updated successfully, but these errors were encountered:
SigureMo
No branches or pull requests
我们在开发过程中难免会有一些版本兼容代码,但这些代码应当在旧版本退场时进行清理,这里记录一些我个人阅读代码、开发过程中所了解到的一些版本兼容代码,欢迎大家补充
已退场版本
Python 3.7
Python 3.8
Paddle/paddle/fluid/pybind/eval_frame.h
Line 26 in 9985598
ast.unparse
取代,Retireastor
, asast.unparse
exists, and migrate it into API-compatible shims ofast
for older versions of python berkerpeksag/astor#204 也有相关讨论Literal
反编译回字符串时出 bug 了,因此加了调整的逻辑,3.9 可以安全清理check_approval.py
里为 3.8 加的 unparse 逻辑Paddle/test/dygraph_to_static/check_approval.py
Lines 55 to 82 in 7d0dee3
removesuffix
和removeprefix
已经 ready),见 [CodeStyle][B005] Using.strip()
with multi-character strings is misleading the reader #52103 (comment){**$A, **$B}
搜索并替换下,SOT 里的union_free_vars
也没有存在的必要了,相关地方直接用A | B | C
即可Python 3.9
co_lnotab
生成逻辑,3.10 及之后会使用co_linetable
Paddle/python/paddle/jit/sot/opcode_translator/executor/pycode_generator.py
Line 248 in a3ed849
Python 3.10
co_linetable
3.10 生成逻辑Paddle/python/paddle/jit/sot/opcode_translator/executor/pycode_generator.py
Line 273 in a3ed849
eval_frame
中各种 3.11 与之前的适配逻辑Python 3.11
PRECALL
字节码相关逻辑,3.12 中该字节码已经被移除Footnotes
PEP 584 – Add Union Operators To dict ↩
The text was updated successfully, but these errors were encountered: