Skip to content

[3.8] Remove unused dependency astor #72870

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

Merged
merged 3 commits into from
May 22, 2025

Conversation

gouzil
Copy link
Member

@gouzil gouzil commented May 22, 2025

PR Category

Execute Infrastructure

PR Types

Deprecations

Description

移除第三方库 astor,其仅用于 AST 动转静,但 AST 动转静很久之前就只在 3.9 及以上版本使用内置的 ast.unparse 替代 astor 了,而 python 3.8 已经退场,astor 已经彻底无用,故彻底移除

Related links

Copy link

paddle-bot bot commented May 22, 2025

你的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.

@paddle-bot paddle-bot bot added the contributor External developers label May 22, 2025
@@ -156,13 +156,13 @@ def ignore_module(modules: list[ModuleType]) -> None:
.. code-block:: python

>>> import scipy
>>> import astor
>>> import torch
Copy link
Member

Choose a reason for hiding this comment

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

这代码 CI 会跑的,import torch 是什么鬼?改用 decorator

@SigureMo SigureMo changed the title [3.8] remove astor package [3.8] Remove dependency `astor· May 22, 2025
@SigureMo SigureMo changed the title [3.8] Remove dependency `astor· [3.8] Remove dependency astor May 22, 2025
SigureMo
SigureMo previously approved these changes May 22, 2025
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.

LGTMeow 🐾

@SigureMo SigureMo changed the title [3.8] Remove dependency astor [3.8] Remove unused dependency astor May 22, 2025
@@ -200,7 +200,6 @@ show_column_numbers = true

[[tool.mypy.overrides]]
module = [
"astor",
Copy link
Member

Choose a reason for hiding this comment

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

这里加上 decorator 吧,mypy 检查挂了

@SigureMo SigureMo merged commit d716e08 into PaddlePaddle:develop May 22, 2025
53 of 54 checks passed
@SigureMo SigureMo deleted the py38/remove_astor branch June 29, 2025 17:21
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.

2 participants