[Python-projects] list of false negatives

Simon Schampijer simon at schampijer.de
Mon Apr 14 14:16:33 CEST 2008


hey Sylvain,

  wrote:
> On Sat, Mar 22, 2008 at 02:56:08PM +0100, Simon Schampijer wrote:
>> Hi Sylvain,
> 
> Hey Simon,
>  
>> Johan Dahlin has provided a patch for pygobject that sets the 
>> GObject.__module__ properly to gobject._gobject.
> 
> cool
> 
>> Pylint still fails with 
>> the false errors. What other data does the astng relies on?
> 
> huum, i thought it would be enough. If you don't mind reading some
> python code, you should check method object_build in
> logilab/astng/build.py which is a recursive method responsible for
> building the astng representation from living object. Though a bit long,
> it's quite simple and a few print there should help detecting the
> problem. I would do it myself but I don't really have the time to
> download and build a svn version of gobject. If you've a compiled
> version for linux/x386 send it to me and I'll take a look.
> 
> regards,

I just played with it a bit. I think that not installing the patched 
pygobject did not work. For my first test I built it in the folder and 
run pylint on a file in that folder - so the errors were still there. (I 
verified here that a call to gobject.GObject.__module__ was '_gobject' 
fine).

I found out because I put prints in object_build and 
self._module.__name__ was always '__builtin__' and getattr(self._module, 
'__file__', None) always 'None' when testing with the uninstalled pygobject.

After installing the patched pygobject the pylint output looks much 
better :) Looks like this was the issue why Johan and my first test failed.

Best,
    Simon


More information about the Python-Projects mailing list