-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Support for gast
with Python 3.12
#68889
Comments
Thanks for the report, we'll be upgrading the |
@SigureMo , |
PR 验证还需要周期,问题还没完全解决,cherry-pick 可能来不及 现在有哪些场景可能会受到影响呢?Python 3.12 是完全不可用么?还是只是单测场景有问题? |
刚刚问了下,根据发版计划,v3.0.0-beta2 tag 应该是赶不上了,但这个 PR 完成后,并且打完 tag 后可以 cherry-pick 到 release/3.0-beta2 下 也就是说发布的 wheel 包里没有这个 PR,但是 release/3.0-beta2 里会有,请问这样可以解决问题么? |
可以的,感謝感謝 |
develop PR 已合入,#68919 进行了 cherry-pick,会在打 tag 后合入 |
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
The text was updated successfully, but these errors were encountered: