I will take out the assertion for the ast_link attribute at the end of your review. I will squash the commits.
I have not considered Markup-Strings yet. They are just normal Strings.
I added string representations for some ast objects to better see how things are connected.
All ast_links are set in the parser except for import statements as their names are resolved in the ast.py.
The import token itself is set to the files own package because it was easier to set the link at the moment the token first appears. The names are resolved after the graph was built and set correctly to their own ast package's object.
Comments are linked to the files main package. I have put that at the end of each file's parsing because comments could appear at the top before the "package ..." clause.
Infos: