[Compiler-sig] current status of ast branch
Jeremy Hylton
jeremy at alum.mit.edu
Thu Apr 8 15:19:09 EDT 2004
A quick status report on the AST branch. The compiler is functional
enough to compile and execute setup.py and regrtest.py. Just getting
that far was surprisingly difficult; it required supporting a large
subset of the language than I expected.
I completed a full run of the test suite this afternoon. Here are the
results:
31 tests failed:
test_builtin test_class test_codeop test_compile test_compiler
test_copy_reg test_cpickle test_difflib test_doctest2
test_generators test_global test_grammar test_importhooks
test_inspect test_os test_pep263 test_pickle test_pkg test_profile
test_repr test_scope test_shelve test_symtable test_syntax
test_sys test_trace test_traceback test_unicode test_userdict
test_weakref test_xpickle
33 tests skipped:
test_aepack test_al test_bsddb test_bsddb3 test_bz2 test_cd
test_cl test_csv test_curses test_email test_email_codecs
test_future test_gl test_hotshot test_imgfile test_linuxaudiodev
test_logging test_macfs test_macostools test_nis
test_normalization test_ossaudiodev test_parser test_pep277
test_plistlib test_scriptpackages test_socket_ssl
test_socketserver test_sunaudiodev test_timeout test_urllibnet
test_winreg test_winsound
8 skips unexpected on linux2:
test_csv test_bz2 test_hotshot test_future test_bsddb test_parser
test_logging test_email
I know that a number of the failures are caused by the lack of error
checking. The new compiler reports 8 kinds of syntax errors, while the
old compiler has more like 40.
Another problem was probably caused by recent changes to the symbol
table. I see a lot of errors like this:
> Traceback (most recent call last):
> File "/home/jeremy/src/python-ast/Lib/test/test_userdict.py",
> line 38, in test_read
> p = self._empty_mapping()
> UnboundLocalError: local variable 'self' referenced before assignment
The biggest problem I found with running the test suite is the memory
leaks. Actually, we all knew the memory leaks were there, but I didn't
realize their extent. The Python process grews to 150MB pretty
quickly. I think I'll next look at improving the memory management
before tackling the individual failing tests.
Jeremy
More information about the Compiler-sig
mailing list