This is actually a problem that is existing for a long time. A recent example would be the discussion in the python/cpython#64067.
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 python/cpython#63231) (like ast.List({ast.Constant(1)}, ctx=ast.Load()) wont pass, or the example in python/cpython#64067)
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields: ```python assignee = None closed_at = None created_at =
labels = ['type-feature', 'library']
title = 'Implementing a verifier function to verify integrity of AST nodes'
updated_at =
user = 'https://github.com/isidentical'
```
bugs.python.org fields:
```python
activity =
actor = 'BTaskaya'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation =
creator = 'BTaskaya'
dependencies = ['39981']
files = []
hgrepos = []
issue_num = 40483
keywords = []
message_count = 1.0
messages = ['367969']
nosy_count = 3.0
nosy_names = ['serhiy.storchaka', 'pablogsal', 'BTaskaya']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue40483'
versions = []
```