Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

[Compat][3.11] add basic support for Python 3.11 #303

Merged
merged 21 commits into from
Aug 16, 2023
Merged

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented Aug 1, 2023

3.11 支持初尝试,主要适配工作如下:

主要修改了如下部分

  • 支持如下字节码
    • RESUME
    • BINARY_OP
  • 适配如下字节码
    • LOAD_GLOBAL
  • need_skip 适配 Python 3.11

此外修改了

  • DummyVariable rename 为 NullVariable,因为 Python 3.11 真的有 NULL

3.11 暂时 skip 的:

  • 大多数单测(含 test_01_basic.py 中的 NumPy case)
  • 动转静单测(尚未开启 + 监控)
  • examples 里的 graph_break.py

上述 skip 的地方在之后需要逐步支持~

一些其他 TODOs:

  • co_exceptiontable 支持(看起来暂时用空的就可以,delay)
  • 修复 Generator [SOT] eval frame skipping the generator frame in python 3.11 Paddle#56262
  • calc_offset_from_bytecode_offset 适配(之后适配,delay)
  • opcode_info.py 各种信息的适配,感觉一些没用的可以删掉了(可以作为之后的任务)
  • instruction_utils.py 各种逻辑的适配,基本每个函数都需要看一下

@paddle-bot
Copy link

paddle-bot bot commented Aug 1, 2023

Thanks for your contribution!

@SigureMo SigureMo changed the title try to add 3.11 support [Compat][3.11] add basic support for Python 3.11 Aug 15, 2023
Copy link
Collaborator

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

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

Great work!

@2742195759
Copy link
Collaborator

Great Job!

Copy link
Collaborator

@2742195759 2742195759 left a comment

Choose a reason for hiding this comment

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

LGTM

@SigureMo SigureMo merged commit 7f2e4b8 into develop Aug 16, 2023
8 checks passed
@SigureMo SigureMo deleted the py311-compat branch August 16, 2023 09:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants