[cfe-dev] Python bindings overhaul
tobias at grosser.es
Thu Feb 2 00:43:51 PST 2012
On 02/02/2012 08:57 AM, Tobias Grosser wrote:
> On 02/02/2012 01:00 AM, Eric Christopher wrote:
>> Hi Gregory!
>> On Jan 27, 2012, at 2:41 PM, Gregory Szorc wrote:
>>> Major changes:
>>> * Enumerations split out into clang.cindex.enumerations module
>>> * Objects hold references to parent (i.e. worry-free memory management)
>>> * Support for Token API
>>> * More APIs supported around the board. Pretty much everything from
>>> libclang is supported except the high-level Indexing component.
>>> Other improvements:
>>> * Python style improvements. pylint and pyflakes output is now
>>> tolerable and the code mostly follows Python best practices.
>>> * Improved documentation
>>> * Increased test coverage
>>> * Added test to ensure enumerations are up-to-date with Index.h (uses
>>> Tokens API)
>>> * Introduced decorator to cache/lazy load properties. This should cut
>>> down on C function calls.
>> This all sounds awesome. How about we start small here though? You've
>> mentioned that you have a bunch of cleanups for eye sores, doxygen
>> comments, etc that we could apply on our way to having the python
>> bindings get feature parity with libclang. Let's get some of those reviewed
>> separately and then tackle the larger tasks as we go?
>> Thanks again for all of this work, I haven't had time to look at your
>> github repository but hope to soon!
> Hi Gregory,
> just to give you some first feedback right now. I skimmed trough the git
> repository and I like the overall direction of the patches. They seem to
> improve the python bindings a lot. Unfortunately I did not have time to
> look into the exact details.
> One comment:
> I think the patch is very large. This is good to show the overall
> direction. However, to commit and review these changes I would very much
> appreciate smaller patches. As I have seen in your git repository, you
> have all this already divided in small patches. Most of them seem to be
> easy to review.
> I will give it another look (either today or tomorrow). I will also try
> your changes with clang_complete.
I just did this. For me they were a drop in replacement. Everything
continues to work as expected. The completion time did not change.
clang_complete does not seem to be affected by these changes, but may
obviously later take advantage of the new features.
More information about the cfe-dev