Open eee4017 opened 3 hours ago
Thanks for the report, we'll be upgrading the gast
source code soon.
@SigureMo , 能麻煩將 PR#68892 cherry-pick 到分支 release/3.0-beta2 嗎?
PR 验证还需要周期,问题还没完全解决,cherry-pick 可能来不及
现在有哪些场景可能会受到影响呢?Python 3.12 是完全不可用么?还是只是单测场景有问题?
@jeng1220
刚刚问了下,根据发版计划,v3.0.0-beta2 tag 应该是赶不上了,但这个 PR 完成后,并且打完 tag 后可以 cherry-pick 到 release/3.0-beta2 下
也就是说发布的 wheel 包里没有这个 PR,但是 release/3.0-beta2 里会有,请问这样可以解决问题么?
bug描述 Describe the Bug
PaddlePaddle utilizes
gast
for handling Python Abstract Syntax Trees (AST). With the release of Python 3.12, changes to Python’s grammar have introduced new syntax, such astype_param
, which is now part of Python's AST. The gast has updated with this grammar. However, since PaddlePaddle does not usegast
as a submodule, it has not kept pace with the latest updates ingast
.The test
test_gast_with_compatibility
fails when executed in a Python 3.12 environment.Error Log:
The error arises because the
type_params
syntax introduced in Python 3.12 is not recognized by the existinggast
version in PaddlePaddle, causing mismatches in AST comparisons during testing.Although updating
gast
to a newer version could potentially resolve the issue, there are additional code adjustments required within PaddlePaddle’s JIT modules. For example, the following locations need to be updated to handle grammar changes in Python 3.12: utils.py origin_info.py.其他补充信息 Additional Supplementary Information
No response