update python compiler to parse unions, * namespaces and oneway services ------------------------------------------------------------------------
Key: THRIFT-1262 URL: https://issues.apache.org/jira/browse/THRIFT-1262 Project: Thrift Issue Type: Improvement Components: Python - Compiler Reporter: Will Pierce Attachments: THRIFT-1262-python_compiler_revival_v1.patch This patch adds python-compiler parser support for Unions, "*" namespaces, and oneway services in thrift files. The python compiler is still incomplete (it doesn't generate a valid thrift_spec member in the code text it outputs), but this helps bring it a little up to date with "newer" features of Thrift that presumable didn't exist when the python compiler was last touched (January 2009). This is a patch against the branches/py-compiler/ directory, not trunk/... If there's a better way to submit fixes to the python compiler, please let me know. Or maybe this should be moved into trunk instead? (The SVN commit message on the py-complier branch is "Snapshot (back up) my work-in-progress before I hop on a plane.:" from gstein.) The various changes here include: * adding SYM_STAR as a recognized symbol (for * namespaces) * adding Union as a subclass of Struct * parser.py is now executable w/ some debug output * fix up absolute pathing in gen.py so it doesn't rely on /Users/gstein/src/asf/... * slight improvement to UnknownToken exception output (line number better labeled) * fix bug in handling of the service 'extends' keyword * fix redefinition of Exception class * add some repr() methods to make debugging output a little more readable -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira