RustPython / RustPython/Parser
Hundread of files that are properly parsed(or not) in opposite to Python 3.11.2
未關閉
還沒有人認領這個 Issue。
- 主要語言
- Rust
- 星號
- 117
- 分支
- 38
- 平均合併
- 4 天 7 小時
- 30 天內合併 PR
- 1
描述
d23611db65dca2a71eb58fdcdce9d637f8fef8c2
When parsing with this repo multiple files, I found that sometimes python cannot parse file but this library can and vice versa.
Command to check if python can parse file
python -m py_compile PY_FILE_TEST_427160.py
Code to check if parser can parse file
let rust_valid = parse(content.as_str(), Mode::Module,"").is_ok();
Only ~3% files from pack, can be parsed by python, but not rustpython parser
Pack 644 files - OUTPUT_FILES.zip
Example files and errors
return imprt
SyntaxError: 'return' outside function
\
import _pl
Sorry: IndentationError: unexpected indent (79285088PY_FILE_TEST_5137609254.py, line 2)
# encoding: ut
SyntaxError: unknown encoding: ut
__p|ersion__ = '2.9.0'
SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?
from __future__ import un
SyntaxError: future feature un is not defined
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 OUTPUT_FILES.zip 開始,針對列出的範例,比較 python -m py_compile PY_FILE_TEST_427160.py 與 RustPython 的 parse(content.as_str(), Mode::Module, "").is_ok()。重現並最小化不相符之處,然後判定 parser 的行為是否與 Python 3.11.2 不同;當回報的差異已修正,或透過回歸測試涵蓋而獲得明確分類時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python, rust
- 領域
- compilers, testing-qa
- Issue 類型
- 缺陷
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100