Skip to content

[3.8] Remove unused dependency astor - #72870

Merged
SigureMo merged 3 commits into
PaddlePaddle:developfrom
gouzil:py38/remove_astor
May 22, 2025
Merged

SigureMo merged 3 commits into
PaddlePaddle:developfrom
gouzil:py38/remove_astor

Conversation

@gouzil

@gouzil gouzil commented May 22, 2025 •

Copy link
Copy Markdown
Collaborator

PR Category

Execute Infrastructure

PR Types

Deprecations

Description

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

Related links

@paddle-bot

paddle-bot Bot commented May 22, 2025

Copy link
Copy Markdown

你的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
Comment thread python/paddle/jit/api.py Outdated

>>> import scipy
>>> import astor
>>> import torch

Copy link
Copy Markdown
Collaborator

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 mentioned this pull request May 22, 2025
12 of 21 tasks
@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

@SigureMo SigureMo left a comment

Copy link
Copy Markdown
Collaborator

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
Comment thread pyproject.toml

[[tool.mypy.overrides]]
module = [
"astor",

Copy link
Copy Markdown
Collaborator

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
@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