This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Implementing a verifier function to verify integrity of AST nodes
Type: enhancement Stage:
Components: Library (Lib) Versions:
process
Status: open Resolution:
Dependencies: 39981 Superseder:
Assigned To: Nosy List: BTaskaya, pablogsal, serhiy.storchaka
Priority: normal Keywords:

Created on 2020-05-03 12:15 by BTaskaya, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg367969 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python committer) Date: 2020-05-03 12:15
This is actually a problem that is existing for a long time. A recent example would be the discussion in the GH-19868.

Implementation
- It should check existence of all fields (like ast.Constant() wont verified)
- It should check types of all fields against their declarations in ASDL (this is actually depending on GH-19031) (like ast.List({ast.Constant(1)}, ctx=ast.Load()) wont pass, or the example in GH-19868)

After bpo-39981 resolved, I'll submit a patch.
History
Date User Action Args
2022-04-11 14:59:30adminsetgithub: 84663
2020-05-03 12:15:12BTaskayasetdependencies: + Default values for AST Nodes
2020-05-03 12:15:02BTaskayacreate