MemoryError due to AST

27 views
Skip to first unread message

Leonel Câmara

unread,
Mar 29, 2019, 9:35:41 AM3/29/19
to web2py-developers
So I made this change:

Which basically makes web2py use ast instead of a regex to find functions, this solves the problem with type annotations and other things that the regex didn't expect when searching for functions, but since I started using it I have gotten quite a lot of MemoryError in my application such as this:

    parsed = ast.parse(data)
File "/usr/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)

In fact since upgrading to 2.18.4 I've been getting memory errors in a lot of other places as well, namely in DAL stuff. I'm not sure if they're related, if they're caused by this ast change or due to changes in the DAL or custom importer. 
 
Anyone having the same problems?

Reply all
Reply to author
Forward
0 new messages